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

Answered

3 Comments

  • Oliver Tietze

    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
  • henry

    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
  • Oliver Tietze

    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

Please sign in to leave a comment.

Powered by Zendesk