Using Zendesk Custom Fields with AI Agents for Smarter Automation
Most Zendesk accounts store critical data in custom fields — order numbers, product categories, customer segments, brands. When a ticket arrives, this data is often more useful than the message body itself. Until recently, AI agents couldn't read custom fields. They had to rely on the customer typing the information into their message. That's changed.
The custom fields gap
A typical Zendesk account has 20–80 custom fields. Some are filled by the customer via ticket forms. Others are populated automatically by integrations, bots, or triggers. Fields like "Order Number", "Product Category", "Customer Tier", and "Language" are critical for routing and resolution — but they live in the ticket's field schema, not in the message text.
When an AI agent only reads the ticket subject and description, it misses this data entirely. The customer sends "Where is my order?" and the agent has to ask for the order number — even though it's sitting right there in a custom field.
How Macha reads custom fields
Macha's Zendesk connector includes a dedicated Get Ticket Custom Fields tool. When called, it:
- Fetches the ticket's custom field values (the raw
{id, value}pairs from Zendesk's API) - Fetches the field schema (field definitions with titles, types, and allowed values) — cached for 5 minutes to avoid redundant API calls
- Joins them and returns
{id, title, value}for every field — so the agent sees "Bestellnummer: 013724827106" instead of "field_1900003089273: 013724827106"
The agent doesn't need to know field IDs. It gets human-readable labels and can act on the values immediately.
Common use cases
- Order lookup: extract the order number from a custom field, call a shipping API, respond with status
- Language detection: read the language field, respond in the customer's language
- Tier-based routing: check the customer tier field, escalate VIP customers automatically
- Brand routing: read the brand field, apply brand-specific response templates
- Form validation: check required fields, ask the customer to fill in missing values
How it works with triggers
In an autonomous workflow, the agent reads custom fields as part of its first action on a new ticket. A typical flow:
- Trigger fires on "New Ticket"
- Agent calls Get Ticket — reads subject, description, conversation
- Agent calls Get Ticket Custom Fields — reads order number, brand, language
- Agent uses the custom field data to decide what to do next — look up the order, route to a team, or respond directly
The custom fields tool uses an in-memory schema cache with a 5-minute TTL, so the field definitions are only fetched once per connector — subsequent calls within the window skip the schema fetch and resolve labels from cache.