Response Templates - Is scripting possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 04:12 PM
Hi folks,
I have a task to set up a Response Template on a custom table we have which is extended from Task and the OOB "Responses" UI Action is appearing exactly as it should.
My challenge is I am hoping to code some intelligence into the Response Template so I can achieve something like:
If <some condition> then text I want is "Do this thing"
Else text I want is "Do this other thing and then do something else"
The <condition> bit I think can only be achieved by me querying another table which is not the one the Response Template is associated with and there is no reference field in my custom table to get me where I want to go so dot walking through the fields bit is not currently an option - but if that's my solutiopn then I can explore how feasible that is with the business.
Is there a way to dynamically change the content of a Response Template?
I think there is in the Agent Chat channel, but I am hoping to achieve this in the form channel as well.
Any tips / pointers?
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 11:28 PM
An idea that I am toying with now is to include a {mail_script:<script name>} line in my response template.
I am hoping I can achieve the scripting I need in the included mail script and manufacture my response email via a suite of template.print() statements.
Watch this space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2023 02:01 PM
*** Update ***
It appears the Response Templates do not support the ${mail_script:<name>} functionality.
Email Client templates, however, seem to, so now exploring that as an option.
NB: Email Client / Quick Messages also seem not to support mail scripting.