yes @YanCoelho we are using V2024 api .
So basically we have made this below workflow to forward the pending certficate of user to his manager’s manager is the manmnager of user is terminated .
Kindly help me modify this workflow and if possible give me the correct one thanks
{
"name": "Forward Certifications on Manager Termination",
"description": "When a manager is terminated, all their pending certification reviews are reassigned to their manager.",
"modified": "2025-09-23T18:12:49.464160784Z",
"modifiedBy": {
"type": "IDENTITY",
"id": "25b762a1969a475b8215d21ae28e8004",
"name": "balaji"
},
"definition": {
"start": "Get Terminated Manager",
"steps": {
"End Workflow": {
"actionId": "sp:operator-success",
"displayName": "Workflow Complete",
"type": "success"
},
"Get Campaigns": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"jsonRequestBody.$": "",
"method": "get",
"oAuthClientId": "8c2a79d44fe94cc8a2a83710b4429f57",
"oAuthClientSecret": "$.secrets.746c5897-a82c-4bb6-b152-b45a3e0f36a9",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://xyz.api.identitynow.com/oauth/token",
"requestContentType": null,
"url": "https://xyz.api.identitynow.com/v2024/campaigns",
"urlParams": {
"reviewer.id": "{{$.getTerminatedManager.id}}"
}
},
"displayName": "Get Certification Campaigns",
"nextStep": "Loop",
"type": "action",
"versionNumber": 2
},
"Get Managers Manager": {
"actionId": "sp:get-identity",
"attributes": {
"id.$": "$.getTerminatedManager.managerRef.id"
},
"displayName": "Get Manager’s Manager Details",
"nextStep": "Get Campaigns",
"type": "action",
"versionNumber": 2
},
"Get Terminated Manager": {
"actionId": "sp:get-identity",
"attributes": {
"id.$": "$.trigger.identity.id"
},
"displayName": "Get Terminated Manager Details",
"nextStep": "Get Managers Manager",
"type": "action",
"versionNumber": 2
},
"Loop": {
"actionId": "sp:loop:iterator",
"attributes": {
"input.$": "$.getCampaigns.body",
"start": "Forward Certification",
"steps": {
"End Loop": {
"actionId": "sp:operator-success",
"displayName": "Certification Forwarded",
"type": "success"
},
"Forward Certification": {
"actionId": "sp:http",
"attributes": {
"authenticationType": "OAuth",
"jsonRequestBody": {
"certificationIds": [
"{{$.loop.loopInput.id}}"
],
"reason": "Reassigned because manager was terminated",
"reassignTo": "{{$.getManagersManager.id}}"
},
"method": "post",
"oAuthClientId": "8c2a79d44fe94cc8a2a83710b4429f57",
"oAuthClientSecret": "$.secrets.d96bcd4e-4af2-4e8c-a9f3-6759866ef29f",
"oAuthCredentialLocation": "oAuthInHeader",
"oAuthTokenUrl": "https://xyz.api.identitynow.com/oauth/token",
"requestContentType": "json",
"url": "https://xyz.api.identitynow.com/v2024/campaigns/{{$.loop.loopInput.id}}/reassign"
},
"displayName": "Forward Certification",
"nextStep": "End Loop",
"type": "action",
"versionNumber": 2
}
}
},
"displayName": "",
"nextStep": "End Workflow",
"type": "action",
"versionNumber": 1
}
}
},
"creator": {
"type": "IDENTITY",
"id": "15d01f1284cc4c03b6110df0a784a588",
"name": "Rakesh"
},
"trigger": {
"type": "EVENT",
"attributes": {
"filter.$": "$.changes[?(@.attribute == \"cloudLifecycleState\" && @.newValue == \"terminatedDisabled\")]",
"id": "idn:identity-attributes-changed"
}
}
}