• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

How do I keep bot visible and active as parent web pages change?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apologies guys, this might be the wrong forum, but I'm posting in desperation !. (Nothing from stack exchange or microsoft). Anyway ...

I am developing a microsoft bot, (currently using bot composer, which is linked to QnA maker). The bot will need to be visible on the main website (which is predominantly a store-front type website, showing various products, with each product having its own URL).

The various questions in QnA maker relate to ANSWERS which need to point to specific product pages on the hosting web site.

The typical scenario will be , user will ask a bot a question, and this will result in an ANSWER which has a URL to the relevant page on the main website. When the user clicks the link in the bot, the main website will navigate to the relevant product page, but the bot should still be visible, and should still be in a state which shows the conversation so far (rather than being re-started).

How can this be achieved?

(I have experimented with embedding the bot in an iframe, as per the Azure bot instructions, but of course, as soon as the parent web page changes, this is effectively a new page so the bot becomes invisible).
NOTE - as a secondary issue, It appears that the QnA maker sets all links to use target="_blank" and I suspect I really need to be using a link which follows this technique: " target="_top">Lin or " target="_parent">Link

Does anyone has any advice regarding this secondary issue? (or any thoughts at all on the above!). Thanks in anticipation
 
Bartender
Posts: 561
11
IntelliJ IDE Spring Fedora
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you could either have a state for the bot that is given with each request or have a single page app where all requests are done asynchronously
 
Mark Hardman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Al Hobbs wrote:you could either have a state for the bot that is given with each request or have a single page app where all requests are done asynchronously



Thanks for taking time to reply Al

So for option 1, I'm guessing the way forward would be :
Bot is sitting in an iframe on product page "X"
User has conversaton with bot, and gets to a point where the bots answer i telling user about product "Y"
When user click the link (which is in the bots answer text), the bots "state" needs to be saved (lets call it state S )
The clicked link will force the "parent" page to re-load with the relevant URL (for a given product "Y").
All of these pages (I guess?) have to have an iframe to hold the bot (usually in the bottom right as it happens).
When the product "Y" page loads, it has the iframe which has the bot in it, and this (iframe/bot) needs to refresh so it shows the state which was current (i.e. state S) , so the user can see the new product page, but also the conversaton in the bot (rather than the bot starting a converstion from scratch).

Does that sound right ?

For option 2 - Is this the basic idea?
- Website is using SPA (Single Page App) philosophy
BOT is part of that overall page (again - it could sit bottom right in the overall real estate).
When a link gets clicked in the bot, PART of the page gets refreshed (using Async/Ajax type technology?)
[The part that gets refreshed will probably be the "main" section where the products (X, Y whatver), is displayed, but the bot (and probably the page header, footer, and other stuff, stays as it was.

That sound correct?

Thanks again Al
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic