We have ServiceDesk integration configured, where we are able to create Service Requests based on requirements. However, the REQ status remains “Pending for Approval” instead of “Open”. Also, once we close the SCTASK, the REQ status changes to “Requested”.
Can this be fixed from the SailPoint end, or should it be addressed from the ServiceNow end based on the SCTASK and RITM statuses?
In your ServiceNow instance, are you using the default “Service Catalog Request” workflow for sc_request items? – Yes right its “Service Catalog Request”
In your SDIM Integration, are you tracking the status of the REQ or RITM records? RITM level
Ok, what do your status mappings look like? That would be at the bottom of your SDIM configuration (we track the REQ not the RITM so mine will look different)
I have one more question. Can we change the approval field at the REQ level to “Approved” from the SailPoint end? It is still showing as “Requested” even after the ticket is closed.
Additionally, our ServiceNow team has mentioned that this approval state field is coming from SailPoint, and they can’t take any action on it. Would it be possible to update this from the SailPoint end?
Note: We do not need any approval state in REQ (Pending approval/Requested).
No. The REST endpoint that SailPoint calls on the ServiceNow side is only creating a new request, and then the status is being monitored. The workflow does directly change the request_state field once, and I will explain further below, but the approval field on sc_request is not modified.
Just clarifying, but you are seeing this on the ServiceNow side, correct? This is an example of the request_state values I see on the sc_request table for one of these that comes through
This is different from most sc_request records I have, and I figured out the RITM workflow is actually modifying that state from Approved to Pending Approval in this step
// Get all catalog variables
var catVarPool = current.variable_pool;
var req = new GlideRecord('sc_request');
req.addQuery('sys_id', current.request); // find the REQ record
req.query();
// if REQ record found then set value
if (req.next()) {
for (var varName in catVarPool) {
if (!gs.nil(varName) && req.isValidField(varName)) {
req.setValue(varName, catVarPool[varName]);
}
}
// set description field on the service request ticket
var reqDescription = catVarPool['req_description'];
if(req.isValidField('description') && !gs.nil(reqDescription)) {
req.setValue('description', reqDescription);
}
// set short description field on the service request ticket
var reqShortDescription = catVarPool['req_short_description'];
if(req.isValidField('short_description') && !gs.nil(reqShortDescription)) {
req.setValue('short_description', reqShortDescription);
}
req.update();
}
Notably, it is taking the RITM variable value of the variable request_state and writing it to the request_state field on the sc_request record. The SDIM connector populates that variable with “requested”, which is what makes the sc_request.request_state field change to “Pending Approval”. Take a look at the choice list for reference.