Retrieving Another Account Profile Attribute in an Attribute Generator Rule

Hi all. We are building an email generator through cloud-executed attribute generator rule. However, we encounter one use case, which is in certain scenario in the rule, we will use the sAMAccountName as part of the email generation, while other logics will be handled in the rule. Both generations are quite complex and thus must be handled in cloud rules instead.

We understand that through static field, [email protected] is the way if we place this attribute above the mail attribute in the create account provisioning policy, however how do we retrieve this in the attribute generator cloud rule? Appreciate your input on this. Thank you.

The rule transform can implement variables within the attributes list. These variables can be defined as static string values or even as the results of other transforms. Any variables defined here are passed to the rule and are available for calculation within that code. Ex. You can pass myAttr variable to the rule.

Account Create Profile snippet:

{
   "attributes": {
       "cloudRequired": "true"
   },
   "isRequired": false,
   "multi": false,
   "name": "Account Attribute Name",
   "transform": {
       "attributes": {
           "myAttr": {
               "attributes": {
                   "value": "[email protected]"
               },
               "type": "static"
           },
           "name": "Your Rule name"
       },
       "type": "rule"
   },
   "type": "string"
}

Rule snippet:

String myAttrValue = StringUtils.trimToNull(myAttr);

Hope this helps!

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