All articles on Amazon Connect
This article assumes that you have already set up an Amazon Connect instance. In case you haven't you can follow these instructions.
- Open your Amazon Connect Instances settings in AWS.
Select your instance and open the Contact flows submenu.
- Add the Amazon Lex bot that you created previously.
- Log on to your Amazon Connect instance as a user with elevated rights.
- Create a new contact Flow or modify an existing one.
Add a Get customer input Node to your Flow and select a prompt. If you don't want to use a prompt, then you may change the interpretation to SSML and add a silent SSML tag like this:
Select the Amazon Lex bot that you previously created and enabled for the Flow.
Add two session attributes: one called CustomerNumber of value System.Customer Number and one called ContactId of type System.Contact id. These values will be used as SessionId and UserId in Cognigy.AI. If you want to use different variable names you need to update the values for USERID_ATTRIBUTE and SESSIONID_ATTRIBUTE in the lambda function.
- Save and publish your contact Flow.
- Request a phone number, if not already completed, and link it to your contact Flow.
Now your Amazon Connect environment should be ready for testing and calls will trigger these events:
- The call reaches Amazon Connect and gets routed to the Contact Flow.
- The Get customer input Node is activated and calls the Amazon Lex bot.
- The Amazon Lex bot transcribes the call, and sends either only the transcript or additionally the slots and intents to a Lambda function, depending on the chosen setup.
- The Lambda function transforms the Lex payload and sends it to your Amazon Lex Endpoint in Cognigy.AI
- The selected NLU works with the input and replies in return with the bot response to the Lambda function.
- The Lambda function transforms the Cognigy.AI response and sends it back to Amazon Lex.
- Amazon Lex returns the response to Amazon Connect. Text will be read to the caller, data will be added as session attributes.