Script
Node Card
Category: Logic & Flow Nodes
Type:
scriptTypical position: After authentication or profile resolution, to enrich tokens, enforce custom business rules, or integrate with external services via HTTP calls inside the script.
Properties
Outputs & Errors
| Property | Type | Required | Description |
|---|---|---|---|
| Script | select with search | Yes | The JavaScript script to execute, selected from the Scripts section of the Identity Orchestration configuration. |
| Description | text | No | Optional label shown on the canvas node to describe what this script does. |
| Disable Cancel Button | checkbox | No | When enabled, hides the cancel/loading button shown to the user during script execution. Useful for silent background operations. |
| Error Handling | custommultiselect | No | Add custom error codes defined by the script using hook.setError(). Each selected code becomes a named output edge on the canvas. |
| Output / Code | Condition |
|---|---|
true | Script executed successfully without calling hook.setError() |
false | Script execution failed or threw an unhandled error |
| Custom codes | Any error code raised via hook.setError(code, message, description) within the script, if configured in Error Handling |
note
Scripts can define custom error codes using hook.setError(code, message, description). Add those custom codes in the Error Handling property to route them to dedicated canvas edges. Codes not listed in Error Handling fall through to the false output.
Common Next Nodes
Script (true)→Success Finalscript succeeded: continue the flow
Script (false)→Failure Finalscript failed or threw an error
Usage Notes
The Script node is the primary extensibility point in Identity Orchestration. Use it to add JWT claim enrichment, call external APIs for attribute lookups, enforce custom password policies, or perform any logic not covered by built-in nodes. Scripts run in a sandboxed JavaScript environment with access to the lrObject and hook context objects.