Actions reference
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:
Name | Type | Description |
---|---|---|
field | string | The name of a ticket field to modify |
value | string | The new value of the field |
Example
{"field": "status", "value": "solved"}
Shared actions
Ticket triggers, automations, and macros share the following actions.
field | value |
---|---|
status | Sets the ticket status. Takes "new", "open", "pending", "hold", "solved", or "closed", except for macros, which don't take "new" or "closed" |
type | Sets the ticket type. Takes "question", "incident", "problem", or "task" |
priority | Sets the ticket priority. Takes "low", "normal", "high", or "urgent" |
group_id | Assigns 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_id | Assigns 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_tags | A space-delimited list of tags to insert in the ticket. The action replaces the current tags |
current_tags | A space-delimited list of tags to add to existing tags |
remove_tags | A space-delimited list of tags to remove from existing tags |
custom_fields_ | Sets the value of a custom ticket field |
custom_status_id | The custom ticket status id |
ticket_form_id | Sets the ticket form used for the ticket |
follower | Adds a user as a follower on a ticket |
share_ticket | Shares 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.
field | value |
---|---|
satisfaction_score | Sends a survey request to the ticket requester. Takes "offered" as a value |
notification_user | Sends 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_group | Sends 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_target | Sends a message to an external target. Takes an array of two strings specifying the numeric ID of the target and the message body |
notification_webhook | Sends a message to an active webhook. Takes an array of two strings specifying the unique ID of the webhook and the message body |
tweet_requester | Responds to the X (formerly Twitter) requester with a tweet. Takes the text of the tweet |
cc | CC's somebody on the ticket. Takes "current_user" or the numeric ID of an agent |
locale_id | Sets 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.
field | value |
---|---|
brand_id | A brand to add to the ticket |
follower | A follower to add to the ticket |
add_skills | A comma-delimited list of skills to insert into the ticket. Requires omnichannel routing to be enabled. (Professional plans and above) |
set_skills | A 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_skills | A 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.
field | value |
---|---|
subject | Replaces the subject of a ticket. Takes the subject text |
comment_value | Adds 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_html | Adds a rich-text comment to a ticket |
comment_mode_is_public | Makes a ticket comment public or private. Takes true (public) or false (private) |
follower | A follower to add to the ticket |
brand_id | A 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.
field | value |
---|---|
text | Enter any text-based value. |
textarea | Enter any text-based value. |
checkbox | Select True or False. |
date | Select a date |
date | Enter a whole number |
integer | Enter a numeric value. |
decimal | Enter any decimal value. |
regexp | Enter any value. |
dropdown | Select from the field's options. |
lookup | Select from records of that target object and specify an action for records of the related object. |
multiselect | Select from the field's options. |
Additionally, the following notification actions are available for all object triggers:
field | value |
---|---|
notification_webhook | Sends a message to an active webhook. Takes an array of two strings specifying the unique id of the webhook and the message body |
notification_group | Sends 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_user | Sends 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 |