Add Text Custom Field Value as a Tag?

Beantwortet

10 Kommentare

  • Sebastiaan Wijchers

    Hello Josiah,

    This can be done with a little workaround.

    First you'll need to create a HTTP target (admin > settings > extensions):

    The URL should be:

    https://<subdomain>.zendesk.com/api/v2/tickets/{{ticket.id}}/tags.json

    Replace <subdomain> with your subdomain. The username should be appended with '/token' and for the password provide an API key.

    Now you'll have to create a trigger. Conditions will be somewhat like this ('Custom text' is my custom ticket field):

    And the action something like this:

    Make sure you replace the id with your custom field id.

    {
    "tags": ["{{ticket.ticket_field_<id>}}"]
    }

    With kind regards,

    Sebastiaan
    Sparkly ⭐

    0
  • Josiah Horne

    Thank you Sebastiaan!

        Your solution worked perfectly.  For anyone who is trying to solve the same problem, follow the tutorial above.  Cheers!

     

    0
  • Sebastiaan Wijchers

    You're welcome!

    0
  • Sarah Paterson

    So I've tried to set this up and it works for about a month, and then we get a message that there were too many failures and the extension was disabled. I thought maybe the trigger was firing too many times per ticket, so I set up the trigger using tags to only fire once per ticket. But when I made the update the extension disabled within an hour. 

    Any ideas what may be causing it? Let me know if I need to provide any specific information.

    0
  • Sebastiaan Wijchers

    Hello Sarah,

    When you go to 'Channels > API' in the admin area there's a tab called 'target failures':

    You can find more information about the failures there. Let me know what the status code and failure type is of your target if it doesn't make sense to you!

    With kind regards,

    Sebastiaan
    Sparkly ⭐

    0
  • Sarah Paterson

    Hi Sebastiaan, 

    Thanks for pointing me in the direction of the error logs. I was getting a 422 error with the failure type "HTTP client call failed"

     

    I clicked on one of the errors and saw the following under the Response section

    {
      "error": "RecordInvalid",
      "description": "Record validation errors",
      "details": {
        "status": [
          {
            "description": "Status: closed prevents ticket update"
          }
        ]
      }
    }

    I took another look at my trigger and realized when I first set it up instead of using "Ticket is Updated" I used "Status has changed"

    Am I correct that the issue was related to the trigger trying to update a closed ticket and failing?

     

     

    0
  • Sebastiaan Wijchers

    Hello Sarah,

    That's correct!

    You could add a condition something like; 'status is less than closed' to prevent this.

    With kind regards,

    Sebastiaan
    Sparkly ⭐

    0
  • Jimmy Rufo

    Does anyone know if we can create a custom field in a ticket where an agent can add a pre-defined tag (that would pre-populate when typing), or add a new tag as necessary?  Seems this issue adds a new tag which is great, but I'd likely want to use it as well for staff to enter existing tags.

    Basically, a replication of the "Tags" field, but renamed for specific tag utilization, and entry, and make it required to have a tag.

    0
  • Gail Leinweber
    Zendesk Customer Care

    Hi Jimmy,

    A text field won't do what you're describing (text fields don't convert their values to tags), but if you only have a set number of tags that want for tickets and do want one one of them to be present on every ticket then a drop-down field might work for you. Drop-down field values all have tags associated with them, so you could make the drop-down field required to solve the ticket and then look for the tags associated with the field values.

    If you start typing the name of the value you're looking for in a drop-down field, that does do a search of the values available so that would also help with auto-filling, but it won't allow for new values to be added in the field without an admin actually updating the field options.

    0
  • Jimmy Rufo

    Hi @...,


    Thanks for the feedback.  That's the crux of my issue, as being the admin in question, I don't want to have to continuously maintain this particular dropdown with new values to choose, and want the users to help maintain in this case.  The "Tags" field works in this fashion I believe, so I was hopeful we could do the same with a new field.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk