How to Create a Chat Scenario That Uses BotsTo use a bot such as Watson Assistant in Bright Pattern chat interactions, you simply need to modify a chat scenario to include bot-specific scenario blocks such as Chat Bot Select Account and Ask a Bot.This article will show you how to create a general chat scenario that uses a bot to:* Automatically accept the customer’s chat request* Greet the customer* Provide up to two answers to the customer* Connect to an agent when it’s determined that the bot is not being helpful* Provide suggested replies to the agent during the chatIf you have not already done so, please complete these steps before proceeding:
Add a bot/chat suggestions engine integration account* Download and [[5.3:Contact-center-administrator-guide/ScenariosOverview | import]] our bot scenario template: [[File:App_Example_Bot_Scenario.zip|App_Example_Bot_Scenario.zip]]Scenarios are made up of ''scenario blocks'' that specify how interactions are processed. Detailed descriptions of Bright Pattern scenario blocks are available in this guide's ''Scenario Block Definitions'' section.The following sequence of actions illustrates how scenario blocks function in a bot-driven chat scenario. This example scenario uses an integrated Watson Assistant.[[File:Example-Bot-Scenario-No-Com-53.PNG|thumb|800px|center|Example chat scenario in Scenario Builder]]All chat scenarios that incorporate bots will include the [[5.3:Scenario-builder-reference-guide/ChatBotSelectAccount | Chat Bot Select Account]] block. In this block, you are selecting a bot/chat suggestions engine integration account.It's possible for your contact center to have many integration accounts, so it's important to specify which one will be used for this scenario. If you do not see the desired account listed, go back and add an integration account.[[File:BotScenario1.PNG|thumb|800px|center|Select an integration account]]In this example, the [[Scenario-builder-reference-guide/SetVariable | Set Variable]] block is used to get the customer's first name and last name.Variable ''$(item.externalChatData)'' gets the customer's data from the pre-chat form that the customer completed before launching the chat. It's called external chat data because it comes from outside of the chat interaction.To specify what type of external chat data you want, append ''.first_name'' or ''.last_name'' to the variable, like this:[[File:ChatScenario2.PNG|thumb|800px|center|Use a variable to get the customer's name from the pre-chat form and use it in the chat interaction]]Now that you have a method to collect the customer's name, you can use the [[Scenario-builder-reference-guide/SendMessage | Send Message]] block to incorporate the name into a personalized chat message.For example, "Hi ''first_name'', how can I help you today?" becomes "Hi Jane, how can I help you today?"[[File:BotScenario3.PNG|thumb|800px|center|Have the bot send a message to the customer, addressing him/her by name]]We want the bot to respond to the customer two times before connecting to the agent. Using Set Variable blocks, we can define each bot's reply as a step, and tell the scenario what happens after each step.The first bot reply is specified as "step 0" and the second is specified as "step 1." The scenario will run through both steps. If the customer's issue is not resolved by step 1, the customer is transferred to the agent for help.[[File:BotScenario4.PNG|thumb|800px|center|Use a variable to define this part as the first in a series of steps]]Most web chats are set up to begin with a pre-chat form that collects information from the customer (e.g., name, email address, phone number, reason for chatting, etc.) The [[Scenario-builder-reference-guide/If | If block]] specifies what happens if the customer did not write a message in the pre-chat form's Message field. If that field is empty, the scenario tells the bot to send a message.The message aligns with what you have configured your Watson Assistant to say. We call the bot's messages suggestions.[[File:If-Properties-53.PNG|thumb|800px|center|If there's no customer message, send a message]]The [[Scenario-builder-reference-guide/AskaBot | Ask a Bot]] block allows the bot to automate the conversation before an agent is connected. It delivers the bot's raw response (i.e., suggestions) to the customer. A raw response is configured in your Watson Assistant dialog flow settings; it's unrelated to Bright Pattern.[[File:BotScenario6.PNG|thumb|800px|center|Get suggestions from the bot]]Another message can be optionally sent to the customer at this time (e.g., "Do you want to talk to a real live person now?").[[File:BotScenario7.PNG|thumb|800px|center|Send another message if you want]]This time, we are defining "step 1." Remember, bots are useful for self-service and routing, but they become annoying if they do not help your customer or meet expectations. Setting these scenario steps ensures that a customer is connected to an agent if the bot has not answered the customer's question by now.[[File:BotScenario8.PNG|thumb|800px|center|Define this part as step 1]]In this If block, a condition is set to make sure that if the scenario takes more than two steps to resolve the customer's issue, then it will transfer the chat from the bot to the agent.[[File:If-Properties2-53.PNG|thumb|800px|center|If the bot is unhelpful, connect to agent]]The [[Scenario-builder-reference-guide/FindAgent | Find Agent]] block looks for the next available skilled agent to accept the chat. You can use Find Agent to set wait times and send the customer messages about estimated waiting time (EWT).[[File:BotScenario10.PNG|thumb|800px|center|The bot couldn't resolve the customer in two steps, so the scenario looks for an agent]]Although Find Agent uses criteria to identify the proper agent to receive an interaction, it does not have a "delivery" mechanism. [[Scenario-builder-reference-guide/ConnectChat | Connect Chat]] is the delivery mechanism for the interaction.[[File:BotScenario11.PNG|thumb|800px|center|You can either specify a destination for the chat or let the system find the next available agent]]The [[Scenario-builder-reference-guide/Exit | Exit]] block completes the scenario. Without it, the scenario will loop through this configured flow until the customer ends the chat.Be sure to click '''Save''' to apply your changes. Note that closing your web browser window or tab will close Scenario Builder without saving, and you will lose your work.Then go try it!For more information on chat configuration and bot setup, see these Bright Pattern tutorials:
ほとんどのウェブチャットは、情報(例:名前、メールアドレス、電話番号、チャットの理由など)を収集する事前チャットフォームの記入から始まります。 If ブロックは、 お客様が事前チャットフォームのメッセージフィールドを空白にした場合のアクションを指定します。そのフィールドが空白の場合、シナリオはメッセージを送信するようボットに指示します。