Creating webhooks in Admin Center

Return to top

41 Comments

  • Ronald McClung

    What can I do with the Webhook Response Body that is returned?  Can I access it from within a trigger?  Or does that have to be done in code?

    0
  • Ronald

    @Timothy Schauder

    You are my hero! Thank you for providing the format for basic auth with token to Zendesk's own API. This was driving me crazy trying to figure this out!

    0
  • Alex C

    Hi, hoping someone can help me here. I'm looking for the appropriate placeholders for {{assignee_id}} and {{satisfaction_rating}} for a json trigger that is notifying an active webhook (that is known to be working).

    The end goal is to add a tag to the ticket made up of the agent's ID+rating, so if a ticket is rated several times, we can capture what rating goes to each agent, versus automatically assigning the satisfaction rating of the ticket to the last agent that touched it.

    The json I'm using (that is not working -.-) is:

    {

        "ticket": {
        "additional_tags": ["csat_{{assignee_id}}_{{satisfaction_rating}}"],
            "id": "{{ticket.id}}" 
        }
    }

     

    The tag I'd want added is something like csat_1234355_bad

    As you can see, it's not catching the placeholders, only adding the csat and underscores. And second issue would be that it's not adding it to tags. I don't know if it won't add it because it knows the tag created is not what was requested, so it doesn't send it over to the ticket, but I'd be surprised if it did do that. 

    Note: I was able to use a similar json and trigger with the same webhook to add assignee name to a text field when the ticket changes group (to track number of escalations per agents), but using the placeholder {{current_user.email}}. In all the documentation I find, I can't find that placeholder (I keep using variations of that placeholder because it works, but can't recall where it came from initially). I don't know what the assignee ID and ticket rating counterparts of that placeholder would be. Does anyone know? Any help would be appreciated! 

    I've seen these articles:

    Edit: Just found that "additional_tags" is for the endpoint "tickets/update_many.json", and the webhook i'm currently using has endpoint "tickets/{{ticket.id}}". So that might be the issue, haven't created new webhook yet....but still don't know the right placeholders. 

    0
  • Dave Dyson
    Zendesk Community Manager
    HI Alexandra,
     
    For the assignee id, you'd use /1263082116169 (see Zendesk Support placeholders reference for more info on placeholders). However, there isn't a placeholder that simply provides "good" or "bad" as text (there is one that would provide "Good, I am satisfied" (for example), but I think that would be more than you're looking for. As a workaround, you could create two copies of this trigger, one for Good (and Good with comment) ratings, and another for Bad/Bad with comment ratings, and hardcode "good" or "bad" into the string yourself.
     
    Although I hear your trigger/webhook combo is working, I do have to provide the caveat that updating triggers this way can be unreliable: see Can I use a trigger and a webhook to update tickets?
    1
  • Alex C

    Dave Dyson thank you! That article provides the placeholders I needed (I used ticket.assignee.id for my purposes). I continue unable to update the tickets with the update-many endpoint. However, it all works with the tickets/{ticket.id} endpoint. The problem is it replaces all ticket tags with the one we're adding, which is what I did not want to do. So I'll continue messing around with this, but REALLY appreciate the correct placeholder article!

    0
  • Venkata Subbareddy

    Webhooks targets - What max no of webhooks are allowed in LIVE?

     

    0
  • Julien Poirot

    Is there a way to handle status codes, like 4xx or 5xx responses ?

    0
  • Dane
    Zendesk Engineering
    Hi Venkata,
     
    There's no documented limit for the number of web-hooks you can created. However, it is advisable to always check the API rate limit of the web-hooks that will be utilized. For Zendesk API rate limits, please refer to Usage Limits.
     
    @Julien,
     
    The only natively available option is to see the status of each call. You can go to each web-hook and click the activity tab.
     

     
    0
  • Prakash Sati

    Hi All,

    i am trying to create a webhook with end point url as https://yoursubdomain.zendesk.com/api/v2/tickets/{{ticket.id}}.json (i replaced your domain with our subdomain) however it returns with an error 

    If someone can help please!

    0
  • Jacob Christensen
    Community Moderator

    Hi Prakash,
    What is the error you're seeing?

    Could be a number of things, are you authenticating the call?
    https://support.zendesk.com/hc/en-us/articles/4408839108378?page=2#topic_qbn_v4w_dpb

    0
  • Maik Künnemann

    If I use a webhook with a ticket id placeholder inside the url, the activity log dont show any information about the used url. So I don't know anything about the request if the body was empty. Could you please add the request url to the activity log information?

    0

Please sign in to leave a comment.

Powered by Zendesk