Hi @kalyannambi2010 ,
you can use the below json and change according to your requirements.
"name": "SNOW Ticket",
"description": "When department changes",
"definition": {
"start": "Get Identity",
"steps": {
"Compare Numbers 1": {
"actionId": "sp:compare-numbers",
"choiceList": [
{
"comparator": "NumericEquals",
"nextStep": "Manage ServiceNow Ticket 1",
"variableA.$": "$.manageServiceNowTicket.statusCode",
"variableB": 201
}
],
"defaultStep": "End Step - Failure 1",
"displayName": "Compare Req api",
"type": "choice"
},
"Compare Numbers 2": {
"actionId": "sp:compare-numbers",
"choiceList": [
{
"comparator": "NumericEquals",
"nextStep": "Send Email",
"variableA.$": "$.manageServiceNowTicket.statusCode",
"variableB": 201
}
],
"defaultStep": "End Step - Failure 2",
"displayName": "compare item api",
"type": "choice"
},
"End Step - Failure 1": {
"actionId": "sp:operator-failure",
"displayName": "",
"failureName": "ServiceNow Request not created",
"type": "failure"
},
"End Step - Failure 2": {
"actionId": "sp:operator-failure",
"displayName": "",
"failureName": "ServiceNow Task not created",
"type": "failure"
},
"End Step — Success": {
"actionId": "sp:operator-success",
"description": "Request Success",
"displayName": "",
"type": "success"
},
"Get Access": {
"actionId": "sp:access:get",
"attributes": {
"accessprofiles": false,
"entitlements": true,
"getAccessBy": "searchQuery",
"identityToReturn.$": "$.getIdentity.id",
"query": "source.name:\"<SourceName>\"",
"roles": false
},
"description": null,
"displayName": "",
"nextStep": "Get Identity 1",
"type": "action",
"versionNumber": 1
},
"Get Identity": {
"actionId": "sp:get-identity",
"attributes": {
"id.$": "$.trigger.identity.id"
},
"displayName": "",
"nextStep": "Get Access",
"type": "action",
"versionNumber": 2
},
"Get Identity 1": {
"actionId": "sp:get-identity",
"attributes": {
"id.$": "$.getIdentity.managerRef.id"
},
"displayName": "Get Identity's manager",
"nextStep": "Manage ServiceNow Ticket",
"type": "action",
"versionNumber": 2
},
"Manage ServiceNow Ticket": {
"actionId": "sp:snow",
"attributes": {
"action": "create",
"authenticationType": "basic",
"basicAuthPassword": "$.secrets.*******",
"basicAuthUserName": "ServiceAccount",
"caller": "SailPoint Integration",
"category": null,
"customFields": "requested_for:{{$.getIdentity.attributes.email}}",
"description": "",
"oAuthClientId": null,
"oAuthTokenUrl": null,
"shortDescription": "shortDescription",
"urgency": "2",
"url": "https://abcde.service-now.com/api/now/v1/table/sc_request",
"watchlist": ""
},
"description": "Create Service Now Ticket",
"displayName": "Manage ServiceNow Ticket",
"nextStep": "Compare Numbers 1",
"type": "action",
"versionNumber": 1
},
"description": null,
"displayName": "",
"nextStep": "End Step — Success",
"type": "action",
"versionNumber": 2
}
}
},
"creator": {
"type": "IDENTITY",
"id": "********",
"name": "Name"
},
"trigger": {
"type": "EVENT",
"attributes": {
"attributeToFilter": "department",
"description": "Trigger on Department unit change",
"filter.$": "$.changes[?(@.attribute == \"department\")]",
"id": "idn:identity-attributes-changed",
"integrationId": null
}
}