Workflow: Types and statuses
Every ticket has a workflow type and a status. The type says what kind of work it is, such as an inspection or a repair, and which statuses that work moves through. Statuses are shared across the account, and each type picks the ones it uses and the moves allowed between them.
This article will cover how to manage statuses and types, and how a type's status flow is set. You can read about tickets in Workflow: Tickets.
Statuses
Below is the data model for a status. A ticket is finished when its status is an end status.
Get a list of statuses
Get status by ID
You can create a status by setting the ID as '0', or update one by its ID. When updating, only the properties you include are changed.
Create or update status
A status cannot be deleted while a ticket, schedule or type still uses it.
Delete status
Types
Below is the data model for a type. When a ticket is created, it starts in the type's default status and queue, and its own Entity is created with the type's Entity Type.
Get a list of types
Get type by ID
You can create a type by setting the ID as '0', or update one by its ID. When updating, only the properties you include are changed.
Create or update type
Deleting a type also deletes every ticket and schedule of that type. Its Entity Type is deleted too, when it holds nothing but those tickets and no other type uses it.
Delete type
Types: Status flow
A type's "StatusSettingsDiagram" is the flow chart Operator draws for it. Each shape is a status the type uses, and each connection is a move allowed from one status to another.
Saving a type with a diagram replaces its statuses and allowed moves with the ones in the diagram, so always send the whole diagram.
Here is a flow where a ticket moves from "In progress" (4) to "Testing" (6), and from there to either "Complete" (7) or "Failed" (8).
Types: Enabled statuses
You can request the statuses a type uses, each with the status IDs a ticket can move to next. Use this to offer only the allowed moves, as the API does not check them when a ticket is updated.
Get a type's statuses
You can also add or remove statuses without changing the diagram. These do not change the allowed moves, and the next save of the type with a diagram replaces them.