Customization of response for POST call for Integration of 3rd part tool with ServiceNow.

Ashwini123
Tera Contributor

Hi All,

 

We are trying to integrate 3rd party tool with ServiceNow. 3rd party tool is posting the data in staging table using POST API and ServiceNow is sending default response back to 3rd Party tool. But 3rd Part tool is asking us to send the customized response. Has anyone implemented the customization of response  for POST method?

2 REPLIES 2

M Ismail
Tera Guru

Hi @Ashwini123,

Please check out this 
https://www.servicenow.com/community/developer-forum/web-service-import-sets-sending-customized-resp...

Please hit helpful and accept this as a solution if it solved your problem.
Thank you!

Ahmmed Ali
Mega Sage

Hello @Ashwini123 

 

You can send additional details in response using the response object in onAfter script of transform map (as suggested by Ismail).

 

If you need to send the response in different format then one way is to have scripted API. The 3rd party app can send the data to scripted API, in the API you can read the data and create import set and run the transform map. Then you can send custom response as per your requirement.

Example script to create import set: https://www.servicenow.com/community/developer-forum/script-to-create-an-import-set-and-run-the-tran... 

 

Thank you,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali