= About= The Bright Pattern Contact Center ''Facebook Messenger Integration Guide'' provides instructions for setting up your Bright Pattern Contact Center to function in an integrated manner with your organization’s Facebook page. == The Faster Way to Connect to Customers == When integrated with the Facebook Messenger mobile messenger application, Bright Pattern Contact Center omnichannel cloud call center software enables agents of your contact center to connect with customers via interactive SMS-style text messages, photos, videos, audio files, links, location sharing, and more. Bright Pattern’s omnichannel system routes Facebook Messenger chat interactions to agents who are logged in to the Agent Desktop application. Agents can respond in context to any customer inquiry, recognize customers, record and distribute the interactions to supervisors, capture customer satisfaction with post-transactional surveys, and assess performance through an extensive set of reports. == Reduce Agent Load with Automation == System administrators can tailor their Facebook Messenger experience and automate aspects of their organization’s business processes. Such customization is achieved using Bright Pattern’s omnichannel Scenario Builder application. Scenario Builder automates frequent requests into self-service using Interactive Voice Response (IVR) technology. With chat scenarios, customers are prompted to provide information such as name, email, and their question, and their information is directed to the appropriate agent or service queue. Administrators can use call scenarios to design custom forms, auto-generated messages, and surveys for any service. Scenarios and IVR technology provide the following features: * The capability to work with multiple Facebook Pages * Skills-based omnichannel routing of chat with priority and media precedence; multiple interactions per agent; priority overrides * Web application “screen pop” functionality on the agent side, driven by URL query string parameters * Chatbot API and bot integrations * Quality management tools * Accurate tracking of metrics related to agent performance, interaction details, and so forth * Chat transcripts * The ability to save interaction records * Agent performance reports == Agent Desktop Integration == Seamless integration with Facebook Messenger provides constant contact with customers using their app of choice. Agents at your contact center work within Bright Pattern's efficient, integrated Agent Desktop user interface, utilizing the same contacts and tools with which they are familiar. Agent Desktop integration offers the following features: * Dynamic user interface * Built-in softphone * Numerous ways to take phone calls using external devices * Click-to-dial functionality * Chat/SMS text * Social messengers * Built-in Knowledge Base * Email case management * Multi-session chat on analyst * Canned responses * Directory access * Call control (hold, transfer, conference) * Multiple calls to analyst * Send screen on transfer * Disposition and notes * Supervisor UI with real-time dashboards, multichannel monitoring, and grading == Improve Customer Experience == Facebook Messenger customer data is pushed to the integrated Agent Desktop, enabling customers to be identified automatically according to their Facebook profile. Moreover, customers keep their place in queue, ensuring that priority customers are identified as such and are served faster. Built-in screen recording, monitoring, and grading quality management tools ensure maximum service quality. For example, a customer does not have to repeat information on transfer because the information follows the interaction through transfers and is saved to the activity history. To ensure the best service quality possible, agents and supervisors can routinely assess customer satisfaction by using built-in post-transactional surveys attached to both service and agent performance reports. = Audience= The ''Facebook Messenger Integration Guide'' is intended for the IT and/or technical personnel responsible for the data infrastructure of the contact centers that use Bright Pattern Contact Center solutions for customer interaction processing. Readers of this guide are expected to have experience in administration of these systems, as well as a solid understanding of contact center operations and resources that are involved in such operations. = Prerequisites= Facebook Messenger integration requires that you have admin-level access to both Bright Pattern Contact Center and your organization’s Facebook App and Facebook Page. == Software Versions == For all types of integration described in this guide, the following is required: * Bright Pattern Contact Center version 5.0 or later * A Facebook App * A Facebook Page = Facebook Messenger Integration Configuration= When Bright Pattern Contact Center is integrated with Facebook Messenger, your Bright Pattern Agent Desktop environment is equipped to handle customer-initiated interactions from the Messenger application or the Facebook application on a customer’s mobile phone, tablet, or computer. Incoming chat interactions are routed to the integrated Agent Desktop environment, where agents also have direct access to the phone, live chat, email, SMS, various other mobile messenger apps, customer and agent records, interaction details, and more. Integration configuration involves linking your Facebook Page to your Bright Pattern Contact Center. To configure Facebook Messenger integration, you will need system access to: * Your organization’s Facebook App and Facebook Page * The Contact Center Administrator application as admin The Facebook App contains the settings for your webhook and access token. Your Facebook Page is what is used as your organization’s identity. Messaging events for your Facebook Page are sent securely to your webhook. Contact Center Administrator is where you add the Messenger integration account to Bright Pattern Contact Center. == Configuration Procedure == === Step 1: Create a Facebook App and a Facebook Page === Go to [http://developers.facebook.com developers.facebook.com], and create a Facebook App and a [https://www.facebook.com/pages/create/ Facebook Page] for your organization. If you have already done this, skip this step and proceed to Step 2. Note that for your Facebook Page, you will additionally need to create a username for it. The [https://www.facebook.com/help/121237621291199 Page username] is what appears in your Facebook Page’s URL, beneath the Facebook Page’s name on the page itself, and in search results. You will need your Page username later in this configuration procedure. See Facebook’s [https://www.facebook.com/help/121237621291199 Help Center] for more information on how to create one. === Step 2: Manage your Facebook App === After registering as a developer and creating both your Facebook App and Page, log in to your Facebook app management page at [https://developers.facebook.com/ developers.facebook.com.] On the dashboard, you should see your App ID. === Step 3: Add Messenger as a product === Adding Messenger as a product to your Facebook App allows your Facebook Page to use the Messenger API to handle chat interactions. # From the left-hand menu, next to ''Product'', click '''+''' to add a new product.

# Select the product called '''Messenger'''.

# Once it has been added, you will see ''Messenger'' on the left-hand menu.

# Under ''Messenger'', click '''Settings'''. === Step 4: Update token settings === The Messenger Platform’s ''Settings'' displays sections called ''Access Tokens'', ''Webhooks'', and ''Pages'', among others. # In the ''Access Tokens'' section, next to the desired Facebook Page, click '''Generate Token'''. This will generate the Page Access Token.

# If you did not already create a Facebook Page, click the '''Create New Page''' link.

# Note that you must also set permissions for which pages the admin user can access.

# In the ''Token Generated'' dialog, click '''I Understand''' and then copy the token. You will need this when configuring your integration account in later steps. [[File:FB-Token-Generated-5312.png|800px|thumbnail|center|Token Generation]] === Step 5: Create a new integration account in Contact Center Administrator === Now, in a new browser tab, configure the integration account that will link Facebook Messenger to Bright Pattern Contact Center. Keep this tab open so it is easy to switch between sites and copy and paste credentials. # Log in as Admin to the Contact Center Administrator application.

# Navigate to ''Configuration > Integration Accounts''.

# Click the '''Add''' "+" button to add a new account.

# In the ''Create integration account'' window that appears, select '''Messenger''' and click '''OK'''.

# In ''Type'', select '''Facebook'''. === Step 6: Specify Facebook Messenger integration account properties === Using the credentials for your Facebook App, enter values for the following screen properties. (If you do not know your credentials, ask your system administrator.) * '''Page Username''' - The name of your Facebook Messenger integration account (any) * '''Type''' - Facebook * '''Page ID''' - Your Facebook Page ID (string). You can find the Page ID in the "About" section of your page. * '''Token''' - The Page Access Token for your Facebook Page * '''Webhook Verify Token''' - The token used to confirm that Facebook is the real server, which is needed for Facebook to send you a message from the customer; if you do not have a token, click the Generate random token below * '''Generate random token''' - Creates a random webhook token that you can copy and paste into your your Facebook App management page in ''Webhooks > Verify Token'' * '''Test Connection''' - This button tests the credentials and confirms whether the connection is valid. Click '''Apply''' to save your changes. [[File:FB-Integration-Properties-5312.PNG|650px|thumbnail|center|Facebook Messenger integration account properties]] === Step 7: Edit your page subscription settings === Now that your integration account is set up, go back to your Facebook Developers page and continue working on configuration there. # In the ''Webhooks'' section, click '''Edit Callback URL''' to update the Callback URL and Verify Token fields.

[[File:FB-Edit-Callback-URL-5312.PNG|650px|thumbnail|center|Edit Callback URL]]

# Enter a Callback URL for a webhook. The URL should be of the form '''https:///clientweb/fb/webhook''', where '''''' should be changed to the domain of your Bright Pattern Contact Center client web server.Starting with Bright Pattern Contact Center version 5.3, we no longer require the Page ID to be included in the Callback URL. The Page ID is taken from the event body. Therefore, one Facebook app can work with multiple Facebook Pages, and multiple integrations can be added per each such page in Bright Pattern configuration, sharing the same webhook.

For example: '''https://example-company.brightpattern.com/clientweb/fb/webhook'''

# In '''Verify Token''', set the '''Webhook Verify Token''' you generated in your integration account properties in Step 6 of this procedure.

# Then click '''Verify and Save'''. This allows Facebook to send an HTTP request to the callback URL to verify that it is legitimate.

# Edit webhooks options by clicking '''Edit'''.

[[File:FB-Webhooks-Options-Edit-5312.png|650px|thumbnail|center|Edit webhook options]]

# In ''Edit Page Subscriptions'', select subscription fields to subscribe to webhook events. The following are the minimum set of subscription fields needed: '''messages''', '''message_deliveries''', and '''message_reads'''.

[[File:FB-Subscriptions-Select-b-5312.PNG|650px|thumbnail|center|Select these subscription fields at minimum]]

# When done, click '''Save'''.

See facebook.com for more information about the [https://developers.facebook.com/docs/messenger-platform/ Messenger Platform]. === Step 8: Add "Send Message" button to your Facebook Page === Now that your integration is set up, you need to add the "Send Message" button to your Facebook Page and point it to the Messenger platform.
= Customizing Interactions Using Scenarios= You can determine how Bright Pattern Contact Center handles chat interactions and customer data directly from Bright Pattern scenarios. For every customer interaction that enters your contact center, Bright Pattern Contact Center has to process that specific interaction to determine what to do with it (e.g., what prompts or announcements to apply, what resources to queue for, what music to play, or when to overflow to alternate resources). The logic of such automated interaction processing is defined in scenarios. Execution of a scenario with respect to a specific interaction is triggered by a particular event, such as the initiation of a chat session from a specific web page or app. Scenarios are designed and edited in the application called Scenario Builder. This application is launched from the Contact Center Administrator application when you add a new scenario or select an existing one for editing. For more information, see the ''Contact Center Administrator Guide'', section [[#topic_contact-center-administrator-guide/scenariosoverview|Scenarios Overview]]. Note that your contact center (i.e., tenant) can have multiple Facebook Messenger integration accounts if it has multiple scenario entries. Each scenario entry can have only one Facebook page (one maximum for each messenger type). Each service can have one Facebook page as an outbound chat account. The same Facebook page can be assigned to one scenario entry/service only. = Scenario Configuration= The following steps will walk you through the process of creating a scenario. == Step 1: Create a web chat scenario. == # In the Contact Center Administrator application, navigate to ''Configuration > Scenarios > Chat''. # At the bottom of the screen, click the '''+''' button to add a new chat scenario. Alternatively, you may select and edit the web chat scenario template called Mobile Chat. == Step 2: Specify screen properties for the scenario. == # Screen properties for the scenario are displayed on the right side of the screen. Specify all values as you would for any other chat scenario. For more information on such screen properties, see the Contact Center Administrator Guide, section [[#topic_contact-center-administrator-guide/chat|Chat]]. # Pay particular attention to the field called '''Messenger Accounts'''. In this field, select the name of your Facebook Page or add a new one by clicking the '''add/edit''' link. [[File:Messenger-Chat-Scenario.png|800px|thumbnail|center|Chat scenario for a messenger integration account]] == Step 3: Customize your scenario in Scenario Builder. == # Open your new scenario by double-clicking its name in the Chat list on the left. The scenario will open in the Scenario Builder application. # Before you do anything else, save your scenario by clicking the '''Save As''' button and giving this scenario a unique name, such as "Messenger Chat," to differentiate the new scenario from the scenario template. = Scenario Blocks= Actions or prompts called blocks are organized in each scenario, forming the order of operations for a specific service. For Facebook Messenger integration, this service is a chat service, and the scenario tells the Bright Pattern system how to route messages from customer to agent, what information to collect from the customer, what automatic messages to present to the customer, and what conditional exits to take in a variety of situations. In the example shown, the web chat scenario template called Mobile Chat has been opened for editing and renamed messenger chat. You should use this scenario as a base for yours, customizing the screen properties of each block to suit your chat service. For more information on these blocks, refer to the Bright Pattern Contact Center [[#topic_scenario-builder-reference-guide/scenariobuilderoverview|Scenario Builder Reference Guide]]. To access Facebook data from a scenario, the following scenario blocks should be present in your scenario, in this order. If they are not, drag them onto the center pane of Scenario Builder. # [[#topic_scenario-builder-reference-guide/sendmessage|Send Message]] # Send Message # [[#topic_scenario-builder-reference-guide/if|If]] # [[#topic_scenario-builder-reference-guide/findagent|Find Agent]] # [[#topic_scenario-builder-reference-guide/sendmessage|Send Message]] # [[#topic_scenario-builder-reference-guide/connectchat|Connect Chat]] # Send Message # [[#topic_scenario-builder-reference-guide/exit|Exit]] [[File:Messenger-Chat-Scenario-50.png|800px|thumbnail|center|Messenger chat scenario example]] == Send Message == The Send Message block is used to send a text message to a chat/mobile/messenger customer via SMS. More information about Send Message settings is available in the ''Scenario Builder Reference Guide'', section [[#topic_scenario-builder-reference-guide/sendmessage|Send Message]]. == If == The If block allows branching of a scenario based on verification of some specified conditions. Multiple conditional exits (branches) can be configured in the same block. For examples of how this block is used, see the ''Scenario Builder Reference Guide'', section [[#topic_scenario-builder-reference-guide/if|If]]. == Find Agent == The Find Agent scenario block finds an agent qualified to handle a given interaction. When the agent becomes available, the block creates a variable called ''$(destination)'' and sets it to the agent’s phone number (for voice) or username (for chat). For descriptions of this block’s screen properties, see the ''Scenario Builder Reference Guide'', section [[#topic_scenario-builder-reference-guide/findagent|Find Agent]]. == Connect Chat == The Connect Chat scenario block connects a chat to the destination specified in the ''$(destination)'' variable (typically, the agent found by the preceding Find Agent block or to the specified chat scenario entry). If the agent is logged in, the system tracks the agent’s state according to the state of the interaction. The block handles the call transfers and conferences internally and only ends when the remote party disconnects or the last agent disconnects. For descriptions of this block’s screen properties, see the ''Scenario Builder Reference Guide'', section [[#topic_scenario-builder-reference-guide/connectchat|Connect Chat]]. == Exit == The Exit scenario block disconnects the currently active interaction and exits the scenario. For descriptions of this block’s screen properties, see the ''Scenario Builder Reference Guide'', section [[#topic_scenario-builder-reference-guide/exit|Exit]]. = Using Messenger on Agent Desktop= After you have configured your integration account, Facebook App, Facebook Page, and scenarios, your organization’s agents can accept and respond to chat interactions from the Agent Desktop application. Designed to increase agent productivity, the Bright Pattern Contact Center Agent Desktop application displays only the controls and information needed at each point of work. Incoming chat interactions are routed to agents using the Messenger Chat scenario that you created in the previous section of this guide. Facebook Messenger interactions are delivered as “Customer Service Chats” and look no different than other web chats or mobile chats that are normally sent to agents. [[File:Agent-Desktop-Messenger.png|800px|thumbnail|center|Chatting on Messenger from the Agent Desktop]] == Login == # Log in to Agent Desktop with your username and password, being sure to select your desired phone device.

# By default, you log in 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 from the menu that appears. For more information about the available device options, see the Bright Pattern Contact Center ''Agent Guide'', section [[#topic_agent-guide/selectingaphonedevice|Selecting a Phone Device]].

# Click the '''Login''' button.

# Note that if this is your first time logging into Agent Desktop on the given computer, you will be prompted to install the [[#topic_agent-guide/installingandupdatingagentdesktophelperapplication|Agent Desktop Helper Application]]. == Ready State == Setting the agent state to ''Ready'' will allow incoming chat interactions to be routed to you. Agents can [[#topic_agent-guide/howtoacceptachatrequest|accept or reject]] chat interactions while logged in and ready. If accepted, the customer’s message is shown in the ''Chat Panel'' of Agent Desktop in the same manner as any other web chat or SMS text. All of Agent Desktop’s features and controls are available in the integrated interface. Agents can: * Reply to customer [[#topic_agent-guide/howtosendchatmessages|chats]] using the ''Text Input Field'' and '''Send Message''' button * [[#topic_agent-guide/howtosendandreceivepicturesanddocuments|Send photos and files]] using the '''Add Attachment''' button * Create and send [[#topic_agent-guide/howtocreateandeditcannedchatresponses|canned chat responses]] (i.e., automatic greetings) * [[#topic_agent-guide/howtotransferyourchatsession|Transfer and conference]] with other agents or send conversations to a service queue * Set [[#topic_agent-guide/howtoenterdispositionsandnotes|dispositions]] for the interaction * Receive a customer’s location as a link to a mapping service (e.g., Google Maps) Refer to the Bright Pattern Contact Center [[#topic_agent-guide/userinterfaceoverview|Agent Guide]] to learn more about the Agent Desktop user interface and its applications.
= Customer View= For the customer, the conversation looks the same as any other Facebook Messenger conversation. [[File:Messenger-Phone-Messages.jpg|350px|thumbnail|center|Facebook Messenger conversation on mobile]]