{ "name": "Homonymous Detection", "description": "", "modified": "2023-03-01T12:20:44.235158548Z", "modifiedBy": { "type": "IDENTITY", "id": "68126d278b4c493bbzc68a0669c682f4", "name": "olivier.detilleux" }, "definition": { "start": "Wait", "steps": { "Fuzzy Search": { "actionId": "sp:http", "attributes": { "authenticationType": "OAuth", "method": "post", "oAuthClientId": "bafa9fbace164b86b484ffc19cf3d330", "oAuthClientSecret": "$.secrets.7481e329-bbq9-4dd2-8099-2d8b1eace7e3", "oAuthCredentialLocation": "oAuthInHeader", "oAuthTokenUrl": "https://tenant.api.identitynow.com/oauth/token", "requestContentType": "text", "textRequestBody": "{\n \"query\": {\n \"query\": \"((attributes.lastname.exact:/.*{{$.trigger.attributes.lastname}}.*/ AND attributes.firstname.exact:/.*{{$.trigger.attributes.firstname}}.*/ ) OR (attributes.lastname:{{$.trigger.attributes.lastname}}~1 AND attributes.firstname:{{$.trigger.attributes.firstname}}~1 ) OR (attributes.firstname.exact:{{$.trigger.attributes.lastname}} AND attributes.lastname.exact:{{$.trigger.attributes.firstname}} )) AND ( NOT attributes.uid.exact:{{$.trigger.identity.name}})\" \n },\n \"indices\": [\n \"identities\"\n ],\n \"sort\": [\n \"displayName\"\n ],\n \"includeNested\": true\n}", "url": "https://tenant.api.identitynow.com/v3/search" }, "description": "Fuzzy search based on firstname and lastname and inverted", "nextStep": "Verify Fuzzy Search Results", "type": "action", "versionNumber": 2 }, "Get HR Account Id": { "actionId": "sp:http", "attributes": { "authenticationType": "OAuth", "method": "get", "oAuthClientId": "bafa9fbace164b86b484ffc19cf3d330", "oAuthClientSecret": "$.secrets.9c5d7524-e4cd-488e-bb01-37df430dae75", "oAuthCredentialLocation": "oAuthInHeader", "oAuthTokenUrl": "https://tenant.api.identitynow.com/oauth/token", "requestContentType": null, "url": "https://tenant.api.identitynow.com/v3/accounts", "urlParams": { "filters": "identityId eq \"{{$.trigger.identity.id}}\" and sourceId eq \"{{$.getIdentityDetails.body[0].source.id}}\"" } }, "description": "Search for the accountId of the account in the HR Source", "nextStep": "Merge Identities", "type": "action", "versionNumber": 2 }, "Get Identity Details": { "actionId": "sp:http", "attributes": { "authenticationType": "OAuth", "method": "post", "oAuthClientId": "bafa9fbace164b86b484ffc19cf3d330", "oAuthClientSecret": "$.secrets.ebd00ab1-b995-40b6-8792-30051e9d6598", "oAuthCredentialLocation": "oAuthInHeader", "oAuthScope": null, "oAuthTokenUrl": "https://tenant.api.identitynow.com/oauth/token", "requestContentType": "text", "requestHeaders": "Content-Type:application/json", "textRequestBody": "{\n \"query\": {\n \"query\": \"id:\\\"{{$.trigger.identity.id}}\\\"\"\n },\n \"indices\": [\n \"identities\"\n ],\n \"sort\": [\n \"displayName\"\n ],\n \"includeNested\": true\n}", "url": "https://tenant.api.identitynow.com/v3/search" }, "description": "Search the new identity to get its HR Source. Cannot use Get Identity because it is not returning this information", "nextStep": "Strict Search", "type": "action", "versionNumber": 2 }, "Merge Identities": { "actionId": "sp:http", "attributes": { "authenticationType": "OAuth", "jsonRequestBody": [ [ { "op": "replace", "path": "/identityId", "value": "{{$.strictSearch.body[0].id}}" } ] ], "method": "patch", "oAuthClientId": "bafa9fbace164b86b484ffc19cf3d330", "oAuthClientSecret": "$.secrets.043c7776-66ba-41ca-a6d3-86562a8a8376", "oAuthCredentialLocation": "oAuthInHeader", "oAuthTokenUrl": "https://tenant.api.identitynow.com/oauth/token", "requestContentType": "json", "url": "https://tenant.api.identitynow.com/v3/accounts/{{$.getHRAccountId.body[0].id}}" }, "description": "Merge the new Identity with the old one by patching the account", "nextStep": "Send Remediation Email", "type": "action", "versionNumber": 2 }, "Send Arbitration Email": { "actionId": "sp:send-email", "attributes": { "body": "