-3

I have built and published a BOT (using Microsoft BOT Framework, LUIS and C#). I am able to use web chat and communicate with my bot (in a web browser).

What I am trying to do is:

  • Have the browser hosting my BOT drive the UI in another browser.

    Ex. The user types in "Show me all products less than $100" in the web chat.

    This should change the second browser's UI to show the relevant results.

How would I go about achieving this ? (not too concerned about security at this point of time).

Thank you so much in advance for your time and input.

VenVig
  • 645
  • 1
  • 10
  • 14
  • 2
    [SignalR](http://signalr.net/) – Alexan Sep 19 '17 at 21:31
  • Thank you Ezequiel Jadib. That link led me to https://stackoverflow.com/questions/43528342/sending-events-from-an-embedded-webchat?noredirect=1&lq=1, which solved my problem. – VenVig Sep 21 '17 at 19:19

1 Answers1

0

One thing you can do is use a card with a button as a confirmation step in your conversation. This is probably the easiest way to accomplish what you want. This will by default open a new tab which you can set the URL. so when your user says "show me nachos" you can filter your inventory and display only nachos. Here is example code using the OpenUrl ActionType in C#

var reply = activity.CreateReply();

        HeroCard h = new HeroCard();
        h.Text = "Would you like to see nachos";
        h.Buttons = new List<CardAction>
        {
            new CardAction(ActionTypes.OpenUrl, "Give Nachos", value: "https://www.google.com/search?q=nachos&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjxqpycnrLWAhVG82MKHUcTA60Q_AUICigB&biw=1280&bih=670"),
            new CardAction(ActionTypes.OpenUrl, "No, I want tacos", value: "https://www.google.com/search?biw=1280&bih=670&tbm=isch&sa=1&q=tacos&oq=tacos&gs_l=psy-ab.3..0i67k1j0j0i67k1j0.69031.69942.0.71274.5.5.0.0.0.0.149.392.2j2.4.0....0...1.1.64.psy-ab..1.4.392....0.bPBCuHv9Edk")
        };

        var aList = new List<Attachment>();
        aList.Add(h.ToAttachment());
        reply.Attachments = aList;
        await context.PostAsync(reply);
D4RKCIDE
  • 3,439
  • 1
  • 18
  • 34
  • Thanks JasonSowers for your time. I am sorry, this is not what I was looking for though. I found the answer as marked. – VenVig Sep 21 '17 at 19:21