Placeholder for current comment in Trigger (not latest) | Community
Skip to main content

Placeholder for current comment in Trigger (not latest)

  • June 14, 2022
  • 5 replies
  • 0 views

Panning,

Is there a placeholder or a way to get the current comment in a Trigger? Additionally, a way to determine if there is a comment? End goal; include the current public comment in an email if there is one, otherwise just other details from the ticket.

What I don't want is whatever the last public comment was (might not be relevant). There is the condition to see if a comment is present and viewable by the requester, but the only operator choice is "IS", there isn't a "IS NOT" option. So I'm left trying to figure this out with Liquid markup and a placeholder/output field.

5 replies

Lou11
  • June 14, 2022

This page has lots of great stuff:

https://support.zendesk.com/hc/en-us/articles/4408886858138-Zendesk-Support-placeholders-reference#topic_jkz_opl_rc

That link goes to the comment section. The reference you're lookin for is 

ticket.latest_comment

or

ticket.latest_public_comment

Panning,
  • Author
  • June 14, 2022

Thanks for the help @lou11 but I'm looking to get the comment that is associated with the current update (which caused the trigger execution). The latest comment placeholders will return whatever the most recent comments were, even from prior updates. So let's say an agent makes changes to the ticket but does not type in a comment, I want to send a different message in that case.


Lou11
  • June 14, 2022

My apologies. I reread your original post and I understand what you're trying to do. I don't see a way to do that. I agree. Comment is not present would be a nice condition.


Dave12
  • June 15, 2022
Hey Ryan,
 
I tried to see if I could find a way to do this as well, but I don't think there's currently a way to do this. I know you can create a trigger that only fires when a ticket update includes a public comment (by using the Ticket: Comment is condition), but unfortunately I don't see a way to create a trigger when there's not a public comment.
 
I also tried using Liquid markup in the trigger notification to create some if/then logic, but unfortunately there, I don't think the ticket.comments container (which includes a list of the comments in the ticket, public and private) doesn't have a way to tell you if the more recent comment is associated with the most recent ticket update. 
 
I think the best thing to do would be to post to our Feedback - Ticketing System (Support) topic which our product team monitors, using this template to format your input. Thanks, and sorry I couldn't figure out a way to make this work!

Panning,
  • Author
  • June 15, 2022