Message: ticket.applyCommands
Applies a list of commands to a Ticket. You can send in several commands in one request for batch processing. However, if one command fails, the entire message fails.
Schema
Body
commands | array of command An array of [Ticket commands](/resources/actors/custom/ticket/commands/) to be applied. If any command fails, the asset will not be updated and the message will fail. |
Response Type
stringRelevant Rule Hook
This Rule Hook is run every time an applyCommands message is sent to a Ticket:
Example: Add a Tag to a Ticket
Add a Tag to a Ticket
In this example, we will add a `newTicket` tag to an existing Ticket instance. **Request** ```json [{ "type": "applyCommands", "body": { "commands": [ { "type": "addTag", "key": "newTicket" } ] } }] ```
An improperly formed request will raise an INVALID_COMMAND error, while an incorrect TICKET ID or invalid URL will raise a NOT_FOUND error.