- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2023 09:02 AM
Hello everyone,
My organization is working in the Order Management for Telecom, Media & Tech application. Currently, we're using the OOTB functionality where customer accounts need to be set up in ServiceNow before they can be sent via payload. If the account is not set up in ServiceNow, then we receive this error message:
{
"message": "Invalid payload: Customer Account does not exist",
"datapath": "/relatedParty/"
}
This brings me to my question. I have a requirement to automatically create customer accounts from the incoming payload if the customer account does not already exist in ServiceNow.
Has anyone done this before or have any suggestions or guidance on this?
Any help would be greatly appreciated!
Best regards,
cnharris1
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 12:41 PM
How about updating your integration steps/process
First use table API to check if the Account exists, and if not create it.
then send your payload.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2023 12:47 PM
Hi, I think you would have 2 options
Normal type data import, where you post your data into a temporary import table and then use OOB field mapping and transform script to process the record, and if necessary in the process you can create any related records.
Scripted REST API, allowing you to parse and pre-process your payload, before it is inserted into a temp import table before it is transformed to target record.
Scripted REST API would be the method to use if you need to return a response to the sender, based on whether the 'account was created', but this comes with an integration overhead as the initial REST response cannot be returned until the script completes; and this can potentially result in response issues\timeouts depending on processing time, transaction volumes etc.
My preference is to use standard import\transform process as the 'integration' is complete as soon as the payload is populated into the temp data table, with any subsequent action being internal to your instance\outside of the actual integration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 09:40 AM
Hi Tony,
Thanks for the suggestions. I've been looking at this link: Product Order Open API Developer Guide (servicenow.com) and I think this may help out.
It looks like I need to override the function that checks to see if the customer account already exists in ServiceNow but I'm not sure where that function is captured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 12:41 PM
How about updating your integration steps/process
First use table API to check if the Account exists, and if not create it.
then send your payload.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-03-2023 08:50 AM
Yeah, that's the part I've been looking into. I'm not exactly sure where or what function is throwing this error message: "Invalid payload: Customer Account does not exist"