Manager name remove employee ID

Hi

We have an auth source, ServiceNow, and the manager’s name is coming firstname lastname and employee ID.

example 1 - John Doe A2345678

output - John Doe

example2 - Andrew Warnes T5678

Output - Andrew Warnes

We need to remove the employee ID and populate the manager’s name.

Is there a way to achieve this?

You cannot remove the data in aggregation, as there are no aggregation Rules like Customization Rule.

But you can display manager name however you want to at identity attributes side using any relevant Transform like Split or Static or Index.

Thanks
Krish

You can create an identity attribute to store and apply transform in it

  "attributes": {
    "input": "The quick brown fox jumped over 10 lazy dogs",
    "regex": "[^a-zA-Z]",
    "replacement": ""
  },
  "type": "replace",
  "name": "Replace Transform"
}
Input: "The quick brown fox jumped over 10 lazy dogs"
Output: "Thequickbrownfoxjumpedoverlazydogs"
type or paste code here

Hi @pkumar22,

Do you get the manager ID from the auth source.?

If so, have you considered setting up the correlation logic in the source to bring in the manager details.?

Here is the link to the documentation

Setting up this correlation will automatically show up the manager name under the Identity.

Also, here is a transform that could work for you :

{
    "name": "Manager_ID_Transform",
    "type": "static",
    "attributes": {
        "managerId": {
            "attributes": {
                "values": [
                    {
                        "attributes": {
                            "attributeName": "Manager",
                            "sourceName": "Employees"
                        },
                        "type": "accountAttribute"
                    },
                    {
                        "attributes": {
                            "value": "NONE"
                        },
                        "type": "static"
                    }
                ]
            },
            "type": "firstValid"
        },
        "value": "#if($managerId != 'NONE')$managerId.substring(0, $managerId.lastIndexOf(\" \"))#{else}#end"
    },
    "internal": false
}
3 Likes

@schattopadhy 's transform uses the replace operation, which can work in this scenario, although you will need to change the regex to match your specific criteria.

@jesvin90 's transform is probably closer to what you want since it will account for empty values and it will strip out the last set of characters, which in your case would be the employee ID.

the below transform is worked

{
    "name": "SNOW-Replace Transformmanager",
    "type": "replace",
    "attributes": {
        "input": {
            "attributes": {
                "attributeName": "manager",
                "sourceName": "ServiceNow"
            },
            "type": "accountAttribute"
        },
        "regex": "[ATP]\\d+",
        "replacement": ""
    },
    "internal": false
}

The transform works well, and I can see the manager’s name in the identity profile preview, but it is not shown in the identity details tab.

I unmapped the manager name in the identity profile and mapped it back, and I ran the aggregation multiple times, but the manager name was not populated.

image

Hi @pkumar22,

You will need to setup the manager correlation as mentioned in my earlier response to get the field populated.

You can either extract the manager ID value instead of manager name and setup the correlation or if you get the manager ID directly, correlation can be mapped against that value.

1 Like

I created a custom correlation identity attribute with a display name and employee number contact and mapped the manager correlation. Now, I can see the manager name in the details tab.

1 Like