The following resources in the Support REST API use the actions property:

The actions property consists of an array of one or more actions to perform if one or more conditions are met or if a macro is run.

Example

{  "actions": [    {"field": "status", "value": "open"},    {"field": "assignee_id", "value": "296220096"}  ]}

Each action in the array has the following properties:

NameTypeDescription
fieldstringThe name of a ticket field to modify
valuestringThe new value of the field

Example

{"field": "status", "value": "solved"}

Shared actions

Ticket triggers, automations, and macros share the following actions.

fieldvalue
statusSets the ticket status. Takes "new", "open", "pending", "hold", "solved", or "closed", except for macros, which don't take "new" or "closed"
typeSets the ticket type. Takes "question", "incident", "problem", or "task"
prioritySets the ticket priority. Takes "low", "normal", "high", or "urgent"
group_idAssigns the ticket to a group. Takes a string with a group id, or an empty string ("") to unassign the group assigned to the ticket
assignee_idAssigns the ticket to a person. Takes a string with the user id of an assignee or requester, or "current_user", or an empty string ("") to unassign the person assigned to the ticket
set_tagsA space-delimited list of tags to insert in the ticket. The action replaces the current tags
current_tagsA space-delimited list of tags to add to existing tags
remove_tagsA space-delimited list of tags to remove from existing tags
custom_fields_Sets the value of a custom ticket field
custom_status_idThe custom ticket status id
ticket_form_idSets the ticket form used for the ticket
followerAdds a user as a follower on a ticket
share_ticketShares the ticket with an account that has a ticket sharing agreement

Additional actions for ticket triggers and automations

In addition to the shared actions, ticket triggers and automations share the following actions.

fieldvalue
satisfaction_scoreSends a survey request to the ticket requester. Takes "offered" as a value
notification_userSends an email to a user. Takes an array of three strings specifying the email recipient, subject, and body. See Notification emails. Possible recipient value: "current_user", "all_agents" (all non-restricted agents), "requester_id" (the current requester), "assignee_id" (the current assignee), or the numeric ID of an agent
notification_groupSends an email to a group. Takes an array of three strings specifying the email recipient, subject, and body. See Notification emails. Possible recipient value: "group_id" (the currently assigned group), or the numeric ID of a group
notification_targetSends a message to an external target. Takes an array of two strings specifying the numeric ID of the target and the message body
notification_webhookSends a message to an active webhook. Takes an array of two strings specifying the unique ID of the webhook and the message body
tweet_requesterResponds to the X (formerly Twitter) requester with a tweet. Takes the text of the tweet
ccCC's somebody on the ticket. Takes "current_user" or the numeric ID of an agent
locale_idSets the requester's language to one of your supported languages. Takes the numeric ID of a supported locale. See List locales to list the available locale IDs for the account
requester.custom_fields.<field_key>Sets the value of a custom user field. The corresponding value property can be any string for a text field, or the id of an option for a dropdown field. An option id must be specified as a string. For a field's key or option id values, see Show User Field in User Fields

Additional actions for ticket triggers

In addition to the shared actions, ticket triggers have the following actions.

fieldvalue
brand_idA brand to add to the ticket
followerA follower to add to the ticket
add_skillsA comma-delimited list of skills to insert into the ticket. Requires omnichannel routing to be enabled. (Professional plans and above)
set_skillsA comma-delimited list of skills to insert into the ticket. This action replaces all current skills. Requires omnichannel routing to be enabled. (Professional plans and above)
remove_skillsA comma-delimited list of skills to remove from the ticket. Requires omnichannel routing to be enabled. (Professional plans and above)
ticket_fields_{id}A custom ticket lookup relationship field pointed to Users
lookup:ticket.ticket_fields_{id}.custom_fields.{key}A custom ticket lookup relationship field pointed to a custom object's field

Additional actions for macros

In addition to the shared actions, macros have the following actions.

fieldvalue
subjectReplaces the subject of a ticket. Takes the subject text
comment_valueAdds a comment to a ticket. Takes the comment text or an array of two strings specifying the comment channel and comment text. Possible comment channels : "channel:all", "channel:web" and "channel:chat"
comment_value_htmlAdds a rich-text comment to a ticket
comment_mode_is_publicMakes a ticket comment public or private. Takes true (public) or false (private)
followerA follower to add to the ticket
brand_idA brand to add to the ticket

Notification emails

Certain actions send an email notification to the user. Notification emails are represented by an array of three strings specifying the email recipient, subject, and body.

["293741756", "Leaking radiator", "Open the steam valve."]

The array is used for the value property of email notification actions. See "Additional actions for triggers and automations" above.

Example

{  "actions": [    {"field": "notification_user", "value": ["293741756", "Leaking radiator", "Open the steam valve."]}  ]}

You can use dynamic content placeholders in the email subject and body. See Zendesk Support placeholders reference.

You can also use return ("\r") and newline ("\n") characters in the message body.

Example

["current_user","{{ticket.id}}: Leaking radiator","Open the steam valve.\r \nHope this helps."]

Actions for object triggers

The actions available for each object trigger vary based on the types of fields defined for the object.

fieldvalue
textEnter any text-based value.
textareaEnter any text-based value.
checkboxSelect True or False.
dateSelect a date
dateEnter a whole number
integerEnter a numeric value.
decimalEnter any decimal value.
regexpEnter any value.
dropdownSelect from the field's options.
lookupSelect from records of that target object and specify an action for records of the related object.
multiselectSelect from the field's options.

Additionally, the following notification actions are available for all object triggers:

fieldvalue
notification_webhookSends a message to an active webhook. Takes an array of two strings specifying the unique id of the webhook and the message body
notification_groupSends an email to a group. If the object is related to tickets, select the group to notify. If you select a different notification destination when editing a trigger action, the body text resets.
notification_userSends an email to a user related to the object or a related object. Takes an array of three strings specifying the email recipient, subject, and body. See Notification emails. Possible recipient value: "current_user" (the last person who updated the record), "all_agents" (all non-restricted agents), or the numeric ID of an individual agent