= Purpose=
The ServicePattern [http://www.brightpattern.com/zendesk-integrations/ Zendesk Integration] Guide provides detailed instructions for setting up your ServicePattern contact center solution to function in an integrated manner with your Zendesk applications, including single agent sign-on, Zendesk-data-driven interaction routing, integrated agent desktop, screen-pop, activity history, and click-to-call functions.
= Audience=
This guide is intended for the IT/technical personnel responsible for the data infrastructure of the contact centers that use ServicePattern solutions for customer interaction processing and the Zendesk solution for customer relationship management. Readers of this guide are expected to have experience in administration of the above systems as well as solid understanding of contact center operations and resources that are involved in such operations.
= Integration Scope=
The scope of integration discussed in this guide includes the following elements:
* [http://www.brightpattern.com/zendesk-phone-integration/ Zendesk Phone Integration]
* [http://www.brightpattern.com/zendesk-chat/ Zendesk chat support], SMS, and mobile messenger apps integrations
* ServicePattern Agent Desktop embedded into the Zendesk application.
* Single sign-on, i.e., simultaneous user logging into ServicePattern and Zendesk systems.
* Use of Zendesk data to identify agents best qualified to handle an incoming interaction using the information provided by the caller via an interactive voice response (IVR) application as well as possible updates of Zendesk data via self-service IVR applications. Supported operations include searching for, creating, and updating Zendesk records.
* Screen-pop, i.e., display of relevant Zendesk records synchronized with interaction delivery to the agent. Currently, Zendesk tickets and user records can be displayed in this manner.
* Click-to-call, i.e., the capability to contact people who originated or handled a Zendesk ticket and initiate calls to them via a single click.
* Availability of interaction-processing details in the Zendesk ticket activity history including:
** Start time
** Contact name
** Contact number
** Duration
** Interaction direction (outbound/inbound)
** Disposition
** Access to recording/transcript
** Attached data
= Prerequisites=
You must have admin-level access to both ServicePattern and Zendesk systems.
In addition to access to all regular agent functions, you must have privilege ''Use Zendesk'' (see Contact Center Administrator application > ''Roles'' > ''Interaction Handling'' group of privileges).
All users of the integrated Zendesk/ServicePattern desktop must have accounts in both systems. For single sign-on, these users must have the same email address in both systems. (In ServicePattern, user’s email address in configured via the ''Users > Contacts'' tab of the Contact Center Administrator application.)
For types of integration described in this document, ServicePattern version 3.9 or later is required.
= Integrated Desktop, Click-to-Call and Activity History=
'''Step 1.''' Log into your Zendesk application, click the Admin icon [[File:zendesk-integration-guide-image2.PNG]] and go to the ''Apps > Marketplace'' page.
'''Step 2.''' Select the ''Omni-channel Cloud Contact Center for Zendesk'' application. Click ''Install App''.
::'''Note:''' If you cannot find this application in Zendesk Marketplace, you can request it from the Bright Pattern Support. You will receive a .zip file. Upload this file via ''Apps > Manage > Upload App'' and click ''Install App''.
[[File:zendesk-integration-guide-image3.png|thumb|400px|center]]
'''Step 3.''' In the form that appears, specify the URL that you normally use to open your ServicePattern Agent Desktop application. The URL should have the following format: ''https://./agentdesktop''
'''Step 4.''' By default, current ticket assignments are not affected by customer interaction delivery to specific agents. If you want the system to automatically assign screen-pop tickets to the agents that the corresponding interactions are routed or transferred to, select the ''Assign tickets on screenpop'' checkbox.
'''Step 5.''' If you intend to provide an integrated desktop to all internal Zendesk users regardless of their roles, leave the ''Enable role restrictions'' checkbox unchecked. Otherwise, select the checkbox and choose the roles of users who will have access to the integrated desktop (hold the Ctrl button to select multiple roles).
'''Step 6.''' The ServicePattern Agent Desktop widget will be shown in the top-right section of the integrated desktop. You can adjust its size using the ''AgentDesktop widget’s width'' and ''height'' parameters. Note however, that its default size is optimized to make the interaction handling controls clearly visible to the agent while taking up as little Zendesk application screen space as possible. Thus you might want to try it with the default size setting before applying any changes.
'''Step 7.''' Click ''Update''. You should now be able to see the ServicePattern Agent Desktop widget with a login dialog.
[[File:zendesk-integration-guide-image4.png|thumb|300px|center]]
'''Step 8.''' Log in with your ServicePattern credentials. By default, you login with a [[#topic_contact-center-administrator-guide/Softphones|softphone]]. To choose another device, click the current ''Phone device'' setting and select the desired type of device. For more information about the available device options, see section [[#topic_agent-guide/SelectingaPhoneDevice|Selecting a Phone Device]] of the ''ServicePattern Agent Guide''.
Note that if this is your first login into ServicePattern on the given computer, you will be prompted to [[#topic_agent-guide/InstallingandUpdatingAgentDesktopHelperApplication|install the Agent Desktop Helper Application]].
'''Step 9.''' The ServicePattern Agent Desktop widget will now show a standard set of telephony controls available to a contact center agent. For more information about these controls see ''ServicePattern Agent Guide''. Note that the appearance of these controls has been modified to match the overall look and feel of Zendesk application.
::'''Note:''' To minimize ServicePattern Agent Desktop Window, click the icon directly above it. When you are logged on, this icon reflects your agent state (or your presence state if you are not an agent). For example, when you are in the Ready state, the icon will look like this: [[File:zendesk-integration-guide-image5.png]]. Agent states and corresponding icons are explained in section [[#topic_agent-guide/HowtoInterpretYourCurrentStateInformation|How to Interpret Your Current State Information]] of the ''ServicePattern Agent Guide''. If you receive a new interaction, you will see the same interaction alert window that you would normally see in ServicePattern Agent Desktop and will be able to accept even if your ServicePattern Agent Desktop Window is minimized.
'''Step 10.''' To test the click-to-call function, select a Zendesk ticket assigned to someone who has a phone number configured in the system. The name of this person will appear in the Dial tab of the Agent Desktop with a click-to-call icon [[File:zendesk-integration-guide-image6.png]] next to it. Click this icon to make a call. When the call is answered, you should have all of the call control functions available to you via the integrated ServicePattern Agent Desktop Window (e.g., mute, hold, transfer, release). For more information, see [[#topic_agent-guide/Purpose|''ServicePattern Agent Guide'']].
::'''Note:''' When you transfer an interaction to another integrated desktop user, the Zendesk item that was open on your desktop at the time of transfer will be displayed for that user.
[[File:zendesk-integration-guide-image7.png|thumb|300px|center]]
'''Step 11.''' To test the activity history function, release the previously established call. Upon completion of the after-call work, you should be able to see a new internal note added to the last open ticket with basic data about the call you just finished including start time, call type, phone number, duration (talk+hold time), disposition, and service. Note that the basic activity history data set can be extended with custom fields using the [[#topic_scenario-builder-reference-guide/AttachedData|Attached Data]] scenario block.
[[File:zendesk-integration-guide-image8.png|thumb|400px|center|]]
If the call was recorded, the activity history will also contain a link to the voice recording. When you click the link you should receive an incoming call. Playback of the recording will begin as soon as you answer this call. Note that in order to listen to the recording you must have [[#topic_contact-center-administrator-guide/Roles|privilege]] ''Listen to call recordings linked to CRM records.''
'''Step 12.''' To test the ServicePattern call center supervisor functionality, click the call center icon [[File:zendesk-integration-guide-image9.png]] in the main menu of the Zendesk desktop on the left. ServicePattern Agent Desktop should now occupy the entire Zendesk working area. This full-screen Agent Desktop mode would normally be used by supervisors only.
::'''Note:''' To be able to use the supervisor functionality, you must have [[#topic_contact-center-administrator-guide/Roles|privilege]] ''Access full Agent Desktop''.
'''Step 13.''' To enable integrated desktop for other users of your system, make sure they all have [[#topic_contact-center-administrator-guide/Roles|privilege]] ''Use Zendesk''.
= Single Sign-On=
'''Step 1.''' Log into your Zendesk application, click the Admin icon [[File:zendesk-integration-guide-image2.PNG]] and go to the ''Settings > Security'' page.
'''Step 2.''' Click ''Single Sign-on (SSO)'' and select the ''JSON Web Token'' checkbox.
[[File:zendesk-integration-guide-image10.png|thumb|800px|center]]
'''Step 3.''' Set ''Remote login URL'' to ''https://<tenant-name>.<service-provider-domain-name>/agentdesktop?zin=true''
'''Step 4.''' Set ''Remote logout URL'' to ''https://<tenant-name>.<service-provider-domain-name>/agentdesktop?zout=true''
'''Step 5.''' Select the content of the ''Shared Secret'' field and copy it to the clipboard.
'''Step 6.''' Click ''Save''.
'''Step 7.''' Open the ServicePattern Contact Center Administrator application, go to [[#topic_contact-center-administrator-guide/IntegrationAccounts|Call Center Configuration > Integration Accounts]], click ''Add account'', select ''Zendesk'', and click ''OK''.
'''Step 8.''' Create a ''Name'' for this integration account.
'''Step 9.''' Paste the clipboard content to the ''Shared secret'' field.
'''Step 10.''' Copy your Zendesk domain URL and paste it to the ''URL'' field.
[[File:zendesk-integration-guide-image11.png|thumb|400px|center]]
'''Step 11.''' Click ''Apply''.
'''Step 10.''' To test SSO, sign out of Zendesk. You will be re-directed to ServicePattern Agent Desktop login page. Log in with your ServicePattern credentials. You should be simultaneously logged on to both Zendesk and ServicePattern systems.
'''Note:''' From this moment, every time you enter URL of your Zendesk desktop, you will be redirected to the ServicePattern Agent Desktop login page for a single sign-on. To log into Zendesk directly (without a simultaneous login to ServicePattern), use the following URL: ''https://<zendesk-domain-name>/access/normal''.
= Access to Zendesk Data from Scenarios=
Perform the following preliminary steps only if you skipped the [[#topic_zendesk-integration-guide/SingleSign-On|''Single Sign-on'']] configuration process; otherwise, proceed directly to ''Step 1'' below:
* Open the ServicePattern Contact Center Administrator application, go to [[#topic_contact-center-administrator-guide/IntegrationAccounts|Call Center Configuration > Integration Accounts]], click ''Add account'', select ''Zendesk'', and click ''OK''.
* Create a ''Name'' for this integration account.
* Copy your Zendesk domain URL and paste it to the ''URL'' field.
* Click ''Apply''.
'''Step 1.''' In Zendesk, go to ''Admin > Channels > API''.
[[File:zendesk-integration-guide-image12.png|thumb|800px|center]]
'''Step 2.''' Make sure ''Token Access'' is enabled (checkbox selected).
'''Step 3.''' Click the ''add new token'' link.
'''Step 4.''' Enter a label for this new token and click ''Create''.
'''Step 5.''' The new token will appear in the ''Active API tokens'' list. Select this token and copy it to the clipboard.
'''Step 6.''' Click ''Save''.
'''Step 7.''' In ServicePattern Contact Center Administrator application, go to [[#topic_contact-center-administrator-guide/IntegrationAccounts|Call Center Configuration > Integration Accounts]], and open the earlier created Zendesk account.
'''Step 8.''' Paste the clipboard content to the ''API token'' field.
'''Step 9.''' Select the ''Default account'' checkbox.
'''Step 10.''' In ''Username'' field, specify username of the Zendesk account on whose behalf requests for Zendesk data from ServicePattern scenarios will be made. Make sure this account has sufficient privileges to access all data that may be used in the ServicePattern IVR and routing applications.
[[File:zendesk-integration-guide-image13.png|thumb|800px|center]]
'''Step 11.''' Click ''Apply''.
'''Step 12.''' Click the ''Test connection'' button. You should receive confirmation that the connection between the ServicePattern platform and Zendesk data repository is valid.
'''Step 13.''' To access Zendesk data and enable screen-pop, use the following blocks of the ServicePattern Scenario Builder application:
* [[#topic_scenario-builder-reference-guide/ZendeskSearch|Zendesk Search]] to obtain Zendesk data
* [[#topic_scenario-builder-reference-guide/ZendeskCreateObject|Zendesk Create Object]] to create new tickets and users in Zendesk
* [[#topic_scenario-builder-reference-guide/ZendeskUpdate|Zendesk Update Object]] to update existing Zendesk tickets and users
* [[#topic_scenario-builder-reference-guide/ZendeskScreenPop|Zendesk Screen Pop]] to synchronize delivery of calls and related Zendesk records to the agents
* [[#topic_scenario-builder-reference-guide/AttachedData|Attached Data]] to populate custom fields in Zendesk activity history
This guide contains a [[#topic_zendesk-integration-guide/ScenarioExample|scenario example]] that illustrates how the Search and Screen Pop blocks can be used to obtain Zendesk data and display it to the agent upon interaction delivery.
::'''Note:''' You can create multiple Zendesk integration accounts for access to different Zendesk systems. If you have multiple integration accounts, use scenario block [[#topic_scenario-builder-reference-guide/ZendeskSelectAccount|Zendesk Select Account]] to specify the integration account that will be used by Zendesk blocks in the given scenario. If this block is not used, all Zendesk blocks in the given scenario will use access data from the integration account marked as ''Default account'' (see Step 9).
= Scenario Example=
To illustrate use of our [http://www.brightpattern.com/zendesk-integrations/ contact center Zendesk integrations]' scenario blocks, let's consider a simple scenario involving look-ups to recognize the customer and screenpop of their Zendesk data.
Below is the description of the basic scenario flow:
* A customer calls Bright Pattern Support. (For simplicity, service hours verification is omitted, and agent skill requirements are identified by the dialed number.)
* The customer is greeted via a [[#topic_scenario-builder-reference-guide/CollectDigits|Collect Digits]] block with the following prompt: ''Welcome to Bright Pattern support. If you are calling about an existing case and have the case number, please enter it now followed by the pound sign. Otherwise please remain on the line.;''
* If the customer does not enter any digits, a [[#topic_scenario-builder-reference-guide/ZendeskSearch|Zendesk Search]] block is used to recognize the customer by ANI (Caller ID).
[[File:zendesk-integration-guide-customer-search.png|thumb|400px|center|Customer identification by ANI]]
* If the customer record is found, a [[#topic_scenario-builder-reference-guide/ZendeskScreenPop|Zendesk Screen Pop]] block is used to pop the customer record in the Zendesk application of the agent that this call will be distributed to. The call is then sent to the service queue.
[[File:Zendesk-integration-guide-customer-pop.PNG|thumb|800px|center|Customer record screenpop]]
* If the ticket number is entered, a [[#topic_scenario-builder-reference-guide/ZendeskSearch|Zendesk Search]] block is used to look up the ticket information.
[[File:zendesk-integration-guide-ticket-search.PNG|thumb|800px|center|Ticket search by ticket number]]
* A [[#topic_scenario-builder-reference-guide/Menu|Menu]] block is then used with the following prompt: ''Thank you. We have found the ticket with subject ; $(zdTicket.subject); For status of this ticket, press 1. For any other inquiries, press 2 or stay on the line.;''
* If the self-service is selected, a [[#topic_scenario-builder-reference-guide/PlayPrompt|Play Prompt]] block is used to inform the customer about the current ticket status: ''The current status of this ticket is; $(zdTicket.status); Thank you for your inquiry. Good bye.;'' The call is then marked as self-served and released.
* If the customer needs agent's help, a [[#topic_scenario-builder-reference-guide/ZendeskScreenPop|Zendesk Screen Pop]] block is used to pop the ticket in the Zendesk application of the agent that this call will be distributed to. The call is then sent to the service queue.
[[File:zendesk-integration-guide-ticket-pop.PNG|thumb|800px|center|Ticket screenpop]]
The diagram below shows what a complete scenario will look like when designed in the Scenario Builder application.
[[File:Zendesk-integration-guide-scenario1.PNG|thumb|800px|center|]]