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

Hey team!

We followed the guide above and it worked great in our Sandbox. However, anytime a user submits a new ticket and changes their name (or misspells it), that update will get pushed through.

Is there anyway to modify this to check for data already inputted into the name field?

0


image avatar

Brett Bowser

Zendesk Community Manager

Hey Theodore,

This would most likely require some javascript on your end to validate the data inputted in this field. I've attached some documentation that may be helpful: Help Center JavaScript cookbook (Guide Professional and Enterprise)

Hopefully, other users can jump in and offer up some guidance for you as well.

Cheers!

0


Hey all,

 

Was wondering if this workaround is still functional?

I've set this up recently to get around the Webform having no Name field - at present, the Widget captures a Default Name which then becomes the Requester id, which is great, but any users submitting a request through the Webform have no Name option (as there is no default Name field here).

I've added a Ticket field titled 'Name' into the Webform, with the notion of disabling the Default Name field from the Widget and just using the custom field I've created - and was hoping I could use this workaround to then ensure any input in the custom field then triggers updating the Requester name to match.

I set the target for the API as: https:// {{subdomain}}.zendesk.com/api/v2/users/{{ticket.requester.id}}.json?user[name]={{ticket.ticket_(field name)_(field id)}}

- is this correct? I have the 'field name' as the name of the custom field, and 'field id' as the unique ticket field number.

Have also set the trigger / automation up exactly as outlined & screenshotted in the start of the thread, however any webform submission keeps defaulting the requester to the email name, and not the input 'Name' data.

Testing the extension also results in the fail others have mentioned.

Any suggestion on this? Feel like I'm missing something obvious!

Thanks! :)

 

- Christian

0


Active Feature Request (please vote):

Feature Request: Adding a name field to your Help Center ticket form

@...

I just posted a Feature Request for this at the link below. If you would like to see this feature please head over there and show your support. Please make sure to add an upvote and comment even if it is simply a "+1"

Also, you may consider adding it to your post to get the feature request more visible.

https://support.zendesk.com/hc/en-us/community/posts/360046927653-Feature-Request-Adding-a-name-field-to-your-Help-Center-ticket-form

0


How would you go about putting and organization field on a user record?

0


Hi Rick,

I found this user tip about Automatically Adding Users to Organizations based on a matching Ticket Field or Tag. Does this answer your question? If not, can you give more detail on what you're trying to do and I’ll be happy to help the best I can? :)

 

 

0


Erika,

The article doesn't solve my issue.  I want to add a field that is on the organization to the user record as well.

0


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


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


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

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

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


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


image avatar

Tipene Hughes

Zendesk Developer Advocacy

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


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


image avatar

Joyce

Zendesk Customer Care

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


hey Ulises

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


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


Please sign in to leave a comment.

Didn't find what you're looking for?

New post