Skip to content

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:

addActivityLogAdds an activity log to a Ticket
addTagAdds a tag to a Ticket
createItemAdds a new Ticket Item to a Ticket
createItemRelationAdds a new graph node relation to a Ticket Item
createRelationAdds a new graph node relation to a Ticket
deleteItemRemoves a Ticket Item from a Ticket
deleteItemRelationRemoves a graph node relation from a Ticket Item
deleteRelationRemoves a graph node relation from a Ticket
generateTicketNumberByPrefixGenerates a ticket number for a Ticket based on the given prefix
removeTagRemoves a tag from a Ticket
setChannelKeySets the channel key of a ticket.
setDynamicFieldsSets dynamic fields of a ticket. Non specified fields will be left unchanged. Set value to null to remove field.
setItemDynamicFieldsSets 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.

© 2024 Hantera AB. All rights reserved.