Recent searches


No recent searches

how do i change the requester based on ticket subject using trigger?

Answered


Posted Apr 15, 2021

how do I configure this: if there's a new ticket with a subject containing a string: this new ticket.

this new ticket requester will automatically change to a specific user.


0

5

5 comments

We used an API Target for this.

HTTP Target "Update Ticket via JSON":
   URL: https://yourcompany‎.zendesk.com/api/v2/tickets/{{ticket.id}}.json
   Method: PUT
   Content Type: JSON
   Basic Authentication: use "user.name‎@company.com/token" as username and the token as password (check support on how to create a token)

Trigger "Set requester to John Smith":
   Conditions as you need them
   Actions: Notify target: Update Ticket via JSON
                 JSON text: 

{
"ticket": {
"requester_id": 1234567
}
}

The requester record has to exist already to find the ID (from the profile). As far as I know you could also provide a "requester" property providing "name" and "email" like this 

{
"ticket": {
"requester": {
"name": "Pablo",
"email": "pablito@example.org"
}
}
}

but this we didn't need this so we didn't test it :)

I also recommend to add a tag that shows that this trigger was fired (i. e. "requester_changed"). Easier for debugging if you filter all tickets that were automatically changed by it.

Happy coding

Oliver

0


Hello Oliver,

 

Thank you for your reply

I try to create this HTTP target but I only have the option to use basic authentication using username and password. 

how do I use my generated token for authentication?

 

Thank you

0


Basic authentication is correct!

You enter this as the username: your.name‎@yourdomain.com/token
You enter this as the password: your token

The credentials used must represent a user with sufficient permissions to change tickets.

Best regards,
Oliver

0


Hi, what is the best way to trigger the API target (put) to change the requester?

I would also like to change the requester of an incoming ticket based on the phone number that is provided in the title of the ticket. Our Voip solution automatically creates tickets for everyone taken phone call. 

0


image avatar

jvon

Zendesk Luminary

Just in case anyone stumbles on this article (it was the first Google result for me) -- this has changed since originally posted as HTTP targets don't quite exist (URL targets now)

 

There's a great answer on how to do this with a webhook here: https://support.zendesk.com/hc/en-us/community/posts/4448547580826/comments/4465550123290

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post