Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/09/2024 02:32 AM
Hi, we have a use case for whenever user having emergency termination his service now ticket should goes to completed state automatically in saviynt or ticket should not get generating for the emergency termination or leaver process.
In our code ticket is generating for all the scenarios. We shouldn't want to create ticket for all scenarios.
Regards,
Amirthana
09/09/2024 04:14 AM
Hi @AmirthanaRam , is it a jar code or a service desk connection?
09/09/2024 05:08 AM
Its is a Service desk connection
09/09/2024 05:13 AM
@AmirthanaRam what do you mean by emergency termination?
09/09/2024 05:29 AM
"callCondition": "${arstasksObj?.source != 'ONECLICKDISABLE'}",
{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://<domainname>/api/now/table/sc_task",
"httpMethod": "POST",
"callCondition": "${arstasksObj?.source != 'ONECLICKDISABLE'}",
"httpParams": "{\"bp_id\":\"$user.username\",\"name\":\"$user.lastname, $user.firstname\",\"email\":\"$user.email\",\"permissions\": \"${allEntitlementsValues}\"}",
"httpHeaders": {
"Authorization": "${access_token}" },
"httpContentType": "application/json",
"ticketidPath": "Request Number",
"unsuccessResponses": {
"message": "" }
}
]
}
09/10/2024 04:42 AM
I have added this condition but i am getting the error called"Error in getting Ticket Number. Response: {"error":{"message":"A valid asset ID/Name is required.,A valid requested for is required.,undefined is not an acceptable CI. The CI support group (undefined) does not have an active user in the group.","detail":""},"status":"failure"}".
{ "call": [{ "name": "call1",
"connection": "userAuth",
"url": "*******",
"callCondition": "${arstasksObj?.source != 'ONECLICKDISABLE'}",
"httpMethod": "POST",
"httpParams": "{\"insert\": {\"partnerInfo\": {\"name\": \"com.healthcare.itr.idm\",\"externalRecord\": \"****\"},\"item\":\"General Service Request\",\"itemVariables\": {\"v_requested_for\": \"${requestor.username}\",\"v_configuration_item\":\"${endpoint.customproperty1}\",\"assignment_group\": \"{endpoint.customproperty2}\",\"v_short_description\":\"${if(task.tasktype == 2) { 'REMOVE';} else {'ADD';}} ${endpoint.endpointname} user for ${user.username} \",\"v_detailed_description\":\"Request id : ${requestid} \\\\nApplication Name : ${endpoint.endpointname}\\\\n \\\\nAction : \\\\nRequest Type : ${if(task.tasktype == 2) {'REMOVE';} else {'ADD';}} \\\\nRequested By : ${requestor.firstname},${requestor.lastname} (${requestor.username}) \\\\nRequested for : ${user.firstname},${user.lastname}(${user.username})\\\\nEntitlements :\\\\n${allEntitlementsValues} \\\\nRequestor comments :\\\\n${task.requestKey==null?'':task.requestKey?.comments?.replaceAll('<.*?>','').replaceAll('\\n','').replaceAll('\\r','').replaceAll('[^ -~À-ÿ]+','').replaceAll(new String('XFw='.decodeBase64()),new String('XFxcXA=='.decodeBase64()))} \\\\n \\\\nApprovers: ${approvers} \\\\nApprover comments : \\\\n\\\\nSaviynt Taskid : ${taskIds} \\\\n \"}}}", "httpHeaders": { "Authorization": "${access_token}" }, "httpContentType": "application/json", "ticketidPath": "result.number", "ticketStatusPath": "result.state", "ticketStatusValue": [ "Open", "OPEN", "open", "Assigned" ], "unsuccessResponses": { "message": "Failed to create the ticket" }, "successResponses": { "statusCode": [ 200, 201 ] } }] }
09/10/2024 05:58 AM
09/10/2024 06:02 AM
but client is telling if the user is comes under emergency termination or in leaver process, they don't want to create a ticket for this two scenarios.
Regards,
Amirthana
09/10/2024 06:09 AM