Adding a Trigger to a Ruleset
Author:
Fluent Commerce
Changed on:
26 Sept 2023
Key Points
- A Trigger defines when a User Action is applicable to the given entity.
- A trigger can be added via UI or via JSON. If there’s not trigger status for a ruleset, then all statuses are considered as trigger.
Steps
Adding a Trigger to a Ruleset
A Trigger state defines when a Ruleset is applicable to the given entity. For example, a change to the delivery address of a Home Delivery Order may only be applicable while the Order is in a Booked state. Therefore, the Ruleset can only be triggered while the entity is in the Booked state.
Adding a Trigger via the UI
The Triggers section provides a Description text box and a Statuses selector.
The Description field is optional, however, we recommend providing a meaningful description for other workflow viewers to gain context.
The Statuses selector allows one or more Statuses to be selected. You can add or remove Statuses from the Trigger. At least one Status is required on a Ruleset when modifying a Ruleset via the UI.
Adding a Trigger via JSON
Trigger schema
JSON Key | Value Type | Mandatory | Description |
Status | String | YES | The Status that should trigger this Ruleset. |
Trigger sample
1{
2 "triggers": [
3 {
4 "status": "{{statusName}}"
5 }
6 ]
7}
Language: json
Name: Trigger sample
Description:
[Warning: empty required content area]