- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 07:19 AM
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"
}
]
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2022 07:07 AM
Please let me know if you have any more queries else please mark the response helpful and correct

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 07:27 AM
hi Mythili,
The same external Id needs to be updated in the Servicenow customer_account and Servicenow cmn_location table for the API validation point of view.
Please mark the response helpful and correct if appropriate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2022 10:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2022 01:27 AM
hi Mythili,
Can you please confirm that which version of OMT are you using?
Have you upgrade to San Diego and if yes then
a) For Account
check the TMFOrderAPIConstants and see that in the ProductOrderSchema, there is an escaped JSON schema attached(you can unescape it using online tools) you should be able to see the exernal id also the field validation
"reference": [
{
"referenceKey": "id",
"table": "customer_account",
"field": [
"sys_id",
"sn_ind_tsm_core_external_id"
],
"errorMsg": "Invalid payload: Customer Account does not exist",
"referenceCondition": {
"conditionKey": "@referredType",
"conditionValue": "Customer",
"conditionOperator": "=="
}
}
b) Similarly for location in TMFProductOrderAPIUtil you should be able to see the below
var locationRecord = this.apiCoreUtil.getRecordBySysIdOrAlternateId(orderLineItem[i].product.place.id, Constants.TABLE_LOCATION, sn_ind_tsm_core.Constants.TSM_EXTERNAL_ID);
If you don't see this then either you upgrade to San Diego or raise a Hi ticket so that our technical team can then do it on your instance.
Please mark the response correct and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2022 09:12 PM
I am using San Diego version. OMT version 2.00
I am able to see both the above code in the script.
I had mapped external ID(sn_ind_tmt_orm_external_id).
After updating values in external ID(sn_ind_tsm_core_external_id) for account and location, Order is getting created.
It is creating confusion between sn_ind_tmt_orm_external_id and sn_ind_tsm_core_external_id.
For service specification, external id is sn_ind_tsm_orm_external_id.
Can you provide more details on these two fields? or link to get more details about these fields.?