How to: Update Entity Type State
For information about prerequisites, see Integrate with Entities.
To update the state of an Entity Type, call the Update Entity Type State endpoint. The following example shows a request body for configuring the state machine for Entity Type:
{
"states": [
{
"name": "onboarding",
"defaultSubState": "onboarding",
"subStates": [{
"name": "onboarding",
"transitions": [{
"eventCode": "E-001",
"destination": "active:active"
}],
"ttl": {
"time": "40s",
"destination": "onboarding:onboarding"
}
}]
},{
"name": "active",
"defaultSubState": "active",
"subStates": [{
"name": "active",
"transitions": [{
"eventCode": "E-002",
"destination": "inactive:inactive"
}],
"ttl": {
"time": "40s",
"destination": "active:active"
}
}]
},{
"name": "inactive",
"defaultSubState": "inactive",
"subStates": [{
"name": "inactive",
"transitions": [{
"eventCode": "E-004",
"destination": "inactive:inactive"
}],
"ttl": {
"time": "40s",
"destination": "inactive:inactive"
}
}]
}
],
"terminalTTL": "300s",
"callback": "https://examplecallbackurl.com"
}
Updated 3 months ago