2

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.

Loyal_Burrito
  • 125
  • 2
  • 14
  • Is there a reason that you are not using multiple intents within the same bot? Those are relatively easy to switch between. If you want separate Lex bots, you might need something like Connect to bring them together. That would limit your medium options. – EpicVoyage Jun 09 '18 at 08:14
  • It's a project meant to connect different bots with different purposes together. I thought connect was for service calls? – Loyal_Burrito Jun 09 '18 at 08:19

1 Answers1

1

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.

sid8491
  • 6,622
  • 6
  • 38
  • 64