Control Group Workflow Interface Contracts
Changed on:
25 Oct 2023
Detailed Description
When need to be updated, activated, deactivated, etc. These contracts are how to interact with the workflows to triggers these updates.
ActivateControl Event
This is used anytime an external (anything from outside this ) 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 is used anytime an external (anything from outside this ) 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 is used anytime an external (anything from outside this ) update of a QUANTITY_BUFFER control is triggered.
Request Payload
Property | Description | Type | Required? |
controlValue | The buffer value | Int | Required |
executionOrder | The of the execution of | 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}