How to change the manager automatically?

Hello everyone

I have a problem

I have two fields, MATRICULA_GESTOR and GESTOR_SUBSTITUTO.
MATRICULA_GESTOR is used to correlate a manager, and GESTOR_SUBSTITUTO is used when the first manager’s lifecycle state is vacation or terminated. Is there any way to change the manager without going to the authoritative source?

I did a transform but it didn’t work because the attribute that correlates the manager is MATRICULA_GESTOR

Can anyone help me?


Ana is the first manager who is not correct because her life cycle is terminated.


As you can see, MATRICULA_GESTOR is Ana and GESTOR_SUBSTITUTO is Fernanda, I need Fernanda to appear as Carlos’ manager

Ana is terminated

Fernanda is active

My transform
{
“id”: “9063daa8-498b-4620-b5a8-2089bfd4eff5”,
“name”: “Gui - Gerente Substituto”,
“type”: “static”,
“attributes”: {
“firstManager”: {
“type”: “static”,
“attributes”: {
“value”: “$identity.getManager().getAttribute("cloudLifecycleState")”
}
},
“secondManager”: {
“type”: “static”,
“attributes”: {
“value”: “$identity.getAttribute("secondManager")”
}
},
“value”: “#if($firstManager == ‘terminated’ || $firstManager == ‘vacation’ || $firstManager == ‘leaveOfAbsence’)$secondManager#{else}$firstManager#end”
},
“internal”: false
}

atribute second manager

my correlation manager in my authoritative source

@guilherme_sec Remove UI manager correlation configuration and validate. I think its taking precedence. Or check manager correlation rule

Your transform seems to be incorrect. $firstManager seems to be the LCS of the manager and not the manager itself, and the value should be manager identity and not LCS. Anyways, using transform to validate the LCS of manager and provide the resultant manager, will cause trouble as you can’t decide the processing of identity attributes (LCS and manager field). Therefore, you should use manager correlation rule for this scenario.

I don’t think it works with Transform, you need to remove Manager correlation and setup Manager correlation Rule with the logic.

1 Like

This will not work until and unless you have a Manager Correlation Rule configured. We had the same issue and we got it working only after deploying Manager Correlation Rule

This is the correct response. In this case you cannot assign alternative manager using transform. You need Manager Correlation Rule

2 Likes

Great, thanks guys.

I don’t know how to use the rule, someone help me ?

I need know how to configure a rule with my authoritative source, my source is a type JDBC.

I have already accessed this document before, but I want to know how to configure this code in my source?
How do I configure it?
Is it through VS Code?
Could you describe the steps to me?

This is a cloud rule, which means you need to create a support ticket with SailPoint. All conditions that apply to a cloud rule will be applicable for this too.

Once the rule is deployed, you can update your source using VS Code extension

so, I can’t select a rule type in my VS Code to correlate the manager?

I thought I could select some type of these rules and copy the code and check the code below to see if it works

<?xml version='1.0' encoding='UTF-8'?> Finds a manager based on the manager.email attribute. <![CDATA[

Map returnMap = new HashMap();

String managerEmail = link.getAttribute( “manager.email” );
returnMap.put( “identityAttributeName”, “email”);
returnMap.put( “identityAttributeValue”, managerEmail );

return returnMap;

]]>