Lex bot fails in chat flow

Hi,

I'm trying to use the "call lex bot" action in an inbound chat flow. Just for testing, I'm simply using an existing bot template from Amazon lex (book a trip bot). This is my chat flow -

.

The bots work fine in AWS console but when I try the same input to fulfill the book trip intent from a chat widget, the lex bot action fails every time. Is there anything I'm missing on a configuration level.

I did read this blog and it seems like I have done the steps to call the lext bot in chat flow rightly - https://developer.genesys.cloud/blog/2019-09-06-beertender-chatbot/#part-3---setting-up-the-purecloud-inbound-chat-flow

Hello,

I have had this issue as well but my bot now works. Have you verified that the bot has been built and then published? Also, out of curiosity, I assume this is V1, correct?

Hi,

Yes, this is Lex V1 and I did build and publish it. Even tried creating a new custom bot but that too fails (not taking intent path instead taking failure path). If you have had this issue, can you please let me know how it got resolved?

Thanks,
Sridevi

I see. Your issue may be because you have an inbound chat flow. Try the same setup under the inbound message flow, I had the same issue with the chat flow but once I used the inbound message flow, my bot was then able to integrate perfectly within the web messenger.

Oh, unfortunately, our requirement is to integrate lex with a chat flow. Anyways, thanks for your responses!

What is being specified for the Body Input Text on the Call Lex Bot action? Is the text being specified or is the no value specified option being used?

No value option is used. Actually, I printed the error message today and it says "The bot session has failed" and the error type is Internal service error. Does that mean anything?

There could be several issues that could cause that error. Do you have a sample conversationId & which Genesys Cloud region you are using? Thanks.

conversation id - 16856a25-aff4-4339-83ed-069758188c7f
region would be mypurecloud.com (us east)

Our service is getting an AccessDeniedException when calling the PostText api in Lex. The IAM Role we are using looks to be missing the permission to call lex:PostText.

So, would that be the case for the role that I'm using too? Is there any doc that I can refer to get what all permissions need to be added to the lex bot?

About the Amazon Lex V1 integration - Genesys Cloud Resource Center is the main article for configuring the Lex V1 Integration. I think Configure IAM role with permissions for Amazon Lex app - Genesys Cloud Resource Center is the actual page you want.

I'm a little confused now, this IAM role configuration is needed for setting up the lex integration in Genesys cloud right? We have this integration set up already.

Yes, the IAM role is needed for the Lex integration. Because the integration already exists, the role does not need to be created. However, the role may not have the correct permissions configured for Genesys Cloud to call the bots.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.