1

Let's say you have a ContactUsDialog, PizzaOrderDialog as well as a MyOrderDialog. The user sends a message like: 'how far along is my pizza order' - How would you know which dialog to start?

    public async Task<HttpResponseMessage> Post([FromBody] Activity activity)
    {
        if (activity != null)
        {
            switch (activity.GetActivityType())
            {
                case ActivityTypes.Message:
                    await Conversation.SendAsync(activity, () => new ContactUsDialg());
                    await Conversation.SendAsync(activity, () => new PizzaOrderDialog());
                    await Conversation.SendAsync(activity, () => new MyOrderDialog());
                    break;
        }
        return new HttpResponseMessage(System.Net.HttpStatusCode.Accepted);
    } 
Ezequiel Jadib
  • 14,767
  • 2
  • 38
  • 43
Richard Bailey
  • 2,658
  • 4
  • 27
  • 45

1 Answers1

2

You can't do that in the way you are trying to. You need decide which one will be the root dialog and the re-route messages to other dialogs.

A few samples that might help you:

And yes, you can use LUIS as root dialog and then call child dialogs. Some posts that might help too:

Ezequiel Jadib
  • 14,767
  • 2
  • 38
  • 43