Adding a Ruleset to your Workflow
How-to Guide
Author:
Fluent Commerce
Changed on:
14 Sept 2025
Key Points
- The Ruleset, defining the executed actions for matching events, can be added through the UI using either an existing Ruleset list or the Entity Workflow Swimlane.
- Green icons in the Status rectangles represent Rulesets triggered on that State, while those outside a status transition the entity to the indicated state.
- Adding a Ruleset via JSON requires inclusion in the Workflow JSON's Rulesets Array, following a schema with mandatory elements like name, rules, and triggers, and optional elements like description, type, subtype, eventType, and userActions.
Steps
Adding a Ruleset to your Workflow
The Ruleset defines the Rules that are executed when a matching event is produced.Adding a Ruleset via the UI
You can add new Rulesets via either an existing Ruleset list or via the Entity Workflow Swimlane.The green icons represent one or more Rulesets.
Each Ruleset displays a Name, the Statuses for which the Ruleset applies, and a Trigger Description. In the above example, the Ruleset name is Create, and the current status is Created.The Ruleset Name is required as part of the Event that would Trigger the Ruleset to run.Clicking on a Ruleset Name brings up the Ruleset details on a slide-out panel from the right-hand side of the screen.
The Edit Ruleset screen has three sections:- Triggers
- User Actions
- Rules
Adding a Ruleset via JSON
To add a Ruleset to a Workflow JSON, you must add a new Ruleset to the`Rulesets` Array of the Workflow Json that matches the Ruleset schema outlined below.Ruleset schema
| JSON Key | Value Type | Mandatory | Description |
| name | String | YES | Name of the Ruleset. The name cannot contain spaces. This name is used as matching criteria for Events. |
| description | String | NO | Cannot be more than 250 characters. |
| type | String | NO | The entity being processed. |
| subtype | String | NO | The `subtype` of the entity being processed. This can be used when you have multiple entity subtypes and you only want a Ruleset to triggered by one. `subtype` is required if the Ruleset has a User Action. |
| eventType | String | NO | There are three valid event types; NORMAL, EXCEPTION and GENERATED. Most eventTypes will be normal, however you can ues the EXCEPTION type for Rulesets that handle exceptions. |
| rules | String | YES | The array of Rules that will be run when this Ruleset is triggered |
| triggers | Array | YES | A list of statuses that will trigger this Ruleset. |
| userActions | Array | NO | A list of userActions in this Ruleset |