- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 12:29 AM
Hi,
I have a requirement like, when user update state, Comments, Priority etc.. in third party application, then it should be updated in servicenow
I am using the scripted rest api PUT method to update the fields in servicenow.
Could you please help,
Script Include:
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2017 10:45 AM
Hi Harish,
As you said when ticket is updated in third party application then it should update the same in ServiceNow.
Are you saying that you have exposed the Scripted REST API to the third party.
I could see that you have used PUT method i.e. fine.
But the way you are fetching the response is incorrect . use following
var requestBody = request.body.dataString;
try to add logs to check requestBody is received correctly in your scripted rest api resource
also you are not sending the id as json key while consuming the REST endpoint so how you will get the value by parsing the json
the json parsing you have used is not correct. use following
var parser = new global.JSON();
var parsedData = parser.decode(requestBody);
var id = parsedData.work_notes;
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2017 12:42 AM
Hi Harish,
Any update on this?
Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2017 06:20 AM
Harish, Did you get this integration working. I'm kind of in the same boat myself. I create a ZD ticket it goes over to Snow with no problem but I need to then update the ZD ticket with the SNow sys_id so my business rules will work. Could you offer some in-site on how you accomplished this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2017 07:21 AM
Hi Stephen,
What you can do is
1). Create script include and use the REST API GET method to retrieve the required details from external system and import them into a import set table.
2). Now create the scripted Rest API and use the script include which you have created and write those imported values to target table.
Thank you..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2018 06:19 AM
Hi Harish,
Any update on this?
Can you mark my answer as correct, helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2018 03:24 AM
Hi Ankur,
Could you please help me on this thread below.
https://community.servicenow.com/community?id=community_question&sys_id=21619038dba5eb44f0612183ca9619ef
Thank you.