Amazon Lex gives superior conversational synthetic intelligence (AI) capabilities to allow self-service help in your group’s contact heart. With Amazon Lex, you may implement an omnichannel technique the place clients have interaction through cellphone, web sites, and messaging platforms. The bots can reply FAQs, present self-service experiences, or triage buyer requests earlier than transferring to a human agent. Amazon Lex integrates with state-of-the-art contact facilities together with Amazon Join, Genesys Cloud, and Amazon Chime SDK to facilitate a seamless omnichannel expertise.
That is the second publish of a two-part collection. The mixing of Amazon Lex with Talkdesk cloud contact heart is impressed by WaFd Financial institution (WaFd)’s digital innovation journey to reinforce buyer expertise. In our earlier publish, we described how Amazon Lex integrates with the Talkdesk cloud contact heart for the voice channel. On this publish, we’re specializing in the chat channel to point out easy methods to use Amazon Lex and the Amazon Lex Net UI to allow dwell brokers to work together together with your clients in actual time. For instance, the next determine exhibits screenshots of a chatbot transitioning a buyer to a dwell agent chat (courtesy of WaFd Financial institution).
Answer overview
The next diagram illustrates the answer structure.
Within the previous structure, the next sequence of steps takes place in a dwell buyer/agent dialog:
Utilizing the Amazon Lex Net UI, a buyer asks to be related to an agent. The related Amazon Lex chatbot is configured with an escalation intent to course of the incoming agent help request.
The Amazon Lex success AWS Lambda perform retrieves the Talkdesk touchpoint ID and Talkdesk OAuth secrets and techniques from AWS Secrets and techniques Supervisor and initiates a request to Talkdesk Digital Join utilizing the Begin a Dialog API. Within the payload, the perform contains data which may be helpful to an agent, such because the buyer sentiment or the historical past of beforehand traversed intents.
If the request to the Talkdesk API is profitable, a Talkdesk dialog ID is returned to Amazon Lex.
The Amazon Lex success Lambda perform shops the dialog ID in Amazon Lex session attributes, thus making the dialog ID accessible to the Amazon Lex Net UI.
The Amazon Lex Net UI opens a communication session with brokers on the Talkdesk contact heart via a WebSocket API in Amazon API Gateway.
The Lambda related to the WebSocket API first shops the Talkdesk dialog ID to WebSocket consumer ID mappings in Amazon DynamoDB. Then, via the Talkdesk Ship a Message API, the Lambda perform sends the shopper’s message to the agent on Talkdesk contact heart.
Your agent responds to the shopper with a message despatched via the callback Relaxation API in API Gateway. The payload contains the dialog ID of the energetic dialog.
The callback Relaxation API is configured to help the brokers’ incoming messages in addition to the agent’s closing of the dialog. In an effort to ship the agent’s message to the shopper, the supporting Lambda perform reads the WebSocket consumer ID related to the dialog ID from the DynamoDB desk. This makes positive the agent’s message is delivered to the suitable WebSocket consumer ID.
The agent’s response is displayed via the Amazon Lex Net UI and the shopper responds or closes the chat as acceptable. Steps 6–9 are repeated so long as the dialog stays energetic. If the agent ends the dialog, the shopper is notified and the WebSocket connection is closed.
Within the following sections, we stroll you thru the steps to construct the answer structure. Dependencies amongst every step are cross-referenced.
Stipulations
To implement the answer offered on this publish, it is best to first familiarize your self with the next AWS companies and options:
Moreover, you have to be conversant in the next Talkdesk companies:
Put together your Talkdesk occasion for the Amazon Lex Net UI chat with an agent
This part outlines the fundamental steps required to configure the Talkdesk chat with agent expertise utilizing the Talkdesk Digital Join channel. Evaluation Talkdesk APIs for additional particulars for any extra duties which may be required as a part of your particular implementation.
Full the next steps:
Allow Talkdesk Digital Join in your Talkdesk occasion.
Configure your brokers’ accounts and assign them to the brokers’ queues.
Construct a Talkdesk Studio stream.
This might be used to ship chat customers to an inbox for brokers to assign. A pattern is supplied with this resolution.
To create an integration in your Amazon Lex Net UI occasion, within the Talkdesk Builder navigation pane, choose Integrations.
On the Actions tab, configure three actions utilizing the enter and output schemas offered via the next hyperlinks:
Create a Talkdesk Digital Join Touchpoint.
Identify the Touchpoint Lex Net UI Chat and report the Touchpoint ID.
This might be saved in Secrets and techniques Supervisor as dev/talkdesk/touchpoint/ids.
In Talkdesk Builder, select OAuth Shoppers within the navigation pane to arrange OAuth credentials.
Choose Grant sort for Consumer credentials and set Scope to digital-connect:write.
File the consumer ID and secret key from the Keys tab.
These might be saved in Secrets and techniques Supervisor as dev/talkdesk/consumer/keys and used to authenticate and talk with the Talkdesk API.
In your AWS account, retailer the 2 secrets and techniques in Secrets and techniques Supervisor.
The next screenshot exhibits the small print of the Touchpoint ID as a Secrets and techniques Supervisor secret.
The next screenshot exhibits the small print of the consumer ID as a Secrets and techniques Supervisor secret.
Deploy the Talkdesk Amazon Lex CloudFormation template
The next AWS CloudFormation template creates all of the assets of the answer structure. This contains all crucial IAM roles to invoke API operations, run related Lambda features, entry secrets and techniques on Secrets and techniques Supervisor, and retailer and retrieve dialog ID and WebSocket consumer ID pairs from DynamoDB.
To facilitate monitoring and debugging, a CloudWatch log group is created for every of the assets.
The CloudFormation template gives extra particulars for every of the assets.
Full the next steps to deploy the template:
Check in to the AWS Administration Console.
Select Launch Stack in your AWS Area to start the CloudFormation stack creation course of.
For Stack title, enter a reputation.
For TDAUTHHOST, enter the URL of your Talkdesk occasion.
Go away the opposite parameters as default and select Subsequent
Choose the acknowledgement examine containers and select Create stack.
After the CloudFormation template is full, report the values for the next keys on the Outputs tab to make use of in later steps:
APIGatewayApiKey
BotAliasId
BotId
CallbackRestAPI
WebSocketAPIEndpoint
Replace the Talkdesk occasion
Log in to your Talkdesk occasion and full the next steps to replace your occasion:
In Talkdesk Builder, choose Integrations within the navigation pane.
On the Settings tab, find Base path and enter the callback Relaxation API URL you recorded earlier.
Underneath Different settings, set x-api-key to the worth of the API Gateway key.
Deploy the Amazon Lex Net UI
The answer outlined on this publish makes use of the Amazon Lex Net UI, a full-featured net consumer to deploy your Amazon Lex chatbot in your web site. With the Amazon Lex Net UI, you may rapidly deliver your chatbot-powered software to life whereas minimizing time-to-value.
Select Launch Stack for the Area wherein you’ll use your chatbot:
For LexV2BotId, enter the worth for BotId.
For LexV2BotAliasId, enter the worth for BotAliasId.
Launch the stack.
When deployment is full, find the Amazon Easy Storage Service (Amazon S3) URL for WebAppBucket.
Navigate to the S3 bucket on the Amazon S3 console and obtain the lex-web-ui-loader-config.json file.
Open the file and modify or add the next parameters:
Within the join configuration part, add the brand new parameter talkDeskWebsocketEndpoint and set its worth to the WebSocket endpoint.
Within the UI configuration part, set enableLiveChat to true.
Add the modified lex-web-ui-loader-config.json file and overwrite the earlier model of the file within the S3 bucket.
Return to the CloudFormation stack Outputs tab and discover the WebAppDomainName hyperlink.
This may redirect you to a full-page model of the Amazon Lex Net UI. From right here, you may check the Talkdesk integration and ensure that the bot is in a position to hook up with Talkdesk utilizing the WebSocket connection.
Check the answer
Now you’re able to strive the Amazon Lex and Talkdesk chat interplay:
Begin your Banking Bot chat window utilizing the WebAppUrl offered as output within the CloudFormation stack.
Log in to your Talkdesk Digital Join channel and navigate to Conversations.
Within the Banking Bot chat window, request to speak to an agent.
Watch the shopper’s message being delivered to the Talkdesk Conversations Inbox.
The Talkdesk agent self-assigns the dialog and begins partaking with the shopper.
The next video demonstrates the chat expertise.
Clear up
To wash up your assets, full the next steps:
On the AWS CloudFormation console, choose Stacks within the navigation pane.
Choose the LexTalkdesk stack (or the stack title you offered), and choose Delete.
Delete the stack assets by deciding on Delete stack.
Conclusion
Amazon Lex brings the ability of conversational self-service to your buyer most well-liked channels, corresponding to cellphone, net chat, and messaging purposes. On this publish, we demonstrated an answer that gives dwell agent help in your web site with Amazon Lex, Amazon Lex Net UI, and Talkdesk cloud contact heart. We offered a CloudFormation stack that features DynamoDB and Lambda assets, and a Relaxation API and WebSocket API in API Gateway to take care of a communication session with brokers within the Talkdesk contact heart.
This resolution is supposed to be a reference structure or a fast implementation information that may be tailor-made to fit your group’s necessities. In the event you need assistance establishing this resolution, AWS Skilled Providers and Talkdesk can be found that will help you and your group via the method of choosing the best applied sciences in your cloud contact heart.
Concerning the authors
Grazia Russo Lassner is a Senior Guide with the AWS Skilled Providers Pure Language AI group. She specialises in designing and creating conversational AI options utilizing AWS applied sciences for purchasers in numerous industries. Outdoors of labor, she enjoys seaside weekends, studying the newest fiction books, and household time.
Austin Johnson is a Options Architect, serving to to take care of the Lex Net UI open supply library.
Chris Brown is a Principal Pure Language AI guide at AWS targeted on digital buyer experiences – together with cellular apps, web sites, advertising campaigns, and most just lately conversational AI purposes. Chris is an award-winning strategist and product supervisor – working with the Fortune 100 to ship the most effective experiences for his or her clients. In his free time, Chris enjoys touring, music, artwork, and experiencing new cultures.
Bruno Mateus is a Principal Engineer at Talkdesk. With over 20 years of expertise within the software program business, he specialises in large-scale distributed techniques. When not working, he enjoys spending time outdoors together with his household, trekking, mountain bike driving, and motorbike driving.
Jonathan Diedrich is a Principal Options Guide at Talkdesk. He works on enterprise and strategic initiatives to make sure technical execution and adoption. Outdoors of labor, he enjoys ice hockey and video games with the household.
Crispim Tribuna is a Senior Software program Engineer at Talkdesk presently specializing in the AI-based digital agent venture. He has over 17 years of expertise in pc science, with a give attention to telecommunications, IPTV, and fraud prevention. In his free time, he enjoys spending time together with his household, operating (he has accomplished three marathons), and driving bikes.