Transform for Auto Provision/Deprovision

Hi Team,

I’m trying to implement a transform against lifecycle states pulled from an authoritative source. As such, the requirement is the technical name must match the lifecycle name. I’m trying to combine a lower + replacement transform to accommodate lifecycle states with spaces (ex. On Leave becomes onleave)

“type”: “lower”,
“attributes”: null, → to lowercase all values to which transform applied to
“type”: “replace”,
“attributes”: {
“regex”: “on leave”,
“replacement”: “onleave” → after the transformation, replace with onleave
}
Unsure if I’m using the correct transforms, I don’t see a trim for spaces within the attribute and the transform isn’t working.

Thank You.

Hi @nyeung,

you can create transform like this:

{
    "name": "Format LifecycleState",
    "type": "lower",
    "attributes": {
        "input": {
            "attributes": {
                "regex": "\\s",
                "replacement": ""
            },
            "type": "replace"
        }
    },
    "internal": false
}

You have many others way to do this.

Once transform is created you can add into your identity profile by specifing also the attribute of your authorative source to map with lifecyclestate identity attribute.

Hi Ousmane,

I’ve tried creating the transform like you’ve mentioned but I receive this error when I try to save:
Failed to save ‘Lifecycle-OnLeave-Provisioning’: Unable to write file ***OnLeave-Provisioning’ (Error: Illegal attempt to modify id, name, type, internal.).
Also will this transform lowercase all attributes I specify in the lifecyclestate?

Thanks.

@nyeung can you share with me the whole transform ?

Message it’s seems like your transform is already created or was already existing and you try to update his name.

Look on your mapping if you see this transform/

Hi Ousmane,

No worries, I’ve created a new transform with the framework you provided and it works. However, I noticed for the regex I needed to code “On Leave” instead of “on leave”. I thought the lower transform would run first followed by the replace

attributes": {
“regex”: “On Leave”,
“replacement”: “onleave”
}

Does the order of operations make sense?

Just for “On Leave” static value ?

Yes On Leave is a static field coming from identity authoritative source. However I thought it’d be transformed to lower case before the ‘replace’ transform ran.

Static field or static value on field into the authoratative source schema ?

Can you add a screenshot of this attribute into your schemas ?

Static value on field from the authoritative source. I’m mapping an attribute from Workday to the lifecyclestate field on IDN. One of values of that attribute is “On Leave”

For that yes your provide value is correct for replacement :

attributes": {
“regex”: “On Leave”,
“replacement”: “onleave”
}

Consider that You have many options todo this:

Option 2 :

{
  "attributes": {
    "table": {
      "On Leave": "onleave",
      "default": {
        "attributes": {
          "attributeName": "your authoritative source attribute name to map with lifecyclestate",
          "sourceName": "Your Authoratative Source Name"
        },
        "type": "accountAttribute",
        "name": "Account Attribute Transform"
      }
    },
    "input":{
      "attributes": {
        "attributeName": "your authoritative source attribute name to map with lifecyclestate",
        "sourceName": "Your Authoratative Source Name"
      },
      "type": "accountAttribute",
      "name": "Account Attribute Transform"
    }
  },
  "type": "lookup",
  "name": "Lookup Transform  Test"
}

Option 3:

{
  "attributes": {
    "lifeCycleAtt": {
      "attributes": {
          "attributeName": "your authoritative source attribute name to map with lifecyclestate",
          "sourceName": "Your Authoratative Source Name"
      },
      "type": "accountAttribute"
    },
    "value": "#if($lifeCycleAtt=='On Leave')onleave#{else}$lifeCycleAtt#end"
  },
  "type": "static",
  "name": "Static Transform Test"
}

The lastone is also simple it think.

You must replace :

  • “your authoritative source attribute name to map with lifecyclestate by your” by your authoritatiive source attribute name.
  • “Your Authoratative Source Name” by your auhoritative source name.
  • Example :
{
      "attributes": {
        "sourceName": "HR Source",
        "attributeName": "empType"
      },
      "type": "accountAttribute"
    }
1 Like

Thanks for the info! This is very helpful :slight_smile:

1 Like

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