What is the placeholder for ticket assignee when using Notify Active Webhook?

답변함

13 댓글

  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    Alex C

    Did you try agent.email? It should return the assignee.

    1
  • Alex C

    Hi Lou! I can't remember if I had or not, so I just tested {{agent.email}} but it didn't work :(

    The trigger is working and firing and if I have something else in the text field, it wipes it clean. But does not populate the agent's email. 

    1
  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hi Alex C,

    {{ticket.assignee.email}} works for me when an assignee is present and saved. So, if you are testing, make sure you assign the ticket to an agent, submit, then test the placeholder in an internal note or trigger.

    2
  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    Alex C

    I think Ahmed Zaid is on to something. Try saving (submitting) the ticket first then run the trigger and see if that works.

    2
  • Alex C

    Ahmed Zaid Lou

    Unbelievable. I think this is what the issue was. The trigger I was using to test assigns the ticket to a different group (which left it with no assignee). As I was testing back and forth I probably wasn't "taking" the ticket before adding the tag and submitting. So placeholder ticket.assignee.email does work! Now just need to make sure to follow that rule in the real flow. Thank you so much for the help once again!

    0
  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    Alex C

    You're welcome, but I think Ahmed Zaid deserves the credit. I'm just glad you worked it out.

    0
  • Francesca Roig

    Hi, everyone! I'm facing a similar issue, it would be great if you could share your input.
    I need a placeholder that can either be on the user's notes or details, or it could even be a custom field.
    Then I try {{ticket.assignee.details}} I get nothing. As @Alex C mentioned, the article states that "user" could be replaced by any user role. What I believe is "ticket.assignee" is interpreted as a Ticket data, and not a User data.

    In my tests, the tickets are previously assigned, so I don't believe it is the same issue found here.

    Does anybody have a suggestion on how I could call info from a ticket assignee into a trigger?
    For context, in case it helps, I'm trying to enter our agents' Slack handles into Zendesk so that when they are updated via integration the assignee gets mentioned on Slack.
    The handle almost never matches their names or aliases, that's why I need a specific field.
    The goal is to use @{{ticket.assignee.slackhandle}}, being that a custom field or a default like notes and details. The only other workaround I could think of is having a trigger for each possible assignee, which you can guess is not quite sustainable.

    0
  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Hi Francesca Roig,

    {{ticket.assignee.details}} works for me as long as it is saved in the assignee profile before the trigger fires. If your custom field key is slackhandle, you can also use {{ticket.assignee.custom_fields.slackhandle}}

    1
  • Francesca Roig

    Hi, Ahmed Zaid
    Thank you for your quick response!

    I tried out these placeholders in an internal note and they worked. In the integration, however, it is still not perfect.
    I also tried changing the field content to include the @ before each handle, considering maybe the @{{placeholder}} format could cause some sort of conflict since I was getting @<blank> as a result.

    I found two issues:

    • First, the same placeholder used twice in the same trigger will both work and not work at the same time. I'm not sure why it seems to work in the last couple of lines, but not at the beginning of the text:

    The first example is before I added the @ to the field, and the second is after. This is what it looks like:

    • The second issue is even though it pulled the right handle, the user wasn't tagged. We're always able to tag from a plain text at Zendesk: typing @handle, no links will come up on ZD, but the user is properly tagged in Slack.

    We usually do so using the side conversations, but this is the first time we're trying it with a trigger. This is what it looks like:

    0
  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Francesca Roig,

    I tested it in my instance and realised you need to use the user ID, not the handle. You also need to use this syntax:

    <@{{ticket.assignee.custom_fields.slack_id}}>

    Refer to slack documentation here:

    https://api.slack.com/reference/surfaces/formatting#mentioning-users

    1
  • Francesca Roig

    Finally!! Thank you SO MUCH! I wish I could reward you somehow.

    The handle will also work, but the ID is much more reliable since it can't be edited. My issue was actually with the syntax to properly apply the @ function.

    0
  • Ahmed Zaid
    User Group Leader Community Moderator
    Zendesk Luminary

    Delighted I could help. That's my reward.

    I also didn't know that handles would work too, but you are right. User IDs are indeed much more reliable.

    All the best.

    1
  • Nicole Saunders
    Zendesk Community Manager

    Keep being awesome, Ahmed!

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공