Question about using an identity attribute in the negativeCondition of a conditional transform

I have a nested conditional transform that evaluates the organization attribute across multiple levels. The last conditional references an identityAttribute (aliasAttribute) in its negativeCondition.

When trying to reference this attribute, the transformation throws an error:

Error rendering template: $aliasAttr

Example:

{
  "name": "Example Nested Conditional Transform",
  "type": "conditional",
  "attributes": {
    "expression": "$organization eq ORG1",
    "positiveCondition": "RESULT1",
    "negativeCondition": "$condLevel2",
    "organization": {
      "attributes": {
        "name": "organization"
      },
      "type": "identityAttribute"
    },
    "condLevel2": {
      "type": "conditional",
      "attributes": {
        "expression": "$organization eq ORG2",
        "positiveCondition": "RESULT1",
        "negativeCondition": "$condLevel3",
        "organization": {
          "attributes": {
            "name": "organization"
          },
          "type": "identityAttribute"
        },
        "condLevel3": {
          "type": "conditional",
          "attributes": {
            "expression": "$organization eq ORG3",
            "positiveCondition": "RESULT1",
            "negativeCondition": "$aliasAttr",
            "organization": {
              "attributes": {
                "name": "organization"
              },
              "type": "identityAttribute"
            },
            "aliasAttr": {
              "type": "identityAttribute",
              "attributes": {
                "name": "aliasAttribute"
              }
            }
          }
        }
      }
    }
  },
  "internal": false
}

  • Level 1: $organization eq ORG1 → positiveCondition = "RESULT1", negativeCondition = $condLevel2

  • Level 2: $organization eq ORG2 → positiveCondition = "RESULT1", negativeCondition = $condLevel3

  • Level 3: $organization eq ORG3 → positiveCondition = "RESULT1", negativeCondition = $aliasAttr

I’m not sure how to reference an identity attribute in negativeCondition for nested conditionals. Any advice?

Hi @AntonioGvtt You seem to be referencing Identity Attribute “aliasAttribute” in your transform, but reference “aliasCompany” in your post? Also, ensure case sensitivity on the technical name of the Identity Attribute.

Hi, thanks for pointing that out! The reason for the mismatch is just that I used generic attribute names in the ticket for privacy, and I didn’t update one of them—so it’s not an actual error.

Anyway, I’ve already fixed it in the transform by using a firstValid conditional instead of directly referencing an identity attribute, like this:

"aliasAttr": {
  "type": "firstValid",
  "attributes": {
    "values": [
      {
        "attributes": {
          "name": "AliasAttribute"
        },
        "type": "identityAttribute"
      },
      {
        "type": "static",
        "attributes": {
          "value": "None"
        }
      }
    ]
  }
}

This way it works correctly even if the identity attribute is missing.

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