Control Group Workflow Interface Contracts
Changed on:
25 Oct 2023
Detailed Description
When Controls need to be updated, activated, deactivated, etc. These contracts are how to interact with the workflows to triggers these updates.
ActivateControl Event
This event is used anytime an external (anything from outside this workflow) control activation is triggered.
Event Request Example
1{
2 "retailerId": "<retailerId>",
3 "name": "ActivateControl",
4 "entityType": "CONTROL",
5 "entityRef":"<control_ref>",
6 "rootEntityType": "CONTROL_GROUP",
7 "rootEntityRef": "<control_group_ref>",
8 "entitySubtype": "<type>"
9}
DeactivateControl Event
This event is used anytime an external (anything from outside this workflow) control deactivation is triggered.
Event Request Example
1{
2 "retailerId": "<retailerId>",
3 "name": "DeactivateControl",
4 "entityType": "CONTROL",
5 "entityRef":"<control_ref>",
6 "rootEntityType": "CONTROL_GROUP",
7 "rootEntityRef": "<control_group_ref>",
8 "entitySubtype": "<type>"
9}
UpdateControl Event
This event is used anytime an external (anything from outside this workflow) update of a QUANTITY_BUFFER control is triggered.
Request Payload
Property | Description | Type | Required? |
controlValue | The buffer value | Int | Required |
executionOrder | The order of the execution of controls | Int | Required |
Event Request Example
1{
2 "retailerId": "<retailerId>",
3 "name": "UpdateControl",
4 "entityType": "CONTROL",
5 "entityRef":"<control_ref>",
6 "rootEntityType": "CONTROL_GROUP",
7 "rootEntityRef": "<control_group_ref>",
8 "entitySubtype": "QUANTITY_BUFFER",
9 "attributes": {
10 "controlValue": -555,
11 "executionOrder": 1
12 }
13}
`
`
CREATE Event
Event Request Example
1{
2 "retailerId": "<retailerId>",
3 "name": "CREATE",
4 "entityType": "<entity type>",
5 "entityRef":"<control_ref>",
6 "rootEntityType": "CONTROL_GROUP",
7 "rootEntityRef": "<control_group_ref>",
8 "entitySubtype": "<subtype>"
9}