Ability to set Requester:Organization from Triggers

36 Comments

  • Melanie

    Thanks James, your solution for the HTTP target works perfectly.

     

    1
  • Melanie

    I jumped the gun a little, using the HTTP trigger removed all the organisations from the user and updated the Organisation to only the last one set by the trigger.  Over 200 tickets updated to the incorrect Organisation because the tickets are being generated from a single email address for multiple customers.

     

    The trigger would work if only one Organisation was required for the particular email address making the request but in our case we need to align just the ticket generated to the correct Organisation based on the email address it's received at, but I think I may be able to achieve this by using the below instead.

    https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json

     

    1
  • Warren Ridley

    +1

    0
  • Abed Islam

    +1

    Props to James. That was awesome. That was my introduction to Webhooks and the ability to use Zendesk API from within Zendesk to make up for what you can't already do in Zendesk. You just have to be weary of your conditions so your updates only apply when you want them to. But that was awesome.

     

    1
  • Patrick Windsor II

    Hi can someone help me with the work-around James mentioned, I followed his instructions, but my authentication is not working properly. I am not sure what I am doing incorrect. What should I be using as Basic Authentication:

    I used my username and password, but I get an error that says {"error":"Couldn't authenticate you"} 

     

    0
  • Peter Hochstrasser

    Patrick Windsor II

    You try to feed information back into your Zendesk domain, so this is a "internal" call.

    I suggest that you use an API Token instead of basic auth. That makes things a bit more secure - you don't have to deposit your UID/PW in a public record (well, accessible for every admin in your account).

    So, assuming that you are an admin, go to the cog (Admin), Channels, API, Settings, and click Add API token. Give your token a meaningful name, and, above all, copy and paste that API key into your password and key storage (mine is KeyPass 2) so you can retrieve it later on, as it cannot be retrieved ever after you click Save. That's part of the enhanced security I talked about above.

    From the error message, it may well be that UID/PW access to the API has not been enabled - you can check that on the API Settings page as well, right at the top.

    To use the token, go to your target definition - cog, Settings, Extensions, Targets) and edit your target: Add the string /token at the end of your user name, and paste the token into the password field.

    Select Test target in the list box besides the Submit button, then Submit your update.

    That's all.

    Hope this helps.

    Yours truly

    Peter

    P.S. Is there a specific reason why you selected, against James' advice, HTTP POST instead of HTTP PUT?
    As is detailed in the API doc

    https://developer.zendesk.com/rest_api/docs/support/tickets#update-ticket

    You should use PUT, not POST.

     

    0

Please sign in to leave a comment.

Powered by Zendesk