How to format a comment when using Notify active webhook action?
Publication le 08 sept. 2022
I'm hoping someone on the community has successfully done this and can give me some tips!
Objective: Using a trigger, we want to send automated messages to customers that include some text formatting (e.g. line breaks, bullet points, hyperlinked text, bold, italic, etc), and that it is visible as a public comment in the ticket.
What we've tried: We have used the "Email user" trigger action in the past, but this does not send a public comment in the ticket, only an email to the customer. This means the agent can't see it in the ticket (in Events they can see an email notification was sent, but the message itself is not visible in a readable way), and the customer can't see it in the Requests ticket page (https://{help center domain}/requests/{ticket-number}).
Where we're stuck: Using the "Notify active webhook" trigger action, we are able to send a public comment to the ticket, but it must be in JSON format. The blocker is we have not figured out a way to send "formatted" text via JSON and have Zendesk translate it to nicely formatted text for customers.
1
11 commentaire
Lou
Alex C
We use URL targets to add public (or private) comments to tickets.
The URL is https://yourdomain.zendesk.com/api/v2/tickets/{{ticket.id}}.json?ticket[comment][public]=true (or false for private; you need to set up a separate target for each)
The method is PUT.
The Attribute name is ticket[comment][body]
We then notify that target in the trigger with the comment. It's much simpler than using JSON, and it works great for us. I check regularly for failures and can't remember the last time I saw one (and we use it a lot).
I tried to keep it brief, but if you want more detail, I'd be happy to provide it.
1
Vous connecter pour laisser un commentaire.