Reassign all non-employees through a form When a Manager is inactive

We have a Transform logic that sees the Manager as the Manager.

The idea would be to use this logic to reassign all non-employees through a form, where the active Manager will decide who will be the new person responsible for the non-employees. Do you have any examples of how the logic via Workflow would work?

Hi @kazakeibic

I think you can achieve this by creating the following two workflows and a form.

1st Workflow:

  • Identity Attributes Changed (trigger) - when a manager moves into a specific lifecycle state e.g preLearverStage or any other (7 days prior lifecycle state moves into inactive state)
  • Get Identity (Action) - get the manager details
  • HTTP Request (Action) - API call to search for the manager’s direct reports but only from a specific source e.g 3rd Party Source
  • Verify Data Type (Operator) - Validate/checks whether the manager has direct reports
  • If the output is null, then end workflow
  • If the output is NOT null,
    • Loop (operator) - if the manager has more than one direct reports
    • Form (Action) - Sends notification to the current manager along with a form link to provide a new manager name
    • End Step - Success
  • End Step - Success

2nd Workflow:

  • Form Submitted (trigger) - when the form is submitted
  • Get Identity (Action) - Get the non-employee or direct report details
  • HTTP Request (Action) - API call to change the manager name based on the input value in the submitted form
  • Send Email (Action) - Sends email to the current manager and the new manager about the changes.
  • End Step - Success

Form:

  • Name
  • Description
  • Fields:
    • Header : Non-employee details
    • ID
    • Display Name
    • Select new manager (from the drop-down identities list)
    • Comments

Give it a try in the sandbox first and make sure you get the desired result.

Hello Noor Hassan, thank you very much for your help, I will validate in SandBox, and return as soon as possible with the evolutions I obtained.

Thank you so much!

Noor, a question If you can please, does it make sense for us to continue this way?

{
	"name": "[Teste] - Reassign all non-employees",
	"description": "[Teste] - Reassign all non-employees",
	"modified": "2025-05-27T20:56:19.466349907Z",
	"modifiedBy": {
		"type": "IDENTITY",
		"id": "ID",
		"name": "NAME"
	},
	"definition": {
		"start": "Get Identity",
		"steps": {
			"Compare Strings": {
				"actionId": "sp:compare-strings",
				"choiceList": [
					{
						"comparator": "StringDoesNotEquals",
						"nextStep": "Loop",
						"variableA.$": "$.hTTPRequest.body",
						"variableB.$": "$.null"
					}
				],
				"defaultStep": "End Step - Success 1",
				"description": null,
				"displayName": "",
				"type": "choice"
			},
			"End Step - Success": {
				"actionId": "sp:operator-success",
				"displayName": "",
				"type": "success"
			},
			"End Step - Success 1": {
				"actionId": "sp:operator-success",
				"displayName": "",
				"type": "success"
			},
			"Get Identity": {
				"actionId": "sp:get-identity",
				"attributes": {
					"id.$": "$.trigger.identity.id"
				},
				"displayName": "",
				"nextStep": "HTTP Request",
				"type": "action",
				"versionNumber": 2
			},
			"HTTP Request": {
				"actionId": "sp:http",
				"attributes": {
					"authenticationType": "OAuth",
					"jsonRequestBody.$": "{\n  \"indices\": [\n    \"identities\"\n  ],\n  \"query\": {\n    \"query\": \"isManager:true\" \n  }\n}",
					"method": "post",
					"oAuthClientId": "c8f99a589ae045fc95f06f752872f698",
					"oAuthClientSecret": "$.secrets.5a7931ec-58df-4281-80a8-a9ce39c4bc82",
					"oAuthCredentialLocation": "oAuthInHeader",
					"oAuthTokenUrl": "https://mytenant-sb.api.identitynow.com/oauth/token ",
					"requestContentType": "json",
					"requestHeaders": {
						"Accept": "application/json",
						"Content-Type": "application/json"
					},
					"url": "https://mytenant.api.identitynow.com/v2025/search",
					"urlParams": null
				},
				"displayName": "",
				"nextStep": "Compare Strings",
				"type": "action",
				"versionNumber": 2
			},
			"Loop": {
				"actionId": "sp:loop:iterator",
				"attributes": {
					"context.$": "{\n  \"indices\": [\n    \"identities\"\n  ],\n  \"query\": {\n    \"query\": \"isManager:true\" \n  }\n}",
					"input.$": "$.hTTPRequest.body",
					"start": "Form",
					"steps": {
						"Form": {
							"actionId": "sp:forms",
							"attributes": {
								"deadline": "5d",
								"formDefinitionId": "48b7a5c7-a147-4984-8c48-f0f025222d2b",
								"inputForForm_newManager.$": "$.getIdentity.attributes.managerDoManager",
								"notificationSubject.$": "$.trigger.identity.name",
								"recipient.$": "$.getIdentity.attributes.managerDoManager",
								"reminder": "3d",
								"reminderBody": null
							},
							"displayName": "",
							"type": "action",
							"versionNumber": 1
						}
					}
				},
				"displayName": "",
				"nextStep": "Send Email",
				"type": "action",
				"versionNumber": 1
			},
			"Send Email": {
				"actionId": "sp:send-email",
				"attributes": {
					"context": {}
				},
				"displayName": "",
				"nextStep": "End Step - Success",
				"type": "action",
				"versionNumber": 2
			}
		}
	},
	"creator": {
		"type": "IDENTITY",
		"id": "7281e0eb5f2849e293be91f2bd195d01",
		"name": "Gustavo.kazakeibic_Admin"
	},
	"trigger": {
		"type": "EVENT",
		"attributes": {
			"attributeToFilter": "cloudLifecycleState",
			"filter.$": "$.changes[?(@.attribute == \"cloudLifecycleState\")]",
			"id": "idn:identity-attributes-changed"
		}
	}
}

Hi @kazakeibic

Please make sure to mask your private tenant related data in any of your post/replies or in your JSON code.

Try the attached JSON code for the first workflow in your sandbox environment. You will need to change your details e.g workflow creator, tenant details etc accordingly.

You will need to create a form as shown in the attached screenshot. When the workflow executes, it will send a notification including a form link to the manager to provide a new manager name.

The second workflow should take the new manager input once the form is submitted.

Let me know how it goes …

ReassignnonemployeesTest20250528.json (4.3 KB)

Hi @nhassan

We managed to make good progress in the workflow, but I came across another error that I’ve already seen in another forum:

We managed to make good progress in the workflow, but I came across another error that I have already seen in another forum:

In the Array, we are passing the parameters, again Manager, does that make sense?

Sorry for the questions, but thanks for the support

Regards

Create a form where the current manager picks a new person for non-employees. When the form is submitted, trigger a workflow to start the process. The workflow finds all non-employees under that manager. Then it updates their manager attribute to the new person. Finally, you can send a notification to confirm the change.

Can you give me some more info on this?

-In which step of the workflow, do you see this error?

-Can you explain/clarify this a bit more? i.e “in the Array, we are passing the parameters, again Manager, does that make sense?”

FYI - once the form link is sent to the manager, then only the manager can fill out the form (provide a new manager name) by using their own SailPoint login, otherwise it will throw an error message if someone else tries to fill out the form by clicking on the link.
The Form action assigns the selected form to the specified user with a set deadline. The user receives an email notification with a link to fill out the form. The workflow is paused until the user completes and submits the form.