Skip to main content

Version: 24.10

Actions

Actions are how you control which Transact Functions need to run throughout an application. As with Pages, actions have a number of properties to control the Narrative behavior defined in their JSON definition.

Actions can be placed inside Pages as preActions or postActions, nextPages (only condition), or inside the Narrative as initializeActions.

Properties

The following properties can be set on any action in the Narrative.

PropertyDescription
simpleNameString
The simple name of the Transact Function that you want to run (used by invokeFormAction() only).
nameString
The service name of the Transact Function you want to run.
versionString
The version of the Transact Function you want to run.
conditionBoolean (Default: true)
Whether an action should be executed. If the value of this property is false or an expression that evaluates to false, this action is skipped.
alwaysProcessBoolean (Default: false)
Whether an action should be executed every time it is encountered.
By default, Actions are executed successfully once only, meaning that if the user navigates back then forward, the action isn't executed again. If this property is true or an expression that evaluates to true, the action runs regardless of whether it was previously run successfully. This can be useful to ensure actions are only re-run when certain data has changed.
paramsMap<String, String> (Default: [:])
Bind arbitrary data into an action as input parameters.
Using parameters allows you to decouple your Form and Functions.
milestoneString
The name of a Journey Analytics milestone to record whenever this action completes successfully.
segmentsList<InsightsSegment>
A list of Journey Analytics segments (name/value) to record whenever this action completes successfully.

Example

{
"name": "FIS - IDV",
"version": "1.0.0",
"condition": "${ !data.get('primaryApplicant').isExistingCustomer() }",
"alwaysProcess": true,
"params": {
"firstName": "${ !data.get('primaryApplicant').firstName }",
"lastName": "${ !data.get('primaryApplicant').lastName }",
"dob": "${ !data.get('primaryApplicant').dateOfBirth }"
},
"segments": [
{
"name": "Segment Name",
"value": "Segment value"
},
{
"name": "Dynamic Segment",
"value": "Segment - ${txn.trackingCode}"
}
]
}