I am facing a problem with listening to User Selection when we show a carousel. We are using askWithCarousel with dialogFlow and listening to click of a carousel item using actions_intent_option event. When a carousel is displayed to user, assistant starts listening to user input using mic, if mic gets a random input from user (which doesn’t match any of our synonyms for the carousel items) and then the user taps on any carousel item or says any of the synonyms, actions_intent_option event is not getting fired. It works fine if this interaction is immediately followed by showing of carousel. Else, it will take carousel title as user input and resolves to a different intent.
Not able to get the id of the carousel item because of this. Is there a way to disable mic or emit actions_intent_option even when the user clicks on carousel item later. Please help with this flow.
Selection events are only emitted, as you've discovered, right after the carousel or list has been sent to the user.
I'd recommend setting up a fallback intent to check for the titles of the list items or prompting the user with a carousel or list again.
Related
I need some help here. I have a google assistant food recipes bot with the following intents:
[GET_RECIPES_BY_NAME]
[GET_RECIPES_BY_CAROUSEL]
-----[GET_OPTION]
So, when the user says "I want a chocolate cake", the dialogflow invokes the [GET_RECIPES_BY_NAME].
When user says "See menu", the bot shows the carousel. But, when the user taps the item, the dialogflow is invoking the [GET_RECIPES_BY_NAME] too, not the [GET_OPTION].
It is using/returning the title instead of the option/key.
[GET_OPTION] intent was set as followup with the context and event actions_intent_OPTION.
The flow is a little bit more complex, but I revised it to make it more comprehensible. All the intents handles are in the fulfillment.
I tried many solutions: [GET_OPTION] as followup, as in the first level, deleting and recreating all the contexts in fulfillment....and so on, and nothing.
An important detail: recipes that don't not have the training in [GET_RECIPES_BY_NAME] call correctly in the [GET_OPTION].
My question is this: If I set any followup intent and set it with the event actions_intent_OPTION, shouldn't this always be invoked when I tap the carousel item?
I have implemented a List action visual on my google action. When I click on a list item, the related intent should fire, but on the very first click, it goes to default fallback intent.
I suppose it is because the output context is not attached when the list item is clicked, but not sure about that.
Any help would be greatly appreciated.
I have a HeroCard carousel with multiple cards and buttons. These buttons correctly route if tapped immediately after the carousel is shown. However, if they are tapped at a later stage in the dialogue, the routing does not work.
How can I get buttons to correctly route the dialogue if they are tapped out of turn (i.e. tapped at some time other than immediately after the carousel is show)?
I figured it out. In version 3.1 of Bot Builder, we have the ability to listen for matches to phrases using Regex - see IntentDialog. Using this, anywhere in your dialog flow a user can type a certain phase out of context (like 'help') and can be redirected to that route.
We can use the same method when a button is tapped. The important thing to note is that the message that is returned when a button is tapped is NOT the string seen by the user. Instead, it is the route that the button is hoping to direct to.
Therefore, you can use Regex to listen for the route, and then redirect to that route. For example:
var intents = new builder.IntentDialog();
bot.dialog('/', intents);
intents.matches(/^theRouteYourButtonIsDirectingTo\//i, [
function (session) {
// Whatever you want to return
},
]);
I am developing one bot frame work project in that I have some requirement is like below.
whenever I click the button in Thumbnail card next I want to display the List of Items in horizontally after displayed the List of items, Next I click on any one List of item it will be redirected to My Own URL.
Present I am displaying Thumbnail Card like below
Now I want to display the list like below when I am click the button
None of the current channels support arbitrary card designs as of yet, so you are limited to the set provided by the channel (i.e. Skype, Facebook, Telegram, etc.)
I am using JHipster 3.3.0 and generated code using JDL.
Out of the box, each entity has its own popup dialog page for editing and saving data, i.e. {entity}-dialog.html. And after clicking the Save button, the dialog will close then the entity list page (i.e. {entity}s.html) will display the alert message 'A new <entity name> is created/updated with identifier {primary key}' to indicate outcome of save by using <jhi-alert-error></jhi-alert-error>.
Now I am implementing a one-to-many relationship for 2 entities, say User and Account(i.e. a User can have many Accounts)
such that the editing and saving of both entities happen in the same User page(i.e. User-dialog.html).
All Accounts of the User are displayed in an Account table, each row of the table will have a Save button to save data
of the Account after editing the data in the row.
This is all working fine. However, I noticed after clicking the Save button of Account row, I can see the background User list page
displaying the alert message mentioned above rather then in the current page.
I can't figure out how to display the alert message in the current page as opposed in the entity list page, which is the
default behavior.
I am missing some logic here. Any idea?
Basically, the <jhi-alert-error></jhi-alert-error> in my <entity>-dialog.html page is ignored and won't display message for outcome of successful save except for error message from Form validation.
Thanks in advance,
Sam
Ooops,silly me. Just found the answer.
The alert message 'A new is created/updated with identifier {primary key}' was displayed because the tag <jhi-alert></jhi-alert> was used, it was never
<jhi-alert-error></jhi-alert-error>.