From Bright Pattern Documentation
< 5.8:Zendesk-integration-guide
Revision as of 23:13, 11 January 2021 by imported>Tracy
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.8

Ways to Use the Zendesk Request API Block

This article describes the most popular use cases for using the Zendesk Request API scenario block. You will learn how to screen pop a Zendesk ticket to agents, create a new Zendesk request and screen pop it to agents, update a Zendesk ticket, and create a new Zendesk ticket on behalf of another Zendesk user.

Prerequisites

  • Have administrator privileges for Bright Pattern Contact Center.
  • Use Bright Pattern Contact Center version 5.5.x or later.
  • In the integration account properties, set OAuth access token as the authorization type.
  • Have administrator access to the Zendesk user interface and API.


Use Case: Screen Pop a Specific Zendesk Ticket to an Agent

You can use the Zendesk API Request block in conjunction with the Zendesk Screen Pop block to pop a ticket to an agent for an incoming call. To follow this procedure, you will need to know a Zendesk ticket number for plugging in to the Raw JSON field of the scenario block.

Click to download a sample scenario: Zendesk Screen Pop a Ticket Example.zip


Example scenario in the Scenario Builder application


Step 1: Create a voice scenario

In the Contact Center Administrator application, section Scenarios > Voice, create a new basic voice scenario that includes the following scenario blocks: Zendesk Select Account, Zendesk API Request, and Zendesk Screen Pop.

Step 2: Specify a Zendesk integration account

In the Zendesk Select Account block properties, select a Zendesk integration account that is configured for your contact center.


Zendesk Select Account scenario block properties


Step 3: Configure Zendesk API Request properties

In the Zendesk API Request scenario block properties, set the following:

  • Name - Type a name for this block.
  • Request type - Set GET.
  • URL - Leave empty.
  • Extra headers - Leave empty.
  • Raw JSON - Paste your ticket object properties as raw JSON (see Sample Raw JSON below):
  • Initial path in the result JSON - Set id.
  • Scenario variable prefix for JSON data - Set zendesk.id.
  • Use GetNext block to loop through data - Leave unchecked.


Sample Raw JSON:

{
"id": 35436,
"created_at": "2009-07-20T22:55:29Z",
"updated_at": "2011-05-05T10:38:52Z",
"due_at": "2011-05-24T12:00:00Z",
"subject": "Help request",
"description": "This is my description.",
"status": "open",
"priority": "normal",
"type": "problem",
"organization_id": 509974,
"assignee_id": 72983,
"group_id": 8665,
"requester_id": 1462,
"collaborator_ids": [],
"can_be_solved_by_me": false,
"ticket_form_id": 2,
"via": {
"channel": "web"
}
}


Zendesk Request API scenario block properties with completed fields


Step 4: Configure Zendesk Screen Pop properties

In the Zendesk Screen Pop block properties, set the following so a ticket object will be screen popped:

  • Pop screen upon answer - Optional.
  • Object - Select the radio button.
  • Object ID - Set variable $(zendesk.id).
  • Object type - Select Ticket.


Zendesk Screen Pop scenario block properties


Step 5: Save the scenario

When you are done setting up the voice scenario, click Save to save your changes.

Step 6: Test the scenario

Test that the scenario works by doing the following steps:

  1. In Zendesk, log in to the integrated Agent Desktop widget as an agent who is assigned to a team that can handle service calls, and make yourself Ready.

  2. From a separate phone, call your contact center’s access number. The call should be routed to you because you are logged into Zendesk, and a specific ticket should be popped to your screen.


Use Case: Create a New Request and Screen Pop It to an Agent

You can use the Zendesk API Request block in conjunction with the Zendesk Screen Pop block to create a new request and screen pop the request to an agent for an incoming call.

Click to download a sample scenario: Zendesk Create and Screen Pop a New Request Example.zip


Example scenario in the Scenario Builder application


Step 1: Create a voice scenario

In the Contact Center Administrator application, section Scenarios > Voice, create a new basic voice scenario that includes the following scenario blocks: Zendesk Select Account, Zendesk API Request, and Zendesk Screen Pop.

Step 2: Specify a Zendesk integration account

In the Zendesk Select Account block properties, select a Zendesk integration account that is configured for your contact center.


Zendesk Select Account scenario block properties


Step 3: Configure Zendesk API Request properties

In the Zendesk API Request scenario block properties, set the following:

  • Request type - Set POST.
  • URL - Leave empty.
  • Extra headers - Leave empty.
  • Raw JSON - Paste your request object properties as raw JSON (see Sample Raw JSON below):
  • Initial path in the result JSON - Set subject.
  • Scenario variable prefix for JSON data - Set zendesk.subject.
  • Use GetNext block to loop through data - Leave unchecked.


Sample Raw JSON:

{
"request": {
"requester": {"name": "Anonymous customer"},
"subject": "Example",
"comment": {"body": "Example text." }
}
}


Zendesk Request API scenario block properties with completed fields


Step 4: Configure Zendesk Screen Pop properties

In the Zendesk Screen Pop block properties, set the following so a ticket object will be screen popped:

  • Pop screen upon answer - Optional.
  • Object - Select the radio button.
  • Object ID - Set variable $(zendesk.subject).
  • Object type - Select Ticket.


Zendesk Screen Pop scenario block properties


Step 5: Save the scenario

When you are done setting up the voice scenario, click Save to save your changes.

Step 6: Test the scenario

Test that the scenario works by doing the following steps:

  1. In Zendesk, log in to the integrated Agent Desktop widget as an agent who is assigned to a team that can handle service calls, and make yourself Ready.

  2. From a separate phone, call your contact center’s access number. The call should be routed to you, and the newly created request should be popped to your screen.


Use Case: Update a Zendesk Ticket upon Incoming Call

You can use the Zendesk API Request block to update a Zendesk ticket when a call is routed to an agent.

Click to download a sample scenario: Zendesk Update a Ticket Example.zip


Example scenario in the Scenario Builder application


Step 1: Create a voice scenario

In the Contact Center Administrator application, section Scenarios > Voice, create a new basic voice scenario that includes the following scenario blocks: Zendesk Select Account and Zendesk API Request.

Step 2: Specify a Zendesk integration account

In the Zendesk Select Account block properties, select a Zendesk integration account that is configured for your contact center.


Zendesk Select Account scenario block properties


Step 3: Configure Zendesk API Request properties

In the Zendesk API Request scenario block properties, set the following:

  • Request type - Set PUT.
  • URL - Set requests/170.json.
  • Extra headers - Leave empty.
  • Raw JSON - Paste your ticket object properties as raw JSON (see Sample Raw JSON below):
  • Initial path in the result JSON - Set subject.
  • Scenario variable prefix for JSON data - zendesk.subject
  • Use GetNext block to loop through data - Leave unchecked.


Sample Raw JSON:

{"request":
{"comment":
{"body": "Thanks!"}
}
}


Zendesk Request API scenario block properties with completed fields


Step 4: Save the scenario

When you are done setting up the voice scenario, click Save to save your changes.

Step 5: Test the scenario

Test that the scenario works by doing the following steps:

  1. In Zendesk, log in to the integrated Agent Desktop widget as an agent who is assigned to a team that can handle service calls, and make yourself Ready.

  2. From a separate phone, call your contact center’s access number. The call should be routed to you, and the Zendesk ticket will be updated.

  3. Look up the ticket in Zendesk and check that it has been updated accordingly.


Use Case: Create a New Zendesk Ticket on Behalf of Another Zendesk User

You can use the Zendesk API Request workflow block to make API requests on behalf of any end user, and because you are an authenticated admin, the end user's email does not need to be verified. If a record is created, updated, or deleted, the change is associated with the end user, not you.

This article will show you how to use the Zendesk API Request workflow block to create a new Zendesk ticket on someone else’s behalf.

Click to download a sample scenario: Zendesk Create Ticket on Behalf of User Example.zip


Example scenario in the Scenario Builder application


Step 1: Create a voice scenario

In the Contact Center Administrator application, section Scenarios > Voice, create a new basic voice scenario that includes the following scenario blocks: Zendesk Select Account and Zendesk API Request.

Step 2: Specify a Zendesk integration account

In the Zendesk Select Account block properties, select a Zendesk integration account that is configured for your contact center.


Zendesk Select Account scenario block properties


Step 3: Configure Zendesk API Request properties

In the Zendesk API Request scenario block properties, set the following:

  • Request type - Set POST.
  • URL - Set tickets.json.
  • Extra headers - Click to add an extra header with the following name (key) and value:
    • Name - Set X-On-Behalf-Of.
    • Value - Set the email address of the user who you are making the request for in the Zendesk system (e.g., "first.last@email.com"); note that the value must be a real user in the Zendesk system.
  • Raw JSON - Paste your ticket object properties as raw JSON (see Sample Raw JSON below):
  • Initial path in the result JSON - Set subject.
  • Scenario variable prefix for JSON data - zendesk.subject
  • Use GetNext block to loop through data - Leave unchecked.


Sample Raw JSON:

{
"ticket": {
"subject": "Behalf Of Header",
"comment": { "body": "first.last@email.com" },
"priority": "urgent"
}
}


Zendesk Request API scenario block properties with completed fields


Step 4: Save the scenario

When you are done setting up the voice scenario, click Save to save your changes.

Step 5: Test the scenario

Test that the scenario works by doing the following steps:

  1. In Zendesk, log in to the integrated Agent Desktop widget as an agent who is assigned to a team that can handle service calls, and make yourself Ready.

  2. From a separate phone, call your contact center’s access number. The call should be routed to you and at the same time, the Zendesk system should then contain a new ticket with the correct information. The ticket requester should be the user that was set in the extra header of the Zendesk Request API block.

  3. Look up the ticket in Zendesk and check that the requester is the correct user.

    < Previous