You can use conditions or Liquid markup to modify ticket triggers that are based on business hours.
This article includes the following topics:
- 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 ticket triggers that are based on business hours
You can create ticket triggers based on business hours using the Ticket: Within business hours condition, instead of using Liquid markup. This enables you to build ticket 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 Ticket triggers based on business hours and Ticket triggers conditions and actions reference:
- Ticket: Within business hours?
- Ticket: Within (schedule)
Using Liquid markup with ticket 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 ticket trigger (or any other ticket 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.
6 comments
Mark
Is there a way to check whether the email originates from inside or outside the company, and send a different response based on that?
0
Gabriel Manlapig
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!
0
Itay Banner
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".
0
Joyce
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.
0
Paul Schneider
Is there a way if an message/email is generated outside business hours, that it stays in a queue, and doesn't send that email until the business hours start?
For example, if our business hours are 8am-6pm EST, and an agent responds to a Zendesk ticket at 7am, is there a way for that response email to "queue" (not send) until 8am?
0
Kathleen Taylor
Is there a way to set up a trigger or automation that sends an email ONLY within business hours - basically we need an automation or trigger that will stop an automation from firing outside of business hours.
We need to notify a customer every hour during regular business hours based on our SLA. I have all that set up but need to have a trigger or automation that will stop the automation from running after our support hours have ended and then start back up the next morning. Any Ideas?
I wish the Automation had the Within Business hours Condition. Would really make my life easier :)
Thanks in advance!
0