Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How can I modify the Created By and Updated By fields for objects that were created using an API

abhinay_pandey
Giga Contributor

We’ve developed an integration using the OAuth flow, where the access token is used to create and update Interaction records in ServiceNow. However, when we update the Notes field on an interaction, the record reflects that it was created or modified by the user who originally set up the OAuth integration, rather than the logged-in agent. The agents access the system through CTI using Openframe, and their usernames should ideally appear as the modifier instead.

How can we configure this so that the agent’s username is displayed instead of the integration user’s?
Please note that in our Contact Center setup, agents and admins have different privilege levels.

4 REPLIES 4

lpruit2
Mega Sage

Greetings @abhinay_pandey. I don't believe you can retroactively update the "Created By" and "Updated By" field value once an action to the record has taken place. It sounds like the Integration is hard-coded to run as the specific user. I would recommend revisiting the Integration configuration and/or any associated Flows to ensure the update action is being performed by the current logged in issue. The original configuration may have been due to a permissions issue on the table so would be a great time to verify the current logged in user has sufficient permissions (write) to the target table. I hope this information helps and always interested in what others have to share. 

@lpruit2 Thank you for your inputs. We use the Table APIs to create and update interaction records, utilizing the access_token obtained through the OAuth flow during integration setup. The integration is assigned to and accessible by logged-in agents; however, when agents use the CTI to handle calls, our backend manages the interaction creation using the same access_token.

Ankur Bawiskar
Tera Patron

@abhinay_pandey 

I agree with the point mentioned by @lpruit2 

Is it showing as Created/Updated by the API user?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar You are correct, it appears as “Created/Updated by” the user who originally set up the integration, since the actions are performed using that user’s access token.