Hi All,
Use case: Need to trigger a email from sailpoint when salesforce account is failed to disable while user termination. Am trying to use the below Json to create work flow but its with validation errors.
{
“name”: “Notify Salesforce User on Disable Failure”,
“description”: “This workflow sends an email notification to the admin when a Salesforce account fails to disable in SailPoint.”,
“definition”: {
“start”: “Check If Salesforce Disable Failed”,
“steps”: {
“Check If Salesforce Disable Failed”: {
“type”: “conditional”,
“properties”: {
“condition”: “{{trigger.accountOperation}} == ‘Disable’ && {{trigger.provisioningTarget}} == ‘Salesforce’ && {{trigger.provisioningResult}} != ‘committed’”
},
“ifTrue”: {
“nextStep”: “Get Identity”
},
“ifFalse”: {
“nextStep”: “End Step — Success”
}
},
“Get Identity”: {
“actionId”: “sp:get-identity”,
“attributes”: {
“id.$”: “$.trigger.identity.id”
},
“description”: “Retrieves details of the affected user.”,
“nextStep”: “Send Email”,
“type”: “action”,
“versionNumber”: 2
},
“Send Email”: {
“actionId”: “sp:send-email”,
“attributes”: {
“recipients”: [
“[email protected]”
],
“subject”: “Salesforce Account Disable Failed”,
“body”: “Dear Admin,
The attempt to disable the Salesforce account for user ${displayName} was unsuccessful.
Please investigate the issue and take the necessary actions.
Since you are already filtering for the SF failed events in the trigger, you don’t need to recheck it in the compare operator. And looks like the compare operator had formatting issues.
Thank You Jesvin, It worked. I also have a requirement to pull the account attribute into the email template. Am trying with below expression but seems not able to fetch.
{“accountId.$”: “$.getAccounts.accounts[?(@.sourceId==‘420af5bb17704a16b4be20241f88d10c’)].attributes.Id”}