Collecting Attributes via a User Action
Author:
Fluent Commerce
Changed on:
13 Nov 2023
Key Points
- Adding Attribute details via the UI
- Adding Attribute details via the Workflow JSON
Steps
Collecting Attributes via a User Action
Collecting Attributes via a User Action
Utilizing certain rules can enable you to gather Attributes via a confirmation action when a user interacts with a User Action. For example, additional information such as cancellation reason and cancellation comment needs to be captured as part of order cancellation.
Adding Attribute details via the UI
The Attributes card will appear in the Ruleset UI when at least one Rule is added to the Ruleset with the @EventAttribute annotation.

Adding Attribute details via the Workflow JSON
Attribute schema
JSON Key | Value Type | Mandatory | Description |
name | String | NO | The name of the Attribute |
type | String | NO | Determines the data type the UI component collects |
label | String | NO | The label of the attribute that will be displayed on the UI |
source | String | NO | When the type is
|
defaultValue | String | NO | Default value of the attribute |
mandatory | Boolean | NO | Determines if the attribute collection is mandatory or not. |
1{
2 "attributes": [
3 {
4 "name": "{{name}}",
5 "type": "{{type}}",
6 "label": "",
7 "source": "{{source}}",
8 "defaultValue": "{{defaultValue}}",
9 "mandatory": true
10 }
11 ]
12}
Language: json
Name: Attribute sample
Description:
[Warning: empty required content area]