- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2017 11:12 PM
I have a third party endpoint, when i save it am getting only 'Default Get' method(no other methods are generated), when i test, am able to get all user details in 'Response' field (json format) , now i want to add these records to my sys_user table, how to do that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2017 01:08 AM
Hi Swathi,
you need to parse the response using JSONParser() and iterate over the key value pairs
Can you share the response so that the script can be designed?
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
‎01-18-2017 11:12 PM
Hi Swathi,
Are you getting 100+ user records in the JSON response?
If yes then the JSON has to be iterated and determined how much is the length and accordingly create user records
Can you share the json response which contains more than 5-10 repetition of the similar type so that the script can be designed.
{"UserID":"10001460","Name":"B. Swathi","FIrst Name":"B.","Last Name":"Swathi","Email":"","Company":"ABC Corp Limited","Company Code":"ABC0002","Building":"Nagar","City":"Cp Dist","Country":"INDIA","Department":"Support","Vertival":"Admin","Sub Vertical":"Admin","Gender":"Male","Business Phone":"","Location":"India","Manager":"Ashok","State":"Kar","Street":"kur","Time Zone":"","VIP":"","Pincode":"500"}
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
‎03-02-2017 02:09 AM
Hi Swathi,
Were you able to achieve your requirement? If yes then please mark the answer as correct, helpful and hit like. This helps in closing the thread for the question. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader