Fluent Commerce Logo
Docs
Sign In

Working with Rulesets

Essential knowledge

Author:

Fluent Commerce

Changed on:

16 Jan 2025

Overview

In this section you will learn all about Rulesets and how they can be configured using the Workflow Builder.

Key points

  • Rulesets define the rules that are executed when an Event matching the ruleset trigger criteria is received by the Workflow Engine.
  • Rulesets can be added and edited via the Workflow Builder.
  • Each Ruleset has a name, applicable trigger statuses, and list of rules or user actions.
  • Triggers define when a Ruleset is valid to be executed for a given entity.
  • It's possible to configure User Actions to appear in the Fluent Web Apps, which trigger business logic as defined in the corresponding Ruleset configuration.

Rulesets define the rules that are executed when an Event matching the ruleset trigger criteria is received by the Workflow Engine.

In the image shown below, green icons represent one or more Rulesets.

  • Rulesets inside of the Status circles are triggered on that State.
  • Rulesets outside of the Status circles transition the entity to the state as indicated by the lines and arrows.
No alt provided

You can add new Rulesets via an existing list or the Entity Workflow Swim lane. Clicking on the green icon reveals a list of Rulesets configured within that state or transition.

Each Ruleset displays the following:

  • Name of the Ruleset
  • Statuses for which the Ruleset applies
  • Trigger description
  • List of Rules and/or User Actions

In the image shown below,  the Ruleset name is CREATE, and the current status is CREATED:

No alt provided

Clicking on a Ruleset Name brings up its details on a slide-out panel on the right-hand side of the screen. The panel has the following sections:

  • Trigger
  • User Actions
  • Rules
  • Attributes (optional depending on rule configuration)

In the image below, TriggerUser Actions and Rules sections can be seen:

No alt provided

Each of these sections can expand or collapse by clicking on the section header. The expand/collapse feature makes it much easier to work with large Rulesets.

Working with Triggers

Trigger statuses define when a Ruleset is valid to be executed for a given entity.

E.g., a change to the delivery address of a Home Delivery Order may only be applicable while the Order is in a Booked State.

 This section provides a Description text box and a Statuses selector:

No alt provided
Working with User Actions

User Actions provides the option to configure a human user action for a ruleset and allows orchestrated business logic to be triggered by buttons in the Fluent Web Apps.  

To configure a User Action, click on the Add User Action button — this will slide out an additional screen section to the left of the Edit Ruleset area.

No alt provided

Configuring User Actions involves linking a Button Configuration with a Trigger and a Ruleset. The Button Configuration captures the Button LabelButton Type (type of button), Module Selector (where the button should be displayed), and Confirmation Required check

  • Button Label —is a required field and provides the label that will be printed on the button when displayed on the User Interface.
  • Button Type — is a required field and can be either Primary or Secondary. This indicates whether the button is displayed as a Primary or Secondary action in the UI. Secondary actions may not be visible without clicking on an ellipses button for extended options first.
  • Modules selector — allows users to assign the button to a web app, for example Fluent OMS web app or Fluent Store web app.  At least one Module is required. 
  • Confirmation Required checkbox — indicates whether or not the UI should prompt the user for confirmation of the action, prior to execution.

At least one Module is required — the web apps available for selection can be configured via an Account level Setting, fc.mystique.apps

Working with Rules

The Rules section is where all the Rules in the Ruleset are displayed. The Rules in a Ruleset will be executed in the order displayed, from top to bottom.

No alt provided

Clicking the Add Rule button brings up the Rule Library panel on the left of the Ruleset panel.  Here, you will find a list of all available Rules based on which Rule Plugins are installed (and Active) for the given Account and Workflow.   You can addchange, or remove Rules in this section, as well as use drag and drop to change the order of execution.

Most Rules will provide input areas for their required parameters or configuration. 

E.g., the Change State Rule requires the new Status to be provided so that the rule knows what state to change the entity to.

  • Search box: quickly find any Rules by filtering the Rule List as you type. Clicking on a Rule within the list will add it to the Ruleset Rules section in readiness for the configuration of required input parameters.
  • Input Parameters:  Rules, in most cases, require specific input parameters in order to execute their intended logic. These will be displayed, and provide a mechanism with which to capture the values. Where possible, these will be data type relevant. 
No alt provided

Rules in a Ruleset will be executed in the order displayed, from top to bottom.   You can add, change, or remove Rules in this section, as well as use drag and drop to change the order of execution.

  • Changing Order:  You can change the order of the Rules in the Ruleset by drag and drop.
  • Removing a Rule:  To remove a Rule, click the TrashCan icon on the right side of the Rule, visible on mouse over.

Users can make changes to the workflow directly from within the Workflow Editor —An Import / Export button is available within the Workflow Editor) allowing users to view, edit, and save changes to the workflow directly via JSON.

No alt provided
Fluent Commerce

Fluent Commerce

Copyright © 2025 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.

Fluent Logo