Basic object conditions

While this page mainly shows screenshots within Trigger configuration, these information do apply for all supported configurations.

You will learn what condition options are available by type and how to use them. If you need configuration samples, please refer to the documentation page of the function (e.g. Triggers) you want to use.

Limitations

Please note that ticket conditions do not support the following:

  • regular expressions

  • case sensitive string conditions

  • Basic conditions do not support the same attribute to be selected more than once

Note

The has changed condition only is available for ticket attributes and does not affect:

  • ticket articles attributes

  • organization attributes

  • user attributes

  • group attributes

How they work

Ticket conditions allow you to granular define a set of attributes and ticket situations to then do certain operations based on these conditions.

When using the basic mode of conditions, Zammad will match all conditions as AND clause. This means that all configured conditions have to fit, if one condition does not, the whole condition set won’t fit.

If you want to use AND / OR conditions to cover even more complex conditions, see Expert object conditions.

Object types and clauses

Zammad offers many different object (attribute) types which offer various options for matching your conditions. This doesn’t just apply to default objects Zammad comes with but also those that you add yourself.

Special fields

Some options or fields are not exactly attributes but functions Zammad offers for your convenience.

Action (Scope: Ticket, Ticket article)

This field is only available for Trigger conditions!

How was the ticket in question touched?
Available matching: is or is not

Offered values (multiple choice):

  • created
    The ticket has been created
  • updated
    The ticket has been updated with an article
  • merged into
    The source ticket of a ticket merge
  • received merge
    The destination ticket of a ticket merge

X

How was the ticket article in question touched?
Available matching: is or is not

Available value:

  • created
    The ticket article has been created

X

Calendar (Scope: Execution time)

This field is only available for Trigger and Scheduler conditions!

Was the ticket touched within the calendar defined business time (or not)?
Available matching: is in working time or is not in working time

Allows selection of a pre-defined calendars to check whether the defined business hours are met. This allows time based events like out of business hours responses.

X

Customer (Scope: Ticket)

This field only affects the ticket customer which is set during ticket creation and can be changed manually by an agent.

What ticket customer is affected (or not)?
Available matching: is, is not or has changed

Offered values (multiple choice):

  • current user
    This is the user that caused the trigger run. If your agent or customer updates the ticket, this will be the user. If this was not a human interaction, Zammad will use the system user. This may have unexpected results!
  • specific user
    Select one or more customers
  • not set (not defined)

X

Existing members (Scope: Organization)

This field is only available for Scheduler conditions!

Does the matching organization have members (or not)?
Available matching: is or is not

Offered values and options:

  • yes
    Select yes to select organization with members
  • no
    Select no to select organization without members

X

Existing tickets (Scope: Ticket Customer, Ticket Owner)

This field is only available for Scheduler conditions!

Does the matching user have any (open) tickets assigned to them (or not)?
Available matching: is or is not

Offered values and options:

  • yes
    Select yes to select users with assigned (open) tickets
  • no
    Select no to select users without assigned (open) tickets

X

Group (Scope: Ticket)
What ticket group is affected (or not)?
Available matching: is, is not or has changed

Offers all configured and active groups in Zammad.

X

Organization (Scope: Ticket, Customer)

This field only affects the ticket organization which is set during ticket creation and depends on the ticket customers organization.

What ticket organization is affected (or not)?
Available matching: is, is not or has changed

Offered values (multiple choice):

  • current user organization
    This is the users organization that caused the trigger run. If your agent or customer updates the ticket, this will be the organization. If this was not a human interaction, Zammad will use no organization. This may have unexpected results!
  • specific organization
    Select one or more organizations
  • not set (not defined)

X

Owner (Scope: Ticket)
What ticket owner is affected (or not)?
Available matching: is, is not or has changed

Offered values (multiple choice):

  • current user
    This is the user that caused the trigger run. If your agent or customer updates the ticket, this will be the user. If this was not a human interaction, Zammad will use the system user. This may have unexpected results!
  • specific user
    Select one or more owners
  • not set (not defined)

X

Sender (Scope: Ticket article)
What user role does the sender of the article have (or not)?
Available matching: is or is not

Determine the sender of the message: System, Agent or Customer.

X

State (Scope: Ticket)

Warning

Zammad behaves inconsistent in between certain ticket condition dialogs - if you can see ticket states only in parts of the admin menu and not in the front-end, your state is not visible.

The system documentation has you covered.

What ticket state is affected (or not)?
Available matching: is, is not or has changed

Offers all configured and visible ticket states in Zammad.

X

Subscribe (Scope: Ticket)

This affects ticket subscriptions / mentions by and for agents.

What ticket subscribers (notifications) are affected (or not)?
Available matching: is or is not

Offered values (multiple choice):

  • current user
    This is the user that caused the trigger run. Only can affect agents.
  • specific user
    Affects one or more specific users that have subscribed to the ticket.
  • not set (not defined)

X

Tags (Scope: Ticket)

Additional tags can be present in the ticket without issues.

What ticket tags are affected (or not)?
Available matching: contains all, contains one, contains all not or contains one not

Offered values (multiple choice):

  • contains all
    Matches if all given tags are present on the ticket.
  • contains one
    Matches if one specific given tags is present on the ticket.
  • contains all not
    Matches if all given tags are not present on the ticket.
  • contains one not
    Matches if one specific given tags is not present on the ticket.

X

Time Accounting (Scope: Ticket article)
Is time accounted for an article?
Available matching: is set or not set

Allows you to check if time is accounted for an article.

X

Type (Scope: Ticket article)

Tip

If you’re unsure what article type you’re looking for…

Click on a message to see detailed information about it.

Message details view
What’s the articles type (or not)?
Available matching: is or is not

Offers all available article types of your instance (e.g. email).

X

Visibility (Scope: Ticket article)
What’s the articles visibility (or not)?
Available matching: is or is not

Allows you to check if the article in question is either internal or public.

X

Text field (input)

Check if any field of type text contains a specific string (or not)? The configured “Type” of input fields has no impact on the available options.

Available operators for matching:

contains

Matches if text contains a specific string.

contains not

Matches if text does not contain a specific string.

is any of

Matches if text is equal to any of given tokens.

is none of

Matches if text is not equal to all of given tokens.

starts with one of

Matches if text starts with one of given tokens.

ends with one of

Matches if text ends with one of given tokens.

matches regex

Evaluates if text matches provided regular expression.

does not match regex

Evaluates if text does not match provided regular expression.

Hint

Regex support

matches regex and does not match regex are supported only in Triggers, Time Accounting selector, Postmaster Filters, Automatic ticket assignment and Core Workflow.

Hint

What about my “old” style regex:... filters?

If you update your Zammad from 6.0 or prior and you have already conditions with contains or contains not including a regex filter (i.e. regex:^(foo|bar)$), Zammad tries to migrate them to the new matches regex and does not match regex operators.

Hint

Differences in input fields

Please note, that the input field for tokens doesn’t support the comma as separator (as in the input field for tags). If you use the comma in the token input field, the comma is included in you token.

Example:

Example of comma usage in token input field

A added with enter/tab, B and C separated with comma (resulting in one token).

Textarea field

Check if any field of type textarea contains a specific string (or not)?
Available matching: contains, contains not or has changed

Boolean field

Check if any field of type boolean is true (or not)?
Available matching: is, is not or has changed

Integer field

Check if any field of type integer has a specific value (or not)?
Available matching: is, is not or has changed

Date field

Check if the given date is past or relatively past a specific period?
Available matching:
  • before (absolute)

  • after (absolute)

  • before (relative)

  • after (relative)

  • within next (relative)

  • within last (relative)

  • till (relative)

  • from (relative)

  • has changed

Offered values and options:

  • before (absolute)
    If the date field’s value is before the configured date, the condition will be met.
  • after (absolute)
    If the date field’s value is after the configured date, the condition will be met.
  • before (relative)
    Matches the date field’s value if the value is before the current date minus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • after (relative)
    Matches the date field’s value if the value is after the current date plus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • within last (relative)
    Matches the date field’s value if the value is in between the current date and the current date minus the selected time period.
  • within next (relative)
    Matches the date field’s value if the value is in between the current date and the current date plus the selected time period.
  • till (relative)
    Matches the date field’s value if the value is before the current date plus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • from (relative)
    Matches the date field’s value if the value is after the current date minus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • has changed
    The field has been changed during a ticket update.

X

To help you understand the time conditions of Zammad better, below diagram might also be helpful to you.

gantt title Date & Date Time condition timings dateFormat DD.MM.YYYY axisFormat %d.%m. todayMarker off 13.06. (now) :crit, milestone, 13.06.2023,0d section before<br>(absolute) 11.06. :beforeabs, 09.06.2023, 2d section after<br>(absolute) 15.06. :after withinnext, 2d section before<br>(relative) 2 days :09.06.2023, 2d section after<br>(relative) 2 days :after withinnext, 2d section within last<br>(relative) 2 days :withinlast, after beforeabs, 2d section within next<br>(relative) 2 days :withinnext, after withinlast, 2d section til<br>(relative) 2 days :09.06.2023, 6d section from<br>(relative) 2 days :after beforeabs, 6d

Date & Time field

Hint

An example for this field type are all default fields handling updated at, created at and closed at timings.

Check if the given date & time is past or relatively past a specific period?
Available matching:
  • before (absolute)

  • after (absolute)

  • before (relative)

  • after (relative)

  • within next (relative)

  • within last (relative)

  • till (relative)

  • from (relative)

  • has changed

  • has reached

  • has reached warning

Offered values and options:

  • before (absolute)
    If the date & time field’s value is before the configured date and time, the condition will be met.
  • after (absolute)
    If the date & time field’s value is after the configured date and time, the condition will be met.
  • before (relative)
    Matches the date & time field’s value if the value is before the current date and time minus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • after (relative)
    Matches the date & time field’s value if the value is after the current date and time plus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • within last (relative)
    Matches the date & time field’s value if the value is in between the current time and the current time minus the selected time period.
  • within next (relative)
    Matches the date & time field’s value if the value is in between the current time and the current time plus the selected time period.
  • till (relative)
    Matches the date & time field’s value if the value is before the current date and time plus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • from (relative)
    Matches the date & time field’s value if the value is after the current date and time minus the selected time period.

    You can choose from Minute(s), Hour(s), Day(s), Week(s), Month(s) and Year(s).
  • has changed
    The field has been changed during a ticket update.
  • has reached
    This option is only available for Ticket’s Pending time and Escalation time in Trigger conditions!
    The time set in this field was reached
  • has reached warning
    This option is only available for Ticket’s Escalation time in Trigger conditions!
    The time set in this field will be reached in less than 15 minutes

X

To help you understand the time conditions of Zammad better, below diagram might also be helpful to you. Below is a carbon copy of the date variant and applies exactly the same just you having hours and minutes on top to use.

gantt title Date & Date Time condition timings dateFormat DD.MM.YYYY axisFormat %d.%m. todayMarker off 13.06. (now) :crit, milestone, 13.06.2023,0d section before<br>(absolute) 11.06. :beforeabs, 09.06.2023, 2d section after<br>(absolute) 15.06. :after withinnext, 2d section before<br>(relative) 2 days :09.06.2023, 2d section after<br>(relative) 2 days :after withinnext, 2d section within last<br>(relative) 2 days :withinlast, after beforeabs, 2d section within next<br>(relative) 2 days :withinnext, after withinlast, 2d section til<br>(relative) 2 days :09.06.2023, 6d section from<br>(relative) 2 days :after beforeabs, 6d

Single selection field

Checks selected field values to match actual attribute value (or not).
Available matching: is, is not or has changed

Allows you to select one or more values of the attribute in question. Selecting more than one value in the condition will act like an “OR” clause.

X

Multiple selection field

What field’s values are affected (or not)?
Available matching: contains all, contains one, contains all not or contains one not

Offered values (multiple choice):

  • contains all
    Matches if all given field values are selected.
  • contains one
    Matches if one specific given field value is selected.
  • contains all not
    Matches if all given field values are not selected.
  • contains one not
    Matches if one specific given field value is not selected.

X

Single tree selection field

This attribute type technically allows a hierarchy of values. Please note that you cannot match a parent layer to match all of its children.

Checks selected field values to match actual attribute value (or not).
Available matching: is, is not or has changed

Allows you to select one or more values of the attribute in question. Selecting more than one value in the condition will act like an “OR” clause.

X

Multiple tree selection field

This attribute type technically allows a hierarchy of values. Please note that you cannot match a parent layer to match all of its children.

What field’s values are affected (or not)?
Available matching: contains all, contains one, contains all not or contains one not

Offered values (multiple choice):

  • contains all
    Matches if all given field values are selected.
  • contains one
    Matches if one specific given field value is selected.
  • contains all not
    Matches if all given field values are not selected.
  • contains one not
    Matches if one specific given field value is not selected.

X