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.
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.
| Requirement | Transform pattern | Decision to verify |
|---|---|---|
| Remove leading and trailing spaces, then make text lowercase | Lower with a nested Trim input | Which source supplies the text and how null is handled |
| Normalize several incoming codes to internal labels | Lookup using a default result | Input case and what an unrecognized code should mean |
| Use preferred source data only when a value exists | First Valid with an ordered list | Null, empty string and exception behavior |
| Add a documented interval to a timestamp and compare the result | Date Math and Date Format, then Date Compare | Time zone, normalized input and inclusive versus exclusive boundary |
| Reuse a common data calculation | Reference a defined transform | Dependencies 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.
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?
Map the raw value through Lookup and trim the output.
Read a different source explicitly and assume it has the same value.
Trim the mapped value, lowercase that result, and use it as the Lookup input.
Feed the string to Date Format and use it as an account identifier.
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?
It selects the empty string because that result is non-null.
It always selects the fallback because an empty string is null.
It must throw an error when the first value is empty.
It concatenates the two results.
Sections you finish are checked off in the contents.