- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2022 11:33 PM
I am working on third party chatbot integration with Servicenow, and currently facing a issue that caller_id is not getting posted through API on incident table (using record producer in between) in Servicenow.
"sysparm_quantity": 1,
"sysparm_caller_id": "",
"variables":{
"service_offering":"",
"business_service": "",
"short_description":"Test",
"description":"Test",
"phonedescription":""
}
}
On the other hand if do post the request on request table using below POST payload its working fine.
(
sysparm_quantity": 1,
"sysparm_requested_for": "using sys_id of user here",
"variables": {
"address": "",
"postal_code": "",
"place_of_residence": "",
"country_of_residence": "",
"telephone_number": "",
"conditions": "No"
}
}
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 01:05 AM
Hello Rekha,
Could you please check once by following the below steps:
1. if you don't have a caller_id variable in your record producer then create a caller_id variable on your record producer (if you don't want to show this in portal you can hide in portal)
2. In Record producer script you need to update script to check the caller_id:
var caller = gs.getUserID();
if (producer.caller_id)
caller = producer.caller_id;
3. set the caller_id variable as shown below instead of sysparm_caller_id
{"sysparm_quantity": 1,
"variables":{
"caller_id": "62826bf03710200044e0bfc8bcbe5df1",
"urgency":"1",
"comments":"Test via Rest API"
}
}
This should set the caller_id on your incident that is created via Rest API using POST submit record Producer API
Please mark my respsone as helpful/correct, if it answer your question.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022 01:05 AM
Hello Rekha,
Could you please check once by following the below steps:
1. if you don't have a caller_id variable in your record producer then create a caller_id variable on your record producer (if you don't want to show this in portal you can hide in portal)
2. In Record producer script you need to update script to check the caller_id:
var caller = gs.getUserID();
if (producer.caller_id)
caller = producer.caller_id;
3. set the caller_id variable as shown below instead of sysparm_caller_id
{"sysparm_quantity": 1,
"variables":{
"caller_id": "62826bf03710200044e0bfc8bcbe5df1",
"urgency":"1",
"comments":"Test via Rest API"
}
}
This should set the caller_id on your incident that is created via Rest API using POST submit record Producer API
Please mark my respsone as helpful/correct, if it answer your question.
Thanks