Ticket custom fields and user fields
Answered
Posted Apr 22, 2022
Hey there,
I'm currently looking to store the clients phone number while creating a new request. I didn't find any option regarding this matter in the Forms/Fields, only for email field that is added automatically in the form when the user is not signed in. Is there a way to save this phone number custom field inside the user profile contact details information automatically ? Currently our agents have to copy the number from the custom field in the ticket to the user profile.
Thanks !
1
14
14 comments
ASHLEY SANYAL
Hi! I have a similar situation where I went to get a piece of information from the user profile and insert it into the custom field on the ticket. In this example would I change it to "Get" and put in the custom ticket ID of the field from the user profile instead of the custom ticket field ID? Do I need to add a step to get the user profile field to populate in the custom ticket field? Any help would be greatly appreciated!!
0
Carlos
Thank you very much guys, both answers complement each other and of course it worked !
1
Rafael Santos
Just one note there.
On step 2, the Request method should be PUT instead of GET.
API Reference / Ticketing / Users / #Update User
Also, this might fail if you have Validate user phone numbers enabled, as the phone numbers will have to be on the E.164 format
What are the accepted phone number formats for Talk?
2
Sam
Hi Carlos Pozo ! This is certainly possible. A similar setup is located in this comment but below is a setup specific to your situation.
Create a webhook that points to the user endpoint
Name: Memorable name that uniquely identifies the webhook
Endpoint URL: https://subdomain.zendesk.com/api/v2/users/{{ticket.requester.id}}.json
Request method: GET
Request format: JSON
Authentication: Whichever you use. For API, we generally use Basic Authentication with username@domain.com/token for the user, and your API token for the password
Create a custom ticket field (if not done already)
Create a trigger that writes the phone number on ticket creation
Type or select actions: Notify active webhook
Select the webhook you created earlier for the user endpoint
JSON body:
{
"user": {
"phone": "{{ticket.ticket_field_replacewithcustomfieldID}}"
}
}
Now, test it out and it should send the phone number captured in your custom field to the user profile!
3
Sign in to leave a comment.