Composing Transforms for Identity Data

Key Takeaways

  • Identify the value, input source, null policy and output format before choosing operations.

  • An explicit input replaces the mapped implicit input for an operation that accepts one.

  • First Valid chooses the first non-null result and has a separate error-handling option.

  • Normalize dates before comparing them and verify behavior at the exact boundary.

Last updated: November 2026

Convert a requirement into operations

Transforms are JSON configurations that calculate values using supported primitives. One transform can contain another as an input, which lets you compose a calculation in stages. Start with the exact desired result, such as a normalized department code, a common country label, or a chosen fallback. Locate the authoritative value, decide whether a missing value or malformed data needs a different outcome, and identify which pieces the operation's actual input accepts.

RequirementTransform patternDecision to verify
Remove leading and trailing spaces, then make text lowercaseLower with a nested Trim inputWhich source supplies the text and how null is handled
Normalize several incoming codes to internal labelsLookup using a default resultInput case and what an unrecognized code should mean
Use preferred source data only when a value existsFirst Valid with an ordered listNull, empty string and exception behavior
Add a documented interval to a timestamp and compare the resultDate Math and Date Format, then Date CompareTime zone, normalized input and inclusive versus exclusive boundary
Reuse a common data calculationReference a defined transformDependencies and the boundary to which the reused transform is mapped

Work a normalized lookup

Suppose a profile maps the HR department code to the target identity attribute. The incoming string is known here to be non-null. The requirement is to trim spaces, lowercase the result, and map OPS to operations, FIN to finance, and unknown codes to unmapped. Apply Trim to the mapped value, feed its output to Lower, and supply the normalized result to Lookup. One transform definition for this input case is:

{
  "name": "Canonical department code",
  "type": "lookup",
  "attributes": {
    "input": {
      "type": "lower",
      "attributes": {
        "input": { "type": "trim", "attributes": {} }
      }
    },
    "table": {
      "ops": "operations",
      "fin": "finance",
      "default": "unmapped"
    }
  }
}

For " OPS ", Trim returns "OPS", Lower returns "ops", and Lookup returns "operations". For "FIN" it returns "finance". A non-null "LAB" has no matching key and returns "unmapped". The innermost Trim uses the implicit value from the profile mapping. If it instead explicitly reads an account attribute from a different source, the transformed result comes from that input. Check the outer object's type and required properties and the inner data before assuming the configured profile field is being used.

Work source preference and dates

First Valid evaluates ordered values until one is non-null. An empty string can satisfy that test, so check whether a feed supplies blanks and how they should be handled. The ignoreErrors flag defaults to false. Set it only if the chosen error should permit the fallback and the resulting data remains meaningful. When an input reads a source through Account Attribute and multiple accounts are eligible, the default ordering starts from the oldest account. By default it can look past a null attribute to the next qualifying account. Sort and filter options plus accountReturnFirstLink can change that behavior. This is value retrieval. It does not select a target account for provisioning.

For a date comparison, identify the transition boundary first. To return a status when the current time reaches or passes a fixed cutoff, put now on the left and the normalized cutoff on the right and use the greater-than-or-equal comparator. At equality it returns the positive value. Date Compare expects ISO 8601 inputs, and the documented Date Math result must be normalized to the appropriate format when passed into it. For example, adding one day to 2026-11-20T14:00:00.000Z yields a cutoff at 14:00 UTC on November 21. Date Math emits minute precision without a zone suffix. Use Date Format to produce the intended UTC ISO 8601 comparison value. A normalized evaluation at 2026-11-21T13:59:00Z takes the negative branch and one at 2026-11-21T14:00:00Z takes the positive branch. Test immediately before, at and after the cutoff. A transform calculation runs when evaluated by the platform. A periodic setting or the word now does not guarantee that the identity is reevaluated at the exact cutoff instant.

See SailPoint’s transform input and nesting, Lookup, First Valid, Account Attribute, Date Math and Date Compare.

Test Your Knowledge

A lookup table matches lowercase department codes. The mapped field arrives as " FIN " and the desired result is "finance". Which flow supplies the correct lookup key?

A

Map the raw value through Lookup and trim the output.

B

Read a different source explicitly and assume it has the same value.

C

Trim the mapped value, lowercase that result, and use it as the Lookup input.

D

Feed the string to Date Format and use it as an account identifier.

Test Your Knowledge

A First Valid transform receives an empty string as its first result and a nonempty fallback as its second. There is no error. What happens?

A

It selects the empty string because that result is non-null.

B

It always selects the fallback because an empty string is null.

C

It must throw an error when the first value is empty.

D

It concatenates the two results.

Sections you finish are checked off in the contents.