Toolbox is a powerful tool in Zendesk that opens specific features of Zendesk's Apps Framework to be used with Triggers, Automations and even external applications via the Zendesk API. In this blueprint, we'll guide you how to setup a notification when a due date has passed by. A notification will help agents to act on tickets when they are past the due date more quickly than just reopening them. We'll reopen the ticket when the due date has passed by, and we'll notify the agent that was assigned to act. This blueprint is extra powerful when you combine it with the power of Macro Date which lets you automatically select relative dates when applying macros in Zendesk Support.
Remember, this notification will only be visible if the agent is currently active on Zendesk, just like the notification from replies on Side Conversation.
For this instruction, we assume you have already setup Toolbox If this is not the case, please follow the instructions in this article.
Overview
Setup your notification in Toolbox
- Navigate to the Toolbox icon in the left sidebar on Zendesk Support and click on Notifications.
- While we're setting up the first Notification, it's good to first select your own name in the Agent field. Later we'll change this to the actual assignee of the ticket.
- Now we're ready to decide how the Notification needs to look. Zendesk has three levels that are available under Kind:
- Notice - Green checkbox
- Alert - Orange warning
- Error - Red warning
- Select a Duration that needs to apply to your Notification, or require that agents have to close the notification manually by making it a Sticky.
- In the Message field, we can add the content of the Notification that will appear. This field has Markdown support, and numbers with a hash character (#) will be automatically transferred as a link to the specific ticket. You can even add emoji's to the Notification. You can draft up your own message or use the template as listed below:
Ticket #{{ticket.id}}: Due date has expired
- Click on the Preview button below the form and you'll see something that looks like this example:
In this sample, we replaced the Zendesk Ticket ID placeholder already with '1' for illustrative purposes. - When you are satisfied with the result, choose the Create button and some code samples will appear.
- While you can use this in other Apps and Scripts, in this blueprint we're highlighting the use of an Automation, so you can go ahead and select the Trigger/Automation tab and select Copy.
Create an Automation in the Admin Center
- Click on the top right on the Product menu and choose Admin Center.
- Go to Objects and rules, select Automations and start creating a new Automation by clicking on the Add automation button.
- As Automation title add something like 'Reopen tickets past due date'.
- Now under the section Meet all of the following conditions add the following:
- Status > Less than > Solved
- Status > Greater than > Open
- Hours until due date > (calendar) Is > 0
- Skip over to the Perform these actions section to add the Actions you'd like to run when this Automation is running:
- Status > Open
- Priority > High (for an example when you want to raise the priority of the ticket as well, this is especially convenient when you have a larger backlog, but you still would like to act on time when a due date expires)
- Notify active webhook > Send Notification
Now paste the code you have copied on Step 8 of the previous section in the JSON body and start adding some Zendesk Placeholders to create your personal notification. You can replace the "agent_id" value for an example, so the notification will be pushed to the Ticket Assignee
(in that case, make sure you also check on the condition if the Assignee is not empty).
In case you are having trouble with JSON validation errors, try creating your code in a JSON validation tool like JSONlint.
- Now you are ready to go! Click on the Create automation button to add this blueprint to your Automations in Zendesk.