
Creating callback requests via Zendesk AI Agents
This article showcases a custom Zendesk AI Agent use case: enabling callback requests via Messaging. By combining Voice, API integrations, and phone validation, it bridges native gaps and lets customers request a call—fully automated, no agent needed to start.
As an omnichannel solution Zendesk gives companies the ability to support their customers over tickets, voice and conversations. Tickets is the channel that provides support over email, regardless of those requests being raised via email, a webform, API. Conversations means messaging via the web widget and mobile SDK, as well as social messaging channels like WhatsApp, Instagram or Facebook Messenger. And voice, that's your phone conversations over via Zendesk Voice.
When Zendesk still offered their classic Web Widget all these channel types were available right from that one embed on your website. Customers could chat to agents, leave a message via a webform, and request a callback from your team.

With the move to Messaging and the new Zendesk Web Widget we gained a lot. Messaging turned synchronous chat into asynchronous conversations, replacing the chat and webform option into one channel that allows for chat conversations without the need for all parties to be online at the same time.
And with the new Digital Voice option in Zendesk, customers can call your support team directly from the Web Widget. That new channel however is not as tightly integrated as the old Zendesk Talk was. There's no easy way to add a Call me button, and there's no built-in way to handle callback requests.

This article will leverage Zendesk Agents AI to provide native support for callback requests right from within the Web Widget and Mobile SDK.
Setting up Zendesk Voice
Callback requests in Zendesk Voice solve that problem where customers want to talk to your team but either the queue is too long or no agents are available. Instead of the customer waiting in a call for a long time, they can now simply request a callback. Agents who are online in Zendesk will see that call request and automatically dial out to the customer.
It's convenient for your customers, they don't need to wait, and easy for your agents. They can prepare for the call, make sure they've got the right context before they call the customer.
Setting this up is done in Admin Center by toggling the Callback? option under a specific Lines' configuration.

While you're in this page, take a look at the Source of the webpage and navigate to the Network tab. You'll find a network request to lines.json
. Within that requests' response you need to look for your phone line and copy its id
.

Our Flow
Now that we can offer Callbacks, we can start integrating this into our AI Agent. We'll do this in 4 steps
- We create an API integration that leverages the Zendesk API to create a callback request
- We create a custom entity to validate phone numbers (so they match the format Zendesk requires)
- We add a use case to detect a customers' intent
- We create a procedure or dialogue flow to handle the conversation
Creating the API Integration
We need to create a new API integration in our AI Agent dashboard. Give it a logical name like Callback request.

Our API integration requires a single request parameter callback_number
. That's the number our customer wants to receive the call on. (If you already store their phone number in a different parameter, you can use that one)
Next we can start filling in the Environment parameters.
For the method type and URL use:
POST https://subdomain.zendesk.com/api/v2/channels/voice/callback_requests
Authentication is a two step process.
- Under authorization choose Basic Auth and enter an
[email protected]:token
and a Zendesk API token in the username and password field. - Under the headers add key
Authorization
and valueBasic {{apiToken}}
Finally, we can add our body:
{
"callback_request": {
"phone_number_id": 12571075841682,
"requester_phone_number": "{{callback_number}}"
}
}



If the API integration works it'll return a Success 201
code without any further content. You can test this for yourself with the Test integration button.
If the request does fail, the failure tab can be used to collect the data.code
and data.message
. Examples of failures could be a duplicate request for a callback, too many calls in the queue or a malformed request.

Adding a Content Entity
Speaking of a bad request, most of the errors we could encounter can be caused by wrongly formatted phone numbers. Zendesk works with the internationally standardized E. 164 format, or +[Country Code][Number] format.
We can validate the phone numbers customers provide by passing them through a custom entity first. If the format is correct, the entire is recognized. In all other cases we can alert the customer that they should reformat their number.
Go to content | Entities and add a new Entity. Give it a logical name like belgium_phone
and add a regex string that matches your countries format:
^(((+|00)32[ ]?(?:(0)[ ]?)?)|0){1}(4(60|[789]\d)/?(\s?\d{2}.?){2}(\s?\d{2})|(\d/?\s?\d{3}|\d{2}/?\s?\d{2})(.?\s?\d{2}){2})$

Writing the dialogue
Now that we've got the technical setup done, we can finally dive into the fun part: building our use case. I'll build the flow twice. First as a classic Dialogue Flow with steps and flows. And secondly as a new Procedure leveraging the new Agentic AI with reasoning capabilities.

Use case
Any new use case in AI Agents Advanced starts with defining a customers' intent. In our case we built a new Use Case that's called 'Request a callback' and has a more specific description
Customers wants to get a call from the customer care team


Dialogue Flow
Our dialogue flow started with a welcome message by the Agent acknowledging the use case.
We then add our API integration we created earlier. Adding this step will automatically add a lot of extra steps to our flow.
The Collect Parameter branch can be used to add our Entity as part of a Customer Message step. When the Entity is recognized we can store the response as a parameter called callback_number
.


Under the Success branch we can let the customer know they can expect a call, and add a resolved resolution state.
The Failure branch can be used to display our error_message
and error_code
variables, combined with an unresolved state.
Publish your flow and you've got a working callback request!
Procedure
Building out our callback flow as a dialogue flow is not that complicated. Most of the work is done by the Dialogue Builder when we add the API step.
Even so, the new Procedures available within the new Agentic AI Agents EAP make this process even easier.
We can basically paste the intro of this article into the procedure text field, and Zendesk takes care of the rest:
We want to generate a callback request for a customer. We can do this by requesting a valid Belgian phone number.
We then use🔌 Callback Request [Production]
to create the request.
If successful we let the customer know he'll get a call shortly.
If it fails we let them know the error_code and error_message the API returns.

The end result
Now that we've built out our use case, we can put it to the test.

Once the callback goes through, our Agent gets a popup from Zendesk Voice allowing them to receive the callback.

One thing that's missing in this flow is an option to see the previous conversation of our customer with the AI Agent. If you want to solve this issue: take a look at Bot History Viewer, a Marketplace I build with my team at Tripelhop. This app allows you to see conversations that aren't escalated to your team right from within Agent Workspace.
Another approach might be to escalate the conversation at the end of the use case. This will create a ticket in Zendesk. In most scenarios the outbound call for your user will be added to the open ticket (as long as your user has the phone number associated with their profile)
Conclusion
This article serves two purposes.
On one side it shows a functional workaround for a system limitation. Zendesk Voice and its digital voice and callback capabilities can be efficient ways to allow escalations from AI Agent to human agent. And for those scenarios where a human touch is needed, actually speaking to a human instead of chatting is probably more efficient. I hope Zendesk offers these abilities native someday, maybe as part of the same dropdown that offers escalation paths to WhatsApp or Instagram?

Even ignoring filling in product gaps, this article also showcases how you can easily expand AI Agents to integrate with not only external platforms but also Zendesk itself. You can use these API integrations to get information from Zendesk user profiles. You can retrieve custom objects data. Search for open tickets for that user and show them the current status. Or you can use it to create tickets and callback requests like I've shown here.