# Transforms to pull manager name, manager email & vpdepthead based on managerID & level

**URL:** <https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, sailpoint-identity-security\
**Created:** [July 31, 2024, 4:43pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992 "2024-07-31T16:43:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![osmanmohammed](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@osmanmohammed](https://developer.sailpoint.com/discuss/u/osmanmohammed)\
**Post date:** [July 31, 2024, 4:43pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992/1 "2024-07-31T16:43:26Z")

</div>

3 transforms:

1. if the managerID is only having 4 digit  
first to append 000000 as prefix - it should be a 6 digit number & we are getting 5 or 4 digits manager id  
for example : HR is sending 4 digit manager id- 4321 and sailpoint looks for 004321  
need conversion then pulling up the right name.

solution is leftpad will work

1. pulling up manager email

```auto
{
  "attributes": {
    "name": "Cloud Services Deployment Utility",
    "operation": "getReferenceIdentityAttribute",
    "uid": "manager",
    "attributeName": "email"
  },
  "type": "rule",
  "name": "Get manager name from email"
}

```

1. based on if the identity manager level is 13 or 14 then it should lookup all the way up and bring the level 13/14 manager name/email (vpdepthead). need to add level logic

```auto
{
        "name": "vpdepthead transform",
        "type": "firstValid",
        "attributes": {
            "ignoreErrors": "true",
            "values": [
                {
                    "type": "static",
                    "attributes": {
                        "igoreErrors": "true",
                        "vpdepthead": "$identity.getManager().getStringAttribute('email')",
                        "value": "$vpdepthead"
                    }
                },
                ""
            ]
        },
        "internal": false
    }

```

we tried this transform but it is not pulling up any details  
any inputs would help

thanks  
osman

---

<div class="post-metadata">

**Author:** ![sreeram](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sreeram/32/25311_2.png) [@sreeram](https://developer.sailpoint.com/discuss/u/sreeram)\
**Post date:** [July 31, 2024, 4:53pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992/2 "2024-07-31T16:53:56Z")

</div>

Have you tried the Transform Helper AI-bot ?

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [July 31, 2024, 5:07pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992/3 "2024-07-31T17:07:11Z")

</div>

The AI tools are only accessible to Ambassadors.

---

<div class="post-metadata">

**Author:** ![osmanmohammed](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@osmanmohammed](https://developer.sailpoint.com/discuss/u/osmanmohammed)\
**Post date:** [July 31, 2024, 5:20pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992/4 "2024-07-31T17:20:47Z")

</div>

oh in that case what help i could reach out to ?

---

<div class="post-metadata">

**Author:** ![osmanmohammed](https://avatars.discourse-cdn.com/v4/letter/o/e0b2c6/32.png) [@osmanmohammed](https://developer.sailpoint.com/discuss/u/osmanmohammed)\
**Post date:** [August 1, 2024, 7:44pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992/5 "2024-08-01T19:44:04Z")

</div>

first converting 3 digit manager id to 6 digit by applying leftpad  
and then tried to pull manager displayName

{  
“attributes”: {  
“values”: {  
“attributes”: {  
“attributes”: {  
“padding”: “0”,  
“length”: “6”,  
“input”: {  
“attributes”: {  
“sourceName”: “SuccessFactors”,  
“attributeName”: “ManagerID”  
},  
“type”: “accountAttribute”  
}  
},  
“type”: “leftPad”,  
“sourceName”: “SuccessFactors”,  
“attributeName”: “displayName”  
},  
“type”: “accountAttribute”  
}  
},  
“type”: “firstValid”,  
“name”: “Manager name Transform test”  
}

this dint worked

@jesvin90

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [September 30, 2024, 7:44pm UTC](https://developer.sailpoint.com/discuss/t/transforms-to-pull-manager-name-manager-email-vpdepthead-based-on-managerid-level/74992/6 "2024-09-30T19:44:36Z")

</div>

Closed on September 30, 2024, 7:44pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
