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

The SLA Policies has a filter property that is identical to the conditions property.

The conditions property consists of an object that contains the conditions to check before performing an action. The object defines two arrays named all and any of one or more conditions.

Example

{   "conditions": {     "all": [       {"field": "status", "operator": "less_than", "value": "solved"},       {"field": "assignee_id", "operator": "is", "value": "296220096"}     ],     "any": [     ]   }}

The first array lists all the conditions that must be met. The second array lists any condition that must be met.

NameTypeDescription
allarrayLogical AND. All the conditions must be met
anyarrayLogical OR. Any condition can be met

Each condition in an array has the following properties:

NameTypeDescription
fieldstringThe name of a ticket field
operatorstringA comparison operator
valuestringThe value of a ticket field

Example

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

When specifying conditions in a PUT or POST request, use the all and any arrays without the conditions property. Example:

{  "all": [    {"field": "status", "operator": "less_than", "value": "solved"},    {"field": "assignee_id", "operator": "is", "value": "296220096"}  ],  "any": [    { "field": "current_tags", "operator": "includes", "value": "hello" }  ],  ...}

Shared conditions

The following conditions are shared by triggers, automations, views and SLA policies.

fieldoperatorvalue
group_id"is", "is_not""" (no group assigned to the ticket) or the numeric id of the group assigned to the ticket
assignee_id"is", "is_not""" (nobody assigned to the ticket), "current_user", or the numeric id of the agent assigned to the ticket
requester_id"is", "is_not""" (no requester specified), "current_user", or the numeric id of the requester or assignee
organization_id"is", "is_not""" (no organization added to the ticket) or the numeric id of the organization added to the ticket
current_tags"includes", "not_includes"A space-delimited list of tags to compare against the ticket's tags
via_id"is", "is_not"The numeric id of the channel used to create the ticket. See Via Types
recipientOmit the operator propertyFor views and automations, the account name in the email address from which the ticket was received. For triggers and SLA policies, the full email address, which can include external addresses
custom_fields_{id}"is", "is_not"Specify the id of the custom ticket field. See Ticket fields. Possible values vary depending on the field. See Setting custom field values

Additional conditions for triggers, automations, and views

In addition to the shared conditions, triggers, automations, and views share the following conditions.

fieldoperatorvalue
type"is", "is_not""question", "incident", "problem", or "task"
status"is", "is_not", "less_than", "greater_than""new", "open", "pending", "hold", "solved", or "closed"
priority"is", "is_not", "less_than", "greater_than""" (no priority assigned to the ticket), "low", "normal", "high", or "urgent"
locale_id"is", "is_not"The numeric id of the locale of the person who submitted the ticket. See List locales to list the available locale ids for the account
satisfaction_score"is", "is_not", "less_than", "greater_than", "good_with_comment", "good", "bad_with_comment", "bad", false (offered), or true (unoffered)A satisfaction score
brand_id"is", "is_not", "changed", "changed_to", "changed_from", "not_changed", "not_changed_to", "not_changed_from"One of the account's brands
ticket_form_id"is", "is_not", "changed", "changed_to", "changed_from", "not_changed", "not_changed_to", "not_changed_from"One of the account's forms

Additional conditions for triggers and automations

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

fieldoperatorvalue
user.custom_fields.{key}"is", "is_not", "present" (omit value), "not_present" (omit value), "includes" (contains one word), "not_includes" (contains none of the words), "includes_string" (contains string), "not_includes_string" (does not contain string)Specify the key of the custom user field. See User fields. Possible values vary depending on the field. See user_fields in the Users API
organization.custom_fields.{key}"is", "is_not", "present" (omit value), "not_present" (omit value), "includes" (contains one word), "not_includes" (contains none of the words), "includes_string" (contains string), "not_includes_string" (does not contain string)Specify the key of the custom organization field. See Organization fields. Possible values vary depending on the field. See organization_fields in the Organizations API

Additional operators and conditions for triggers

Triggers have the following additional operators for some shared fields.

FieldsAdditional trigger operators
status, type, priority, group_id, assignee_id, requester_id, organization_id, satisfaction_score"changed" (omit value property), "value" (changed to), "value_previous" (changed from), "not_changed", "not_value" (not changed to), "not_value_previous" (not changed from)

In addition to the shared conditions, triggers have the following additional conditions.

fieldoperatorvalue
subject_includes_word"includes" (contains one word), "not_includes" (contains none of the words), "is" (contains string), "is_not" (does not contain string)Single words or strings in the subject
comment_includes_word"includes" (contains one word), "not_includes" (contains none of the words), "is" (contains string), "is_not" (does not contain string)Single words or strings in either the subject or body of the comment
current_via_id"is", "is_not"The numeric id of the channel used to update the ticket. See the Via Types table
update_typeOmit the operator property"Create" or "Change"
comment_is_publicOmit the operator propertytrue, false, "not_relevant" (present), or "requester_can_see_comment" (present and requester can see comment)
ticket_is_publicOmit the operator property"public", "private"
reopens"less_than", "greater_than", "is"The number of times a ticket has moved from Solved to Open or Pending
replies"less_than", "greater_than", "is"The number of public agent comments.
agent_stations"less_than", "greater_than", "is"The number of different agents to which a ticket has been assigned
group_stations"less_than", "greater_than", "is"The number of different groups to which a ticket has been assigned
in_business_hoursOmit the operator propertytrue or false. Available only if an administrator enabled business hours
requester_twitter_followers_count"less_than", "greater_than", "is"The number of the requester's X (formerly Twitter) followers
requester_twitter_statuses_count"less_than", "greater_than", "is"The total number of the requester's tweets
requester_twitter_verifiedOmit the operator propertyOmit the value property. The condition is true if the requester has a verified X account
requester_role"is", "is_not"The role of the ticket requester. The role type can be "agent", "admin", or "end-user". If you're using light agents, the light agent role type is available
attachmentOmit the operator propertyThe condition is true if the ticket has attachments. Both appended and inline attachments are included, with the exception of inline attachments that are added to the ticket using a macro
ccOmit the operator propertyThe condition is true if the ticket has collaborators CC'd on it. It does not check for followers or @mentions
custom_status_id"includes" (contains one or more ids), "not_includes" (contains none of the id), "is", "is_not", "changed" (omit value property), "value" (changed to), "value_previous" (changed from), "not_changed", "not_value" (not changed to), "not_value_previous" (not changed from)The custom ticket status id
lookup:ticket.ticket_field_{id}.
custom_fields.{key}
"is", "is_not", "present", "not_present"The related custom object's fields

Additional SLA policies conditions

In addition to the shared conditions, SLA policies have the following additional conditions.

fieldoperatorvalue
ticket_type_id"is", "is_not"The numeric id of the ticket type: 1 (question), 2 (incident), 3 (problem), or 4 (task)
current_via_id"is", "is_not"The numeric id of the channel used to update the ticket. See Via Types
exact_created_at"less_than", "less_than_equal", "greater_than", "greater_than_equal"The time the ticket was created
custom_status_id"is", "is_not"The custom ticket status id

Additional time-based conditions for automations and views

Automations and views have the following time-based conditions. Time-based conditions can only be used in all arrays, not in any arrays.

fieldvalue
NEWHours since the ticket was created
OPENHours since the ticket was opened
PENDINGHours since the ticket was changed to pending
SOLVEDHours since the ticket was changed to solved
assigned_atHours since assigned
updated_atHours since update
requester_updated_atHours since requester update
assignee_updated_atHours since assignee update
due_dateHours since the due date. For tickets with the type set to task
until_due_dateHours until the due date. For tickets with the type set to task
description_includes_wordSingle words or strings in the ticket subject

The time-based conditions all share the same operator values:

operator
"is"
"is_business_hours"
"less_than"
"less_than_business_hours"
"greater_than"
"greater_than_business_hours"

Additional conditions for views

In addition to the shared conditions, views also have the following condition.

fieldoperatorvalue
CLOSED"is", "is_business_hours", "less_than", "less_than_business_hours", "greater_than", "greater_than_than_business_hours"Hours since the ticket was closed
custom_status_id"includes" (contains one or more ids), "not_includes" (contains none of the id)The custom ticket status id

Additional conditions for automations

In addition to the shared conditions, automations also have the following condition.

fieldoperatorvalue
custom_status_id"is", "is_not"The custom ticket status id