Schedule job to call a rest Message

Vijay53
Giga Contributor

Hi

 

I have built an integration with a third pary tool.  I am able to send and retrieve the information from the tool.

 

I am building a scheduled job to retrive the tickets from the tird party tool.

Can anyone help me in finding out the no of records that are retrieved by the scheduled job and how to parse the data that is retrived an update the Request item table.

 

This is the code that is used to retrive the ticket information.

 

try {
var r = new sn_ws.RESTMessageV2('XXXXXX', 'Select');
r.setStringParameterNoEscape('ritm_number', 'RITM0190158');

 

var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
}
catch(ex) {
var message = ex.message;
}

 

Appreciate the help

Vijay

7 REPLIES 7

Hi Mark

This did not help me but I changed the approach.

 

I am now using a script include to call the Integration and pass the request item no based on conditions.

That should be good

Thank you

Vijay

Hi Vijay,

If you are good with the approach then please mark the question as answered

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Vijay,

Hope you are doing good.

Let me know if that answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader