Adding a User Action to your Workflow
Author:
Fluent Commerce
Changed on:
16 Nov 2023
Key Points
- User actions allow to manually trigger specific events in the Workflow.
- User Actions can be added, changed, or removed.
- User actions can be added via UI or via the Workflow JSON.
Steps
Adding a User Action to your Workflow
Adding a User Action to your Workflow via the UI
User Actions
The User Actions section provides the option to link human interactions and automated workflows, and allow orchestrated business logic to apply to buttons on the Fluent OMS and Fluent Store applications.

You can add, change, or remove User Actions from this section.
To configure a User Action, either click on the "Add User Action" button or click on the existing User Action button. This will slide out an additional screen section to the left of the Edit Ruleset area.
The User Action screen has four fields; Button Label, Type, Modules, and Confirmation Required.
Working with User Actions
User Actions provide the ability to integrate human interaction with orchestrated workflows and business logic. This brings powerful capabilities to the User Interfaces used by users both in store and from head office.
Clicking on the "Add User Action" button will slide out the User Action form on the left of the Ruleset panel.
Configuring User Actions involves linking a Button Configuration with a Trigger and a Ruleset.
1{
2 "name": "OrderCancel",
3 "description": "Order is Cancelled from Fluent",
4 "type": "ORDER",
5 "subtype": "HD",
6 "eventType": "NORMAL"
7
8}
Language: json
Name: Example
Description:
[Warning: empty required content area]This is controlled when accessing the workflow via the Import/Export link to view the workflow in JSON format.
User Action button configuration
Button configuration captures the button label, button type, modules to 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 also required 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 click on an ellipses button for extended options first.
The Modules selector allows users to assign the Button to a web app, such as the Fluent Store or Fluent OMS. At least one Module is required. The web apps available for selection can be configured via an Account level Setting,
`fc.mystique.apps`
Finally, the 'Confirmation Required' checkbox indicates whether or not the UI should prompt the user for confirmation of the action, prior to execution.
Adding a User Action via the Workflow JSON
User Action schema
JSON Key | Value Type | Mandatory | Description |
eventName | String | YES | Name of the Ruleset that contains the User Action |
context | Array | YES | An array that contains information about where the User Action will appear and if it requires a confirmation step. See the Context schema below for more information. |
attributes | String | No | Attributes that can be collected via the confirmation Modal. |
CONTEXT SCHEMA
JSON Key | Value Type | Mandatory | Description |
label | String | YES | The label of the button produced by the User Action in the UI |
type | String | YES | Determines the button type. There are two accepted values,
|
modules | Array | YES | Determines what App or UI Manifests the User Action will appear in. To make a user action appear in Fluent Store add
|
confirm | Boolean | YES | Determines if a User Action must be confirmed via a confirmation Modal. |
User Action sample
1{
2 "userActions": [
3 {
4 "eventName": "{{eventName}}",
5 "context": [
6 {
7 "label": "{{label}}",
8 "type": "{{type}}",
9 "modules": [
10 "{{modules}}",
11 "{{modules}}"
12 ],
13 "confirm": false
14 }
15 ],
16 "attributes": []
17 }
18 ]
19}
Language: json
Name: User Action sample
Description:
[Warning: empty required content area]Troubleshooting a User Action
When a User Action is triggered, i.e. a button on the UI is clicked & confirmed, an External Event is triggered using the event/sync Event API endpoint. To investigate the payload and the result of the event execution the browser’s Developer Tools can be used (see Overview - Chrome Developers).
The “Network” tab will contain the details of the Event API call performed including information such as:
- Request URL
- Bearer token
- Event payload
- Response event id
Request Headers

Event Payload

With the information provided the exact API call can be investigated and if required replicated.