I couldn't figure out a problem with IBM Watson Assistant. I've chosen to use an Option type as response. That way, I can see a list on my chatbot where each item is clickable and has an associated value.
When a user clicks one of the options, the associated user input value is sent to the assistant. How can I give this value to a context variable? Is it possible?
Yes, that is possible for option responses and is the typical use case. I have demonstrated that in a simple chatbot I use in some of my talks.
I use different language code as options. Users can click on them and the result is saved in the variable langcode. Because users could have already specified what I would ask for, I check for it and save it.
The simple bot has more uses of options and the full skill is available in case you want to see all the details.
Related
I have been trying to create a chat bot that helps users to interact with my website. I want Watson to be able to interact with my web-server to read, write or modify my database. In certain cases, Watson will require some very specific user inputs/Q&A which are too unordered to belong to any specific entity, for which I'm thinking an Action skill can help. After creating an Action skill that collects the desired user inputs, I'm now unable to find the option that let's you call an action skill from within a dialog node, or to callout for webhooks from an action skill.
Although some articles from the documentation says, it's possible to do so but I can't see from where. There used to be an option (Call an action skill) in the customize dialog box, here is a screenshot of the old customize dialog box, but this option is not there anymore. Is there any other way to achieve this?
IBM no longer provides the callout to actions skill from dialog skill. They posted alerts for existing users;-
Note: Once disabled, call out to an action skill will no longer be available.
I'm trying to make my IBM chatbot asking the user question
ex: what's your name?
but there's no choice in define customer response to make it wait for the user answer, it just either options or numbers.
you define a customer response only if there is a special structure (e.g. options) or some special validation ( precentage).
When you model an action there is no need to wait for an arbitrary text from a user, as the intent is already set when the user entered the action.
Therefore in each step it is expected you collect some information from the user.
How can I disable the input field of Watson assistant after giving closing statement?
Ex: If the bot shows thank you for using our services, then the Input field should be grayed out and should not let user to type, user has to restart the bot to chat.
There is a method in watson :instance.updateAssistantInputFieldVisibility(false) it disables the input field, so you can customize the way you want to use.
I see the following options for you to "disable" the chat in Watson Assistant.
You could respond with a pause.
Set an internal variable that from your point of view the dialog is done and should not be resumed again. React to any input by not answering.
Consider a special version of anything_else.
Build your own interface that can disable the input.
IMHO disabling input should not be done, it is against best practices. You want the user to interact. Reloading the web page with the chat typically reenables input anyway. So what is the use case...?
I am using IBM Watson Assistant to create a troubleshooting guide. I wish to put a disclaimer in the beginning and only if the user checks the checkbox saying he agrees to the statements in the disclaimer, they will be able to go further in the conversation.
I tried include the HTML checkbox code, but it doesn't seem to work. I don't want "options" which is present in the Assistant. i wish to have a checkbox.
Note that Watson Assistant typically is part of a solution and not a chatbot alone. What is your app that is used as user interface? You could let your app react to a context variable and display the checkbox. Not all user interfaces and integrations may support displaying a checkbox.
Another option is to ask the user to agree to the terms. If they answer "I agree" or "Yes", then the dialog moves forward.
I created an "intent" that I want to collect some contact information from. I want either their phone number or email address. As most users don't want to give both, I want to make it required that they share one of the other.
Is there a way to do this from the web app? Is there a way to accomplish this thru fulfillment code? or is there any other way to achieve this?
The either/or (or better put the if/else) logic can be achieved via follow up intents like this:
Create an intent and ask your user if they rather give you their phone or their email
Create a follow up intent for when the user replies with 'email' and another follow up intent for when the user replies with 'phone'. At the 'Responses' in each intent, ask for the user's email or address accordingly and then follow up the conversation as you'd do with any other intents.
To create follow up intents, hover over an intent at the intents page and click at the 'Add follow up intent' option.
If there isn't a screen input, consider that it may be difficult for the user to input their emails so make sure you do appropriate checks that it is a valid email format and of course ask your users for confirmation (ex. the submitted email is xyz#app.com. Shall I proceed?)
In a given intent, you can enable "use webhook for slot-filling" to have Dialogflow call your webhook each time the intent is matched.
https://dialogflow.com/docs/fulfillment#slot_filling
In your fulfillment code, you can check the presence of either parameter and respond appropriately if neither is provided.