Ticket Actor Commands
Ticket commands are methods applied to Tickets via the applyCommands message. They are sent in as an array of commands to be batch-processed on a Ticket ID. If one command fails, all commands fail.
Valid Ticket Actor commands are:
| addActivityLog | Adds an activity log to a Ticket |
| addTag | Adds a tag to a Ticket |
| createItem | Adds a new Ticket Item to a Ticket |
| createItemRelation | Adds a new graph node relation to a Ticket Item |
| createRelation | Adds a new graph node relation to a Ticket |
| deleteItem | Removes a Ticket Item from a Ticket |
| deleteItemRelation | Removes a graph node relation from a Ticket Item |
| deleteRelation | Removes a graph node relation from a Ticket |
| generateTicketNumberByPrefix | Generates a ticket number for a Ticket based on the given prefix |
| removeTag | Removes a tag from a Ticket |
| setChannelKey | Sets the channel key of a ticket. |
| setDynamicFields | Sets dynamic fields of a ticket. Non specified fields will be left unchanged. Set value to null to remove field. |
| setItemDynamicFields | Sets dynamic fields of a ticket item. Non specified fields will be left unchanged. Set value to null to remove field. |
To apply commands to a Ticket, use the below request format. See applyCommands for a specific example.
json
[{
"type": "applyCommands",
"body": {
"commands": [ ]
}
}]The most common pitfall here is forgetting to specify type or improperly forming the command array. These may raise the INVALID_MESSAGE_BODY error.
See applyCommands for a specific example.