We’ve put together this comprehensive guide to help you sync custom field data from user profiles to ticket fields automatically in Zendesk. In this article, you’ll find a step-by-step walkthrough to set up webhooks and triggers that copy user information like enrollment dates, account details, or any custom data to tickets for better reporting and visibility.
But before we start, if you’d like to learn more about Zendesk webhooks and API documentation, check out the official Zendesk API reference here.
Here’s how to automatically sync user custom fields to ticket fields:
1. Understanding the Use Case
Why sync user fields to ticket fields?
There are several scenarios where you’d want to copy data from user profiles to tickets:
- Reporting in Explore – User fields aren’t directly accessible in ticket reports
- Historical data tracking – Capture user data at the time of ticket creation
- Workflow automation – Use ticket fields in triggers and automations
- Data visibility – Show user information directly on the ticket interface
In our example, we’ll sync an “Enrollment Date” from the user profile to a ticket field, but this method works for any custom field type.
2. Prerequisites and Setup
What you’ll need before starting
Before setting up the webhook sync, ensure you have:
- Admin access to your Zendesk instance
- User custom field created (e.g., “Enrollment Date”)
- Ticket custom field created with matching data type
- API token generated for authentication
- Dedicated API user (recommended for better security)
To generate an API token:
Navigate to: Admin Center > Apps and integrations > APIs > Zendesk API > Add API token
Pro Tip: Use a Dedicated API User
Create a dedicated user account for API integrations instead of using personal accounts. This prevents disruptions when team members leave and provides better audit trails.
3. Create the Webhook
Setting up the webhook to update tickets
Navigate to: Admin Center > Apps and integrations > Webhooks > Actions > Create webhook
Configure these settings:
Setting | Value |
Name | Sync User Fields to Ticket |
Endpoint URL | https://YOURDOMAIN.zendesk.com/api/v2/tickets/{{ticket.id}} |
Request method | PUT |
Request format | JSON |
Authentication | Basic authentication |
Username | apiuser@company.com/token |
Password | [Your API token] |
Important: The username must include “/token” at the end (e.g., apiuser@company.com/token). This tells Zendesk you’re using token authentication.
4. Create the Trigger
Configure when the sync should happen
Navigate to: Admin Center > Objects and rules > Business rules > Triggers > Add trigger
Trigger setup:
Name: Sync User Enrollment Date to Ticket
Conditions:
- Ticket is Created
- (Optional) Add any other conditions to limit when sync occurs
Actions:
- Notify active webhook > [Select your webhook]
JSON body for the webhook:
{
"ticket": {
"custom_fields": [{
"id": 123456789,
"value": "{{user.custom_fields.enrollment_date}}"
}]
}
}
Finding your field IDs and keys:
- Ticket field ID: Admin Center > Objects and rules > Tickets > Fields > Click on your field
- User field key: Admin Center > People > Configuration > User fields > Look for “Field key”
5. Common Issues and Troubleshooting
What to do when things don’t work
Based on the conversation, here are common issues and their solutions:
Issue | Solution |
422 Unprocessable Entity error | Check JSON syntax – ensure all quotes and brackets are properly closed |
Field not updating | Verify the user has a value in the custom field before testing |
Authentication failed | Ensure “/token” is added to username and API token is valid |
Trigger not firing | Check trigger conditions and position in trigger list |
To check webhook logs:
Admin Center > Apps and integrations > Webhooks > Click on your webhook > Activity log
6. Testing Your Setup
Verify everything works correctly
Follow these steps to test your webhook sync:
- Ensure test user has data – Add a value to the user’s custom field
- Create a test ticket – Submit as the test user
- Check ticket events – Look for “Trigger fired” notification
- Verify field update – Custom field should show the synced value
- Review webhook logs if sync didn’t work
The sync happens almost instantly after ticket creation. If you don’t see the update within a few seconds, check the webhook activity logs for errors.
7. Advanced Configurations
Sync multiple fields or add conditions
You can extend this setup to sync multiple fields or add more complex logic:
Syncing multiple fields:
{
"ticket": {
"custom_fields": [
{ "id": 123456789, "value": "{{user.custom_fields.enrollment_date}}" },
{ "id": 987654321, "value": "{{user.custom_fields.account_type}}" },
{ "id": 456789123, "value": "{{user.custom_fields.region}}" }
]
}
}
Additional trigger conditions you might use:
- Only sync for specific organizations
- Only sync when user field has a value
- Different syncs for different ticket forms
- Update on ticket update, not just creation
8. Use Cases and Examples
Real-world applications for field syncing
Here are practical examples of user-to-ticket field syncing:
User Field | Use Case |
Account Manager | Automatically assign or notify the right team member |
Contract End Date | Flag tickets from users with expiring contracts |
Customer Tier | Apply different SLAs based on subscription level |
Region/Timezone | Route tickets to appropriate regional teams |
Language Preference | Assign to agents who speak that language |
9. Best Practices
Tips for maintaining your webhook sync
- Document your webhooks – Keep a record of what each webhook does
- Use descriptive names – Make it clear what fields are being synced
- Test in sandbox first – Always test in a non-production environment
- Monitor webhook activity – Regularly check logs for failures
- Consider performance – Too many webhooks can slow ticket creation
- Secure your API tokens – Rotate them periodically
Performance Tip
If syncing multiple fields, use one webhook with multiple fields rather than multiple webhooks. This reduces API calls and improves performance.
10. Alternative Solutions
Other ways to achieve similar results
While webhooks are powerful, consider these alternatives:
- Zendesk Apps – Custom apps can sync data with more complex logic
- API Scripts – External scripts for bulk updates or scheduled syncs
- Integration platforms – Tools like Zapier or Workato for no-code solutions
- Explore relationships – Sometimes you can create reports using relationships instead
Key Takeaways
Syncing user custom fields to ticket fields using webhooks is a powerful way to:
- Enable better reporting in Zendesk Explore
- Capture historical data at ticket creation time
- Automate workflows based on user attributes
- Improve agent efficiency with visible context
That’s it! With this webhook setup, you can automatically sync any user field to ticket fields, opening up new possibilities for reporting, automation, and customer service excellence.
Need help with more advanced Zendesk configurations? Check out the Zendesk Help Center or reach out to the Zendesk community.
Learn more: Zendesk Tickets API
Webhook docs: Creating webhooks in Zendesk