Recent searches
No recent searches
Triggers won't run on text strings that contain hyperlinked URLs
Answered
Posted May 10, 2023
We're trying to create a trigger that adds a tag when a text string is present in the ticket body. The text string is a hyperlinked URL to a web page. We're able to get the trigger to run when the URL is plain text, but it fails to run when the text string is a hyperlink. Is this expected?
0
5
5 comments
Gabriel Manlapig
We tried this and it is working just fine, the trigger will pick up hyperlinked URLs as long as it is within the body of the ticket comment.
Please see sample trigger and ticket below:
This is the email body / comment:
And the result is:
I hope that answers your question. Thank you!
0
Jessica Gardner
Thanks for checking! To clarify, the issue is when the text in the message body is different and the trigger is looking for the hyperlink that the text links to.
Example: we want to track how often we share a referral URL in public replies, but the actual ticket text varies (e.g. "We suggest that you try out this product") and then run the trigger based on the URL that "this product" links to.
We did get this confirmation separately: "Zendesk has confirmed the trigger only checks the visible text, not the code"
0
Zsa Trias
Hi Jessica,
Thanks for clarifying!
Using the condition "Comment text", we process the plain body of the comment. However, when a hyperlink is used, the actual link is buried within the HTML, so that does not get processed. All we process is the text that is visible to the user. This is why the trigger cannot detect a link inside a hyperlink.
May I suggest using macro when sharing this referral URL instead? This way, you can add a tag at the same time that the hyperlink is placed.
0
Michael McDonnell
+1 to having a trigger be able to match the URL within a hyperlink of a reply/comment. Or better yet, have reporting able to search replies and that it contains a substring.
Doing a macro for a URL seems a bit cumbersome as what if I just want to check that we replied with the first part of a URL domain.com/some_section/* <- so that could be a lot of pages.
I think most support personnel use hyperlinks and not raw URLs in their replies as it looks nicer and is easier to read for our customers. Would be quite nice to allow for searching through the full reply/comment (link URLs included) and not just the plain text of the reply.
I was attempting to build a report showing when a URL is contained in a reply, and this post suggested a trigger to add a tag and then report on the tag. Now I also need to build out a macro for every potential subpage in order to add that tag.
I also attempted to build a webhook to send responses to a 3rd party system to parse the HTML, but even the {{ticket.latest_public_comment_html}} value to build a payload doesn't include the full HTML of a comment. Seems like a pretty big missing feature in Zendesk to be able to see and analyze the full response.
To give some context; I'm trying to build reports that show how often the team is referring customers to sections of our documents (product areas) and our URL structure is "domain.com/product/product_area/lot_of_sub_sections" and don't want to over-burden team members to have to remember to run macros anytime they let a customer know about a webinar to watch or document to read.
Thanks! :)
0
Amar Taggar
+1 we have faced the same issue,
If anyone has a solution please share.
0