Fluent Commerce Logo
Sign In

Adding a State to your Workflow with User Action

How-to Guide
Extend

Author:

Fluent Commerce

Changed on:

23 June 2025

Key Points

  • It’s possible to add a new state to an existing workflow by adding a new status to the `Statuses array` of the workflow JSON.
  • Create a simple User Action to allow the user to change the status.

Steps

Step arrow right iconAdding a State to your Workflow

Statuses within the are represented by white rounded rectangles whose border colour matches the lifecycle phase they belong to.

No alt provided

For example, within the Booking phase, the status could be:

  • Created
  • Awaiting Payment
  • Fraud Check
  • Booked

Similarly, within each of the other phases, there could be multiple different states in which the might travel.


Adding a State via the Workflow JSON

To add a State to a JSON, you must add a new Status to the `statuses` array of the JSON that matches the schema outlined below.

Status schema

JSON Key

Value Type

Mandatory

Description

name

String

YES

Name of the status.

entityType

String

YES

Name of the the status belongs to.

category

String

YES

Name of the category the status belongs to.

There are four possible values:

  • BOOKING
  • FULFILMENT
  • DELIVERY
  • DONE
Status sample
1 {
2  "statuses": [
3    {
4      "name": "{{name}}",
5      "entityType": "{{entityType}}",
6      "category": "{{category}}"
7    }
8  ]
9}


Here is an example of how to add a new manager Hold status to an :

Step 1: go to the modeller to view the CC . In the statuses section, add a new status called CS_HOLD

1
2    {
3      "name": "HOLD",
4      "entityType": "FULFILMENT",
5      "category": "BOOKING"
6    },
No alt provided

Step 2: Add a new that provides the to the OMS Webapp, which allows moving the fulfilment to CS_HOLD status if the fulfilment status has not passed the AWAITING_WAVE stage:

1{
2    "name": "CSHOLD",
3    "type": "FULFILMENT",
4    "subtype": "CC_PFS",
5    "eventType": "NORMAL",
6    "rules": [
7        {
8            "name": "{{AccountId}}.core.SetState",
9            "props": {
10                "status": "CS_HOLD"
11            }
12        }
13    ],
14    "triggers": [
15        {
16            "status": "AWAITING_WAVE"
17        }
18    ],
19    "userActions": [
20        {
21            "context": [
22                {
23                    "label": "Hold the Fulfilment",
24                    "type": "PRIMARY",
25                    "modules": [
26                        "adminconsole"
27                    ],
28                    "confirm": true
29                }
30            ],
31            "attributes": []
32        }
33    ]
34},


Step 3: Logon to OMS, then go to -> fulfilment screen. User should able to see a new "HOLD THE FULFILMENT" button on the top right-hand corner:

No alt providedNo alt providedNo alt provided

Except as otherwise stated in the Extend Knowledge Content site policy, the content on this page is licensed under the Creative Commons Attribution 4.0 Licence, and any code samples that appear on this page are licensed under the Apache 2.0 Licence, unless any code sample forms part of the Fluent Order Management Platform code. Neither of these licences apply to any content on any other page that can be reached via a link on this page unless otherwise specified on that other page. If you wish to use any of the Extend Knowledge Content, you must do so in compliance with the licenses referred to above and the Extend Knowledge Content site policy, including attribution in the manner set out on this page. 

Fluent Commerce

Fluent Commerce