Forum Discussion

James_Fricker's avatar
3 years ago

LM -> ServiceNow transform script

In the LM transform script in ServiceNow there is the following code

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

    // This will make sure the number of the incident is saved with the import set table record. This will allow LogicMonitor to display the
    // Incident Number via the ##EXTERNALTICKETID## token
    source.setValue('number', target.number.toString());

})(source, map, log, target);

This code is not needed if Logic Monitor used the ServiceNow import set REST API instead of the SN table REST API. It is not recommended to update source records in transform map scripts like this. By using the import set API, LM would automatically receive the target record ticket number as a part of the POST response.!/reference/api/quebec/rest/c_ImportSetAPI

Any chance the LM->SN connector could be updated to use the SN import set REST API and then get rid of this unnecessary hack?