Separate Email Subject from Ticket Title

Answered

15 Comments

  • Pedro Rodrigues
    Community Moderator

    HI Nik Corr, thank you for sharing the context of what you're trying to achieve. As far as I understand, a trigger that notifies a target to update the ticket subject would do the trick.

    All we need to do now is understand how to 'assemble' it (where to fetch its components, like the Org. name, ticket ID, etc.), and when to execute it.

    "When sending a Public Reply (which sends an email to the Requester, which in our case is a customer) Zendesk uses the Title of the ticket as the Email Subject."

    This is because your notification trigger currently includes the {{ticket.title}} placeholder, which we can change/adapt.

    When do we need this ticket subject update to take place? I'm assuming the following workflow:

    • Ticket is created with the wrong subject
    • We run a rule to update the subject
    • Requester is sent a notification email with the proper subject

    I'm guessing that part of the string is likely some dynamic value, right? I.e. we need to add some value - an ID/reference/etc. - that is specifically related to that communication.

    If that's the case, is this value present in any ticket field when the ticket is created?

    If you have a practical example that you can share (if possible, use 'dummy' data or omit privat info), that would be great.

    Thanks in advance! 

    1
  • Nik Corr

    Unfortunately purely a notification reminder for a tech support representative to change the ticket title manually doesn't quite do the trick, because then, after sending an email, they need to change the ticket back to our internal title.
    Here's an example:
    Customer calls in via aircall, their computer type X1 is experiencing an HDMI Out issue.
    Ticket is generated with an automatic title of "Aircall Contact 123456789 Inbound Call".
    After the call, the Tech Support Agent changes the title to "X1 HDMI-O Issue, Angry Customer"
    Later on, we're emailing them a prepaid UPS Return Label PDF to send in their computer. Ideally, there would be a separate field for the email subject, so that the tech support agent wouldn't have to copy the internal title, paste it into a private note, save the ticket, draft an email with a title "ExtraSwift Support: No Video", save the ticket which sends the email to the customer, then copy the email title, paste it into a private note, copy the internal title from previous private note, paste it into the title, and save the ticket again.

    This all leaves us open to many mistakes, such as sending a customer an email titled "X1 HDMI-O Issue, Angry Customer" or leaving a ticket titled "ExtraSwift Support: No Video" for when the same customer calls in a month later and a different agent is looking through their ticket history.

    I was mostly just hoping there was some kind of add-on (the way we integrated aircall) that would allow us to designate an override for the title when sending a public reply, while preserving the internal title and never sending it as the subject of an email.

    0
  • Nik Corr

    This seems to be an unusual use of the Zendesk system, so I wanted to clarify:
    Our Requesters are our customers, our Assignees are our employees, our Public Replies are outbound emails to customers, our Internal Notes are where our employees write notes about the contents of calls made in aircall.

    We chose Zendesk because it automatically generates a ticket for emails that are sent to our team email address (integrated by zapier) and it integrates well with Aircall and Textline which are our primary methods of communicating with customers, though we do occasionally send emails to them (via public reply)

    This gives us a "paper trail" of what our employees are doing to help customers, and ensures that nothing ever slips through the cracks, because every incoming email, call, or text creates a ticket that needs to be followed up on and resolved.

    0
  • Pedro Rodrigues
    Community Moderator

    Thanks again for the additional context and clarifications, Nik Corr.

    I'm not aware of apps that could solve this, but here's how I'd address this challenge without having to install anything:

    • Create a custom text field, let's call it "Customer Subject" (let's assume its ID is 1900002520527)
    • Add this new ticket field to the relevant ticket form(s)
    • Create a new dynamic content item:

      The corresponding dynamic placeholder will be {{dc.customer_subject}}.
      What the Liquid code is doing in the image is checking our new text field: if empty, we email the requester a generic subject like "Request no. 123"; if it has text, that will be the subject of the email notification sent to the requester.
    • In the trigger that notifies the customer, replace the {{ticket.title}} placeholder with this new placeholder, {{dc.customer_subject}}

    This means that the ticket Subject in the system will never be sent to the Requester. If our new field is empty, we're just emailing them a generic subject (or, in other words, whatever you choose to send that is written in the dynamic content).

    Let's try this out.

    Test / example

    Ticket is created, agent sets the (internal) Subject on the ticket... but forgets to write the subject in Customer Subject:

    Result:

    Now let's write the subject we want to send the requester and update the ticket:

    Result:

    It may not be the most elegant solution, but here's hoping that the instructions are clear enough and that this solution does the trick.

    1
  • Nik Corr

    This is Excellent!!
    Thank you very much, I'll give this a try and report back!

    0
  • Pedro Rodrigues
    Community Moderator

    By the way, forgot to share the Liquid part:

    {% case {{ticket.ticket_field_1900002520527}} %}
    {% when '' %}
    Request no. {{ticket.id}}
    {% else %}
    {{ticket.ticket_field_1900002520527}}
    {% endcase %}
    1
  • Nik Corr

    I just said aloud to a coworker "I wish that part wasn't a picture" and you responded directly after I had typed it out. You're psychic as well as a savior! Thank you very much Pedro Rodrigues ! <3

    However, I believe you accidentally deleted your previous message, as I don't see it anymore.
    Is there a way to undo that in this forum's options?

    0
  • Pedro Rodrigues
    Community Moderator

    Nik Corr sorry about that, the previous comment should be visible again. No psychic powers here, I promise - just remembered it would be nice to easily copy and adapt :-)

    Please do let me know if this configuration achieves what you want.

    1
  • Nik Corr

    Thank you Pedro Rodrigues
    For the sake of anyone reading this subject in the future I'll describe the mistake we made on OUR end, and how we did some self-troubleshooting by checking our work:

    On our first test we just received a duplicate email with the customer subject, but I realized that I had made a new trigger rather than edit the existing trigger.

    I actually didn't realize that this is just a trigger, we could have just removed it and put the ticket ID in this entire time. But your solution is still even better!


    After editing the existing trigger, it worked! However, we run into another minor problem: When a customer emails us at (for example) Support@ExtraSwift.com and we have our Outlook forward that to Support@Zendesk.ExtraSwift.com (which creates a ticket) It fills out the title of the ticket with the Customer's chosen email Subject. While we could just copy this title over to our new Customer Subject field, I am curious if there is an easy way to have Zendesk do that for us when the ticket is created? So that when we reply to an email it maintains the chain and doesn't start a new email with our default subject.

    0
  • Pedro Rodrigues
    Community Moderator

    Hey Nik Corr, glad you could troubleshoot the conflicting trigger issue!

    Regarding your second question, we can do that via a second trigger that we'd place before/above your other triggers.

    Make sure you create an HTTP target that you'll use as an action on that trigger:

    Now we can create our trigger.

    Example:

    JSON:

    {
    "ticket": {
    "custom_fields": [
    {
    "id": 1900002520527,
    "value": "{{ticket.title}}"
    }
    ]
    }
    }

    This will store the requester's initial subject in the new Customer Subject text field:

    The agent can then edit/change it if necessary, but at least the Customer Subject field will never be blank.

    1
  • Nik Corr

    Perfect! Thank you!

    0
  • Nik Corr


    After replicating this as best we can, we are getting successful Triggers for our tests (the conditions are being met) but the HTTP target has zero successful sends, and we think we've been putting the URL in incorrectly which is (to confirm):
    https://EXAMPLE.zendesk.com/api/v2/tickets/{{ticket.id}}.json

    Not sure what's going wrong

    0
  • Pedro Rodrigues
    Community Moderator

    Hi Nik Corr I think you still need to enable Basic Authentication in your target (please use Admin credentials).

    2
  • Nik Corr

    Oh! I didn't know that was required.

    It worked!!

    Thank you thank you!!!!!
    Let me know if there's any kind of karma or anything else I can do to show my appreciation, you've been a MASSIVE help!

    1
  • Pedro Rodrigues
    Community Moderator

    No worries, Nik Corr! Your kind words are more than enough - very glad to help 😀 cheers!

    1

Please sign in to leave a comment.

Powered by Zendesk