Update text field in triggers

回答済み

4 コメント

  • Brett Bowser
    Zendesk Community Manager
    Hey Tim,

    If I'm understanding you correctly, you could potentially use a webhook to update a ticket field. I'd recommend taking a look at the following article which goes over creating webhooks and how to use them within triggers: Creating webhooks in Admin Center
     
    I hope this points you in the right direction!
    0
  • Sam
    Community Moderator

    Hi Tim Bradgate!

    Not natively, but you can use the API in conjunction with a Webhook and Trigger to make these updates. See below:

    1. Create a Webhook target with the following information:

    • Go to Admin Center from Zendesk Products -> Admin Center
    • In Admin Center, select Apps and Integrations -> Webhooks
    • Provide the following:
    • -- Name for your Webhook
    • -- Endpoint URL:  https://subdomain.zendesk.com/api/v2/tickets/{{ticket.id}}.json
    • -- Request Method: PUT
    • -- Request Format: JSON
    • -- Authentication: Basic authentication
    • -- Username: email@domain.com/token
    • -- Password: Your API token

    2. Create a trigger that notifies the webhook

    • Set up a trigger as normal, something like Ticket = Created and Form = XYZ (or whatever values make your trigger true)
    • Under Add Actions, select Notify Active Webhook
    • Select your newly created webhook
    • Under JSON body, use the following template:
    {
    "ticket": {
    "custom_fields": { "field_id_to_update": "value" }
    }
    }

    In the above, update field_id_to_update with the custom field ID, and the value with whatever you want the text field to be!

    0
  • Lou
    Community Moderator
    The Product Manager Whisperer - 2022

    What they said. You can update just about any field that way. We use a trigger to update the subject using a webhook and JSON.

    {"ticket": {"subject": "{{ticket.title}} [{{ticket.ticket_field_360042229672}}]"}}

    This is the webhook:

    0
  • Walter

    Tim Bradgate

    The above suggestions work, but you need to be careful with your conditions.  Also see https://support.zendesk.com/hc/en-us/articles/4408882855578-Can-I-use-a-trigger-and-a-webhook-to-update-tickets-

     

    0

サインインしてコメントを残してください。

Powered by Zendesk