Making calls by clicking a phone number in Support
You can let agents make outbound calls by clicking a phone number in a ticket or a user profile in Zendesk Support.
Calling from a user profile:
Calling from a ticket:
How it works
The phone numbers in tickets and profiles are activated by installing a Zendesk app that listens to the voice.dialout
event in the Zendesk Apps framework. See Talk Partner Edition events in the framework docs.
When a user clicks a phone number in a ticket or user profile, the voice.dialout
event fires and returns an event payload such as the following:
{
"number": "+12125550000",
"from": "user_phone_identity",
"userId": 123,
"ticketId": 123
}
Use the data (specified as e
in the following example) to initiate an outbound call:
client.on('voice.dialout', function(e) {
makeCall(e);
});
See Working with events in the framework docs.
You can use the optional voice.error
event to handle errors. The voice.error
event fires when something goes wrong with the voice.dialout
event. For example, if the TPE subscription is not available for the current account, the voice.error
event fires and returns the following payload:
{
"code": 1,
"message": "Forbidden: check Talk Partner Edition subscription"
}
Sample app
See the Talk Partner Sample App on GitHub. The app listens to voice.dialout
and voice.error
and displays their payload.