Deliver an Automated AI Experience With Amazon Connect and Salesforce Service Cloud

BY:

Automatically route calls based on intents you set to enhance the customer experience

Key Takeaways:

  • The Amazon Connect Computer Telephone Integration (CTI) Adapter for Salesforce, combined with Lex bots, allows call centers to utilize AI to intelligently route calls to their CRM system.
  • By setting intents, bots can determine the reason for the call and route it properly
  • An example configuration shows how to set up a simple call flow that tells you why the customer is calling
  • After setting up the automated experience, configure the agent experience and perform end-to-end testing

With the Amazon Connect Computer Telephone Integration (CTI) Adapter for Salesforce, you can construct connected and transformational automated customer experiences and enhance agent effectiveness and productivity utilizing Lex bots with Customer Relationship Management (CRM) routing. 

After you define intents, Amazon Lex will match what the customer says to your intents, determine the type of call, and use the case number as a slot value. Amazon Lex will use this to train the machine learning model to recognize values for a slot.

The bot will then collect data and pass it along to Amazon Connect, which displays any of the customer’s known information to the agent. Building your automated experience using the Artificial Intelligence (AI) capabilities of Lex assumes you already have a Salesforce instance setup with the CTI Adapter configured against an Amazon Connect instance you already have provisioned.

You’ll also have to set up your Amazon Lex bots. Let’s go into the details of how to build your bots and how to create an AI-enhanced customer experience. 

How to create an Amazon Lex Bot

You’ll create your bots first and add an intent later. 

First, in the AWS Management Console, open the Amazon Lex console by navigating to https://console.aws.amazon.com/lex/.

Choose Get Started if you are creating your first bot. If not, choose Bots and then select Create.

  • 1. Choose Custom bot on the Create Your Lex Bot page and fill in the required information:
    • Name your bot
    • Language:  Select the locale and language for your bot
    • Output voice: Salli
    • Session timeout: 5 minutes
    • COPPA: Select the appropriate response.
    • User utterance storage: Choose the appropriate response
  • 2. Select Create. The console will then send Amazon Lex a request to make a new bot. The bot version is set to $LATEST, and after creating the bot, you will see the bot Editor tab.  The bot version, Latest, will appear next to the bot name in the console. 

The next step is to create an intent. In the Amazon Lex console, select the plus (+) sign next to Intents and choose Create new intent. In the dialog box, input the name of the intent and then click Add. The console sends the request to Amazon Lex to create the intent.

For each intent you create, populate it with utterances that reflect the reason for each type of call.

Build your experience

Let’s build a simple call flow that employs Amazon Lex bots to find out why the customer is calling, which will be defined as intents. An intent represents an action that the user wants to perform. Bots are created to support one or more related intents.

Amazon Lex will match what the customer says to the defined intents. In this case, the caller will be asked for their case number once the call has been defined as either a sales or support call.

This example requires the creation of two Lex bots: GetCustomerCallReason and GetCaseNumber.

Your GetCustomerCallReason bot will require two intents: SalesCall and SupportCall. 

GetCaseNumber also requires two intents: CaptureCaseNumber, which captures a CaseNumber slot value, and UnknownCase, which is used to capture if the customer doesn’t know or have their case number. Populate each of these with utterances that indicate the reason for each type of call. 

The next step is to add these bots to your Amazon Connect Instance configuration under Contact Flows

  • 1. Log in to your Amazon Connect instance
  • 2. Select Routing, Contact flows
  • 3. Click Create contact flow
  • 4. Type a name for the contact flow
  • 5. Add the blocks to your contact flow 

Next, configure the first Get customer input block, which will give input from the customer by invoking the GetCustomerCallReason bot. In the block, update these settings:

  • Text to speech (ad hoc) – Enter Text, such as Hello, thanks for calling [company name], how can I help you?
  • Amazon Lex: Select the bot GetCustomerCallReason 
  • Alias: Type in where indicated

Select Add an intent, then add the two intents you created for this bot: SupportCall and ServiceCall.

Amazon Polly is used to convert text to speech to “speak” the text to the customer. Both intents from the bot will be added to the block. Every added intent creates an output branch in the block, so contacts are routed based on customer intent specified when interacting with the Amazon Lex bot.

When the intent comes back from Amazon Lex, store it as a contact attribute so it can be referenced later in the contact flow. In the Set contact attributes block, use text with a destination key of CallReason with a value of $.Lex.IntentName.

Then, configure the contact flow to use the second Amazon Lex bot in the second Get customer input block. Configure the second block to use the GetCaseNumber Amazon Lex bot:

  • Text to speech (ad hoc) – Enter Text: If you know your case number, please say it now. Otherwise, say I don’t know.
  • Amazon Lex: Select the GetCaseNumber bot from the list.
  • Alias: Type where indicated
  • Intents – Select Add an intent, then add the two intents that were added to the bot: CaptureCaseNumber, UnknownCase

Note that customer is prompted to state “I don’t know” if they don’t know their case number. Always think about how you can guide your customers to interact with the bots in a prescriptive way. If the customer does respond with a case number, store the results of the case number in two attributes:

  • Set contact attributes block, Use Text with a destination key of ACCaseNumber with the value of $.Lex.Slots.CaseNumber. Then add a second attribute in the same block as Use Text with a destination key of acsf-screenpop-search with the value of $.Lex.Slots.CaseNumber
  • acsf-screenpop-search sets the case number as an attribute to screen pop in Salesforce when it reaches the agent, a key feature of the CTI Adapter that makes it easy to pass data from Amazon Connect to Salesforce.

If the customer does not know the case number, add another Set contact attributes block with Use Text with a destination key of ACCaseNumber with the value of Unknown.

Once the case number is captured, we play it back to the customer with the Play prompt block: Text to speech (ad hoc) – Enter Text: <speak>Thanks – your case number is <prosody rate=”x-slow”><say-as interpret-as=”digits”>$.Attributes.ACCaseNumber</say-as></prosody></speak>

Now, set up the agent experience

Interpret as: SSML

SSML tags in Polly are utilized to properly interpret the case number as digits and speak them back to the customer.

Finally, set the blocks for Set working queue to BasicQueue, Transfer to queue and disconnect/hang up. The call will be routed to the next available agent assigned to the routing profile of basic queue. Save and publish your contact flow and assign it to a phone number to test.

Be sure to follow the CTI Adapter setup guide to properly implement it within your Salesforce environment

The CTI Adapter can present attributes in the CCP to give the agent important caller information. Let’s pass in the type of Sales or Service call identified within Amazon Connect and the case number (including when it’s unknown).

First, configure those attributes in Salesforce:

  • In setup, navigate to Custom Metadata Types and select Manage Records
  • In the Call Attributes Configuration, click New to create AC Case Number and Call Reason

Make sure your Softphone Layouts under Call Centers includes the data you want to screen pop. The acsf-screenpop-search attribute set in the call flow will search against the Salesforce objects you’ve configured. 

Then, perform end-to-end testing

Now that everything is configured, test the experience. When a call comes into Amazon Connect, the Lex bot determines the reason for the call and captures the case information. The type of call and case number are passed to the agent along with the full context within Salesforce about why the customer is calling. If the customer did not provide a case number, it will automatically use the caller ID for the screenpop. When the call is complete, the agent is automatically prompted to fill out the call disposition of the call activity.

You’ve now successfully created an automated AI customer voice experience that determines their intent and provides that context to an agent to provide the best in customer support. 

To learn more about how the Amazon Connect Computer Telephone Integration (CTI) Adapter for Salesforce can enhance the customer service experience and create new call center effectiveness, contact the CloudHesive team today. From cloud consulting to managed services and beyond, learn how we can help you build a robust cloud strategy that increases operational efficiencies.

Related Blogs

  • Revolutionize Customer Interactions with AWS Conversation Bots and AI

    Keep your SaaS company on the cutting edge of customer service   There’s no question that customer service technology has evolved dramatically over the years, adapting to changing consumer...

    Learn More
  • Enhance the Customer Experience With Amazon Connect Chat

    Give your SaaS customers what they want: fast answers and personalized service   Omnichannel communication is a must-have in today’s SaaS customer service landscape. Your customers expect...

    Learn More
  • Strategies for security hybrid cloud setups

    Empowering your team with effective hybrid cloud security strategies   Hybrid cloud environments appeal to companies that restrict where data is stored or prefer to secure sensitive data on...

    Learn More