You can use conditions or Liquid markup to modify triggers that are based on business hours.
This article includes these sections:
- Using conditions with triggers that are based on business hours
- Using Liquid markup with triggers that are based on business hours
Related articles
Using conditions with triggers that are based on business hours
You can create triggers based on business hours using the Ticket: Within business hours condition, instead of using Liquid markup. This enables you to build triggers that fire based on whether an event occurs during business hours or outside of business hours.
For more information, read about these conditions in Triggers based on business hours and Triggers conditions and actions reference:
- Ticket: Within business hours?
- Ticket: Within (schedule)
Using Liquid markup with triggers that are based on business hours
Alternatively, you can use Liquid markup to create different responses in your business rules based on ticket properties. This example shows how you can modify the Notify requester of received request trigger (or any other trigger that serves the same purpose) to return a response based on your business hours.
{% if ticket.in_business_hours == 'true' %} Hello {{ticket.requester.first_name}} Your request (#{{ticket.id}}) has been received and is being reviewed by our support staff. To review the status of the request and add additional comments, follow the link below: http://{{ticket.url}} {% else %} Hello {{ticket.requester.first_name}} Your request (#{{ticket.id}}) has been received and will be reviewed by our support staff during regular business hours (Monday - Friday, 8am - 6pm PST). To review the status of the request and add additional comments, follow the link below: http://{{ticket.url}} {% endif %}
Using a simple if/else statement, the first response is sent if the request is received during business hours and the other is sent if it is not. The if statement tests the ticket.in_business_hours property and responds accordingly. The ticket property is in the same format that you're familiar with when it's used as a placeholder, although not contained within double curly brackets for the simple reason that it's not being used as output here but rather as part of the logic determining what will be included in the comment when it's sent to the requester as an email notification.
For more information on how Liquid markup can be used, see Understanding Liquid markup and Zendesk Support.
4 Comments
Is there a way to check whether the email originates from inside or outside the company, and send a different response based on that?
Natively, this is not possible. However, using custom liquid markup in your trigger notifications. I'd recommend checking out this article to start: Understanding Liquid markup and Zendesk Support.
Alternatively, you can use user / organization fields and add a custom drop-down or checkbox field into their user profile to determine whether it is coming from an internal or external users.
For more information, please see this article: Adding custom fields to users
I hope that helps. Thank you!
Hi! I'd like to be able to sync an external calendar so I don't need to manually create national holidays from time to time. Is there a way to automate that?
Also, do you have a doc with all the available filters? For example, I'd like to know how to write the condition "Is on holiday".
Holidays would need to be added manually to your Schedules and you can schedule holidays up to 2 years in advance. There's currently no option or integration available to add the holiday automatically.
I encourage you to create a new post in the General Product Feedback topic in our community to engage with other users who have similar needs and discuss possible workarounds.
Please sign in to leave a comment.