ServiceOder Open API throw error while using external ID

Mythili Searn
Kilo Contributor

I am using Service Order Open API to create service order. I am using the example payload given in servicenow document. I have just removed the sys_id and updated them with external ID. External ID for Service Specification, Place, Account and Contact. But I get error for Account and Place. After providing sys_id for these 2, order is getting created. Only service specification and Contact is getting mapped with external id. 

How to override the Account and Place validation/mapping? Anybody done custom fields for mapping additional parameters, which are not in the example?

Below is error message I get while using external ID. 

{
  "code": 23,
  "reason": "Missing body field",
  "message": "Missing body field",
  "details": [
    {
      "message": "Invalid payload: Customer Account does not exist",
      "datapath": "/relatedParty[1]/"
    },
    {
      "message": "Invalid payload: The place doesn't exist in the system",
      "location": "serviceOrderItem[0]:200south"
    }
  ]
}
1 ACCEPTED SOLUTION

Shubham44
ServiceNow Employee
ServiceNow Employee

Please let me know if you have any more queries else please mark the response helpful and correct

View solution in original post

10 REPLIES 10

Thank you @Kailash Bhange !

I was able to write some code in to automatically create the account if it doesn't already exist in the platform.

Best regards,

cnharris1