Loyal_Burrito
Loyal_Burrito

Reputation: 125

How to give control to another amazon Lex bot to answer the conversation from a previous lex bot?

I want to be able to give control of one lex bot to another. They would be specialized chatbots for certain jobs. I would like to be able to switch bots once the demand for a service is done.

Upvotes: 2

Views: 878

Answers (1)

sid8491
sid8491

Reputation: 6800

Basically you need to have a program/code/lambda-function which will handle the process of checking what process is going on and which bot to call next.

You can retain all required information, and decide which bot to call using that information.

Below is the code for calling Lex bot:

response = client.post_text(
    botName='name_of_bot_you_want_to_call',
    botAlias='alias_of_that_bot',
    userId='string',
    sessionAttributes={
        'string': 'string',
        'string': 'string;,
    },
    requestAttributes={
        'string': 'string'
    },
    inputText='text_query_you_want_to_pass'
)

Hope it helps.

Upvotes: 1

Related Questions