Recent searches


No recent searches

Workaround: Adding a name field to your Help Center ticket form



We've seen multiple people struggling with the fact there isn't a out-of-the-box way to display the name field in the ticket form. Today we'd like to share the workaround which we use to meet our customers needs when we're implementing Zendesk.

The current problem with email addresses is they often don't contain the full name at all, sometimes it's even worse when your organisation is dealing with consumers because they often use nicknames in the email addresses. Now this means agents have to update the users which submit a ticket via the webform on the Help Center. To solve this issue we've created an easy to setup workaround which is using the Zendesk API and doesn't require any changes to the templates of your Help Center*. Before proceeding you need to make sure you've added a custom ticket field .

  1. Go to the Zendesk Admin by clicking the Admin gear icon and navigate to Extensions (under Settings).
  2. Press Add target and choose URL target .
  3. Make sure to fill in the following values, replace the {{ticket.ticket_field_00000000}} with the custom ticket field which holds the Name of your user and replace {{subdomain}} with your Zendesk subdomain.
    Title Update requester name
    URL https:// {{subdomain}} .zendesk.com/api/v2/users/{{ticket.requester.id}}.json?user[name]={{ticket.ticket_field_00000000}}
    Method PUT
    Attribute Name value
    Basic Authentication Your Zendesk account
  4. Choose Create target in the dropdown and press Submit .
  5. Navigate to Triggers and click A dd trigger .
  6. Add the following to Meet all of the following conditions:
    Ticket: Is...
    Created
    Ticket: Channel Is Web form
  7. Add the following to Perform these actions:
    Notifications: Notify target
    Update requester name
    Message: update name
  8. Press Create trigger

* This change could result in having two name fields on the Feedback Tab.


0

47

47 comments

Official

I've got this working again, with the help of Eugene Orman from ZenDesk support.

For 'Basic Authentication' at the bottom of the extension, add /token to the end of your username and then use an API token:

 

To generate an API token, go to Admin > Channels > API

Under the Setting tab, click to enable Token Access then add a new token. Give it any label you like and then immediately copy the API token as you won't get to see it again.  

NOTE: I do still get the 'HTTP client call failed' error message when testing the extension. But go ahead and save it anyway. The end result worked for me.  

I also updated the trigger to include 'Current User is end user':


 

 

 

0


This workaround appears to point to features that are no longer available, or perhaps they have moved and I cannot find them. I attempted to do this via a webhook instead, but whether I choose JSON, XML, or Form Encoded, I do not know what to put in the body of the trigger. Has anyone done this via webhook and can offer some guidance?

0


hey Ulises Soto

Just in case you haven't figured this out yet. I have an article here on how you can add a ticket ID + some extra text into a custom field. Feel free to check it out here. :)

How to copy ticket data into a custom text field using a webhook

 

1


Hello Ulises,
 
Yes, it is possible to add a word or letter before a placeholder. Based on your example, you can do this as {{ticket.ticket_field_<field ID number>}} = record {{Ticket.id}} and the field value will show the word record with the ticket ID.
 
You can also visit this article about using placeholders for custom fields.
 
Hope this helps!

1


Hello, is there a way I can add the Ticket Id to a custom ticket field after some letters?

Example: Customer ticket field = record(Ticket ID)

0


Hi Michael,
 
I just re-read through the requirements and you should actually be good with this workflow. The potential race conditions issue lies in updating a ticket with a trigger executed from the same ticket. If you're updating a user profile based on a trigger from a ticket, you shouldn't have any problems!

0


Thanks Tipene. Understood.

What would be the best way to achieve the same end goal as this post though? i.e. end user submits webform; they fill out a custom ticket field ('Name') -> and then have that automatically update the user profile; so macro's with "{first.name.requester}" are accurate?

 

 

0


Hey Michael,
 
This workflow uses URL targets which are still supported at this time. That said, URL targets are considered legacy and can be superseded by webhooks in most use cases. Bear in mind though that we generally advise against using targets and webhooks together with triggers and automations to update a ticket as this can lead to race conditions. You can read more about that at the link below:
 
https://support.zendesk.com/hc/en-us/articles/4408882855578-Can-I-use-a-trigger-and-a-webhook-to-update-tickets-
 
I hope this helps!
 
Tipene

1


Hi team,
Checking this is still viable? It's done via webhooks now? Any particular changes? 

0


Hi guys, I want to summarize 2 common mistakes

 

1 - Basic Authentication

Username: Email@email.com/token

Password: API TOKEN

 

2 - Custom Field from Ticket placeholder

{{ticket.ticket_field_ID}} is not {{ticket.123456789}} but {{ticket.ticket_field_123456789}}. 

 

So once you find your custom id from field merge it with above placeholder replacing the numeric part. 

In my example it was like this. 

https://subdomain.zendesk.com/api/v2/users/{{ticket.requester.id}}.json?user[name]={{ticket.ticket_field_360010332318}}

 

Cheers. 

1


Hello Rick,

I'm sorry! I'm not sure if I understand your question. Could you clarify your question a bit for me? Screenshots would really help. Thanks in advance! :)

0


Sign in to leave a comment.

Didn't find what you're looking for?

New post