Nesting transforms with lookup

My first post and question so please be gentle.
I want to create a transform that will generate a unique LDAP path.
It involves a prefix, a username generator, a lookup and a suffix.


"type": "concat",
    "attributes": {
        "values": [
            "prefix",
            {
                "attributes": {
                    "sourceCheck": true,
                    "patterns": [
                        "$fn $ln${uniqueCounter}"
                    ],
                    "ln": {
                        "type": "identityAttribute",
                        "attributes": {
                            "name": "lastname"
                        }
                    },
                    "fn": {
                        "type": "identityAttribute",
                        "attributes": {
                            "name": "firstname"
                        }
                    }
                }
            },
            {
               SOME TRANSLATION TABLE BASED ON IDENTITY ATTRIBUTE
            },

            "suffix"
]
},
}

My question is how to I use the lookup within another transform, based on another attribute. In my case it is identity attribute, but it can also be an account attribute.

Many thanks in advance

Hi @ninou

Welcome to SailPoint Developer community. Even if it is not your first post, we are here to help you :slight_smile:

Try this transform. I have added Lookup entry for location, you can change as per your requirements.

Please note that, you need to use this Transform at Account side, not Identity side as unique counter works only at Account side.

{
    "type": "concat",
    "attributes": {
        "values": [
            "prefix",
            {
                "attributes": {
                    "sourceCheck": true,
                    "patterns": [
                        "$fn $ln${uniqueCounter}"
                    ],
                    "ln": {
                        "type": "identityAttribute",
                        "attributes": {
                            "name": "lastname"
                        }
                    },
                    "fn": {
                        "type": "identityAttribute",
                        "attributes": {
                            "name": "firstname"
                        }
                    }
                }
            },
            {
                "attributes": {
                    "input": {
                        "attributes": {
                            "name": "location"
                        },
                        "type": "identityAttribute"
                    },
                    "table": {
                        "USA": "Americas",
                        "FRA": "EMEA",
                        "AUS": "APAC",
                        "default": "Unknown Region"
                    }
                },
                "type": "lookup",
                "name": "Lookup Transform"
            },
            "suffix"
        ]
    }
}

Thanks
Krish

1 Like

Thank you so much Krish!

Let me add one more twist.
I have a lookup transform as the table is very big, but it’s only a table.
How to I refer to it from what you wrote ?

Something like this ?

{
                "attributes": {
                    "input": {
                        "attributes": {
                            "name": "location"
                        },
                        "type": "identityAttribute"
                    },
                    {
                        "attributes": {
                            "id": "NAME OF EXISTING TRANSFORM"
                        }
                       "type": "reference"
                },
                "type": "lookup",
                "name": "Lookup Transform"
            }

Many thanks in advance
Nino

If you already developed lookup transform for the table of data and if it has input already in the Transform, then you can just reference it.

{
    "attributes": {
        "id": "NAME OF EXISTING TRANSFORM"
    }
    "type": "reference"
}

Incase if you are passing input from attribute mapping and doesn’t have input then add input to the existing lookup Transform.

By the way, I hope input is same in both places.

Thanks
Krish

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