Author:
Fluent Commerce
Changed on:
13 Dec 2023
The Ruleset defines the Rules that are executed when a matching event is produced.
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.
Rulesets inside of the Status rectangles are triggered on that State, while those outside of a status transition the entity to the state in which it's line and arrow indicate.
Clicking on the green icon reveals a list of Rulesets configured within that state or transition.
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:
Each of these sections can expand or collapse by clicking on the section header.
To add a Ruleset to a Workflow JSON, you must add a new Ruleset to the
`Rulesets`
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
|
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 |
1{
2 "rulesets": [
3 {
4 "name": "{{rulesetName}}",
5 "description": "",
6 "type": "{{entity}}",
7 "eventType": "{{eventType}}",
8 "subtype": "{{subtype}}",
9 "rules": [],
10 "triggers": [
11 {
12 "status": "{{statusName}}"
13 }
14 ],
15 "userActions": []
16 }
17 ]
18}
Language: json
Name: Ruleset sample
Description:
[Warning: empty required content area]Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.