Displaying a caller's new ticket in Support

On detecting the system event associated with an agent answering an inbound call, the telephony system can create and display a new ticket in Support to let the agent capture details about the call.

The flow consists of making preliminary requests to retrieve the Zendesk user id of both the agent and the caller, then making a request to the Talk API to create and display the ticket for the agent in Support.

  1. Retrieve the agent's Zendesk user id. See Retrieving the Zendesk user id of a call-center agent in this guide.

  2. Retrieve the caller's Zendesk user id.

    You can search for an existing user in Support. See Retrieving the Zendesk user id of a caller in this guide.

    If the user doesn't exist in Support yet, create a user profile for the caller. See Creating a user profile in Support for a caller in this guide.

  3. Create and display a ticket in Support using the Talk API (not the Support API).

    Use the Create Ticket endpoint in the Talk API to create and display the ticket:

    POST /api/v2/channels/voice/tickets.json

    The endpoint takes a JSON object that specifies the viewing agent and describes the ticket:

    {  "display_to_agent": 4321,  "ticket": {    "via_id": 45,    "subject": "My printer is on fire!",    "comment": { "body": "The smoke is very colorful." },    "requester_id": 5678,    "tags": ["premier-status", "call-center"],    "priority": "urgent"  }}

    In the example, the agent's user id is 4321 and the caller's user id is 5678.

    You must specify one of the following values for via_id depending on the type of phone call: 45 (inbound call) or 46 (outbound call).

    See Create Ticket in the Talk API docs.

You can save more details about the call by adding one or more tags to the ticket, or by using custom ticket fields to record the information. See Saving other data in a ticket.