Workaround: Adding a name field to your Help Center ticket form | Community
Skip to main content

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

  • November 5, 2014
  • 47 replies
  • 0 views

Show first post

47 replies

  • June 6, 2018

Has anyone found the resolution to the issue, when you test you get  HTTP client call failed.

It seems to have to do with the {{ticket.ticket_field_ID}} place holder.

If I replace this with test like hello it works fine

Would love to get this working


  • April 15, 2019

Can we combine 2 fields using this method, or it should be 2 different targets & triggers? I want to add a Country field in the web forms and update the user field accordingly. Thank you!


Brett13
  • Community Manager
  • April 23, 2019

@Aswin you'll most likely need to set these up as 2 different targets, however, you should be able to have multiple Notify Target actions within a trigger.

Cheers!


  • April 23, 2019

Thanks, Brett. Assuming that the Country field's ID is 12345, what is the value we should use in the place of 'name' in the example URL? Where can we find the equivalent for all other fields?

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


Brett13
  • Community Manager
  • April 23, 2019

Hey Aswin,

That I'm not 100% sure about since this is an area where my knowledge is rather limited. You'd need to figure out how to call to that custom user field and populate that information from your ticket field which will be handled differently from just updated the system name field.

Apologies for not being able to provide additional information but hopefully someone else can jump in and offer up some guidance. 


Theodore11
  • September 20, 2019

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?


Brett13
  • Community Manager
  • September 30, 2019

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!


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


Active Feature Request (please vote):

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

@Martijn Snels · pluscloud.nl

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


  • August 6, 2020

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


  • August 10, 2020

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? :)

 

 


  • August 14, 2020

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.


  • August 14, 2020

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! :)


Ali28
  • November 13, 2020

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. 


Michael214
  • October 26, 2022

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


Tipene
  • October 27, 2022
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

Michael214
  • October 28, 2022

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?

 

 


Tipene
  • October 28, 2022
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!

  • August 4, 2023

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)


  • August 8, 2023
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!

Amie11
  • September 22, 2023

hey @zendesk14

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

 


  • May 15, 2024

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?