Salto for
Zendesk
Articles
SHARE
Jude Kriwald
September 26, 2023
4
min read
So far in this series (see Part 1 and Part 2 here), we’ve learned lots about inserting the exact dynamic date and time that we’re after. But what if we want the output to display differently? How do we go from “we’ll get back to you no later than 2023-06-28 16:00”, which is far too robotic, to “we’ll get back to you no later than Thursday by 4 pm”?
The answer is that Ruby, the language we’re using to tell Zendesk what to output, has many different options for how you’d like to format the date. In the below tables, I have provided a multitude of options for common date formats.
You can use any of these date formatters in place of the existing ones in the examples I gave earlier on.
For example, you can replace the current date example I gave in Part 1:
String:
Output:
2023-06-23
To do this, we’d take out “%Y-%m-%d” and could replace them with “%A, %B %W”
To make {{'now' | date:'%A, %B %W'}}, which outputs like this: Friday, June 25. That’s much nicer to read for simple email correspondence.
Just as with the dates, we can insert these time formatters into our string to display the date/time as we want our customers to see it. You can do this anywhere in between the two apostrophes of date:’’ and you can add other text within those two apostrophes too, to create the exact structure you want for your output.
For example, you could test this out by pasting the below into your comment editor on Zendesk and submitting the ticket:
The time now is {{'now' | date:'%l%p on %A'}}
Which creates this:
Using everything we’ve learned in this three-part series, we can now see how to achieve the customised auto-response that your customers receive when they contact your team.
From anywhere within Zendesk, click the four tiny squares in the top right of the Zendesk window > click Admin Centre > in the search bar on the left, type “triggers”. Alternatively, navigate to: https://YOURDOMAIN.zendesk.com/admin/objects-rules/rules/triggers/ . From there, you want to look for your auto-response trigger. By default, it would have been called Notify requester and CCs of received request, but you may have renamed it.
Click on that trigger to open it up.
Unless you’ve modified this already, the Actions for this trigger will look like this:
Pretty dry, right? Let’s update the Email body with something much more personalised. I’m going to use the copy below, which you can copy in too, and then I’ll explain each placeholder or dynamic bit of text.
Hi {{ticket.requester.first_name}},
Thank you for your email. I just wanted to let you know that our team has received it safely. We’ll get back to you no later than {{ 'now' | date: '%s' | plus:266400| date: '%A by %l%P' }}.
I hope you have a wonderful day and we look forward to helping you soon.
Kind regards,
{{agent.first_name}},
{{ticket.brand.name}}
Let’s break this down a bit:
The output of this will look something like the below:
Hi Julia,
Thank you for your email. I just wanted to let you know that our team has received it safely. We’ll get back to you no later than Monday by 5 pm.
I hope you have a wonderful day and we look forward to helping you soon.
Kind regards,
Jude Kriwald
My Brand Name
Salto for
Zendesk
Zendesk
SHARE
Jude Kriwald
September 26, 2023
4
min read
So far in this series (see Part 1 and Part 2 here), we’ve learned lots about inserting the exact dynamic date and time that we’re after. But what if we want the output to display differently? How do we go from “we’ll get back to you no later than 2023-06-28 16:00”, which is far too robotic, to “we’ll get back to you no later than Thursday by 4 pm”?
The answer is that Ruby, the language we’re using to tell Zendesk what to output, has many different options for how you’d like to format the date. In the below tables, I have provided a multitude of options for common date formats.
You can use any of these date formatters in place of the existing ones in the examples I gave earlier on.
For example, you can replace the current date example I gave in Part 1:
String:
Output:
2023-06-23
To do this, we’d take out “%Y-%m-%d” and could replace them with “%A, %B %W”
To make {{'now' | date:'%A, %B %W'}}, which outputs like this: Friday, June 25. That’s much nicer to read for simple email correspondence.
Just as with the dates, we can insert these time formatters into our string to display the date/time as we want our customers to see it. You can do this anywhere in between the two apostrophes of date:’’ and you can add other text within those two apostrophes too, to create the exact structure you want for your output.
For example, you could test this out by pasting the below into your comment editor on Zendesk and submitting the ticket:
The time now is {{'now' | date:'%l%p on %A'}}
Which creates this:
Using everything we’ve learned in this three-part series, we can now see how to achieve the customised auto-response that your customers receive when they contact your team.
From anywhere within Zendesk, click the four tiny squares in the top right of the Zendesk window > click Admin Centre > in the search bar on the left, type “triggers”. Alternatively, navigate to: https://YOURDOMAIN.zendesk.com/admin/objects-rules/rules/triggers/ . From there, you want to look for your auto-response trigger. By default, it would have been called Notify requester and CCs of received request, but you may have renamed it.
Click on that trigger to open it up.
Unless you’ve modified this already, the Actions for this trigger will look like this:
Pretty dry, right? Let’s update the Email body with something much more personalised. I’m going to use the copy below, which you can copy in too, and then I’ll explain each placeholder or dynamic bit of text.
Hi {{ticket.requester.first_name}},
Thank you for your email. I just wanted to let you know that our team has received it safely. We’ll get back to you no later than {{ 'now' | date: '%s' | plus:266400| date: '%A by %l%P' }}.
I hope you have a wonderful day and we look forward to helping you soon.
Kind regards,
{{agent.first_name}},
{{ticket.brand.name}}
Let’s break this down a bit:
The output of this will look something like the below:
Hi Julia,
Thank you for your email. I just wanted to let you know that our team has received it safely. We’ll get back to you no later than Monday by 5 pm.
I hope you have a wonderful day and we look forward to helping you soon.
Kind regards,
Jude Kriwald
My Brand Name