Have you ever encountered a situation where a user's profile displays the first part of their email address instead of their actual first and last names? This occurs due to a limitation in the Zendesk system with ticket forms or when the customer's name is not available in the email header, making it difficult for the system to extract the correct data.
We have a simple solution using a combination of a URL Target and Trigger. This method allows for an automatic update of the user's profile name based on the information they have entered into a custom name field.
These custom name fields can include options such as:
- Full Name (consisting of a single field)
- First Name & Last Name (comprising two individual fields)
In the following steps, we'll guide you through the process of updating the profile name using the data from a First Name & Last Name custom field on the ticket form.
Before you begin:
- Copy the custom field IDs for your Name or First and Last Name fields on your ticket form. We will need these for the placeholders inside the target URL
- Obtain your API token - Follow the steps here to Generate a new API Token in your Zendesk account
Creating the URL target:
- In Admin Center, click the Apps and Integrations icon (
) in the sidebar, then select Targets > Targets. - Click Add Target.
- Set up your target with the below:
-
- Title: Update requester profile name
-
URL:
-
https://SUBDOMAIN.zendesk.com/api/v2/users/{{ticket.requester.id}}.json?user[name]={{ticket.ticket_field_4412133573647}}+{{ticket.ticket_field_4412126062863}}
-
- Method: PUT
- Attribute name: value
-
Basic Authentication: Input your username and API key
- Username: janedoe@successcx.com/token
- Password: API Key
For the authentication, make sure you add the "/token" to the end of your email address in the username field and add the API token as the password.
Example URL: Full Name (consisting of a single field)
-
https://SUBDOMAIN.zendesk.com/api/v2/users/{{ticket.requester.id}}.json?user[name]={{ticket.ticket_field_4412133573647}} - You can see this URL only contains 1 placeholder for the Name field
Example URL: First Name & Last Name (comprising two individual fields)
-
https://SUBDOMAIN.zendesk.com/api/v2/users/{{ticket.requester.id}}.json?user[name]={{ticket.ticket_field_4412133573647}}+{{ticket.ticket_field_4412126062863}} - You can see this URL contains 2 placeholders with a + plus sign in between. The 2 placeholders bring in the First and Last name data whilst the + plus sign will input a blank space between the two names.
Example URL Target:
Creating the trigger:
- In Admin Center, click the Objects and rules icon (
) in the sidebar, then select Business rules > Triggers. - Click Add trigger.
- Create the trigger conditions under the ALL section:
- Ticket IS Created
- Channel IS Webform
- Next, configure the trigger to perform the following action:
- Notify Target | Update requester profile name
- Action = update name (just add this text into the message box)
Note: This establishes that all tickets that meet the above conditions will fire off the webhook and instruct the API to update the user profile name field accordingly.
Limitations:
- This workflow has only been tested with custom text fields and the user profile name field
Note: Please use this workflow at your own risk, Zendesk does not provide support for custom workflows of this nature.