How do i insert a checkbox in the IBM Watson Assistant? - ibm-cloud

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.

Related

How to callout to an action skill from a dialog skill in IBM watson?

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.

IBM Watson Assistant: How to close dialog by disabling input field?

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...?

IBM Watson Assistant: How to set a context variable from option response?

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.

Debug Watson Assistant webhook

My Watson Assistant dialog has a webhook call to an IBM Cloud Functions action. After I change the code in the action function and "Try it out" again in Watson Assistant, it doesn't pick up the change. Is there some cache I need to clear, or something I need to restart each time I make a code change?
In Watson Assistant in the "Try it out" are links / buttons to clear everything or to manage context variables. There you can reset the "Try it out" bot.
In general, when you assign values to a variable the value is kept until you clear or delete it. Thus, if you do not set input variables to null to clear them they are reused without asking the user for input again.

PayPal 'Buy Now' button option - how to access?

I am adding a PayPal "Buy Now" button to a web site using code supplied by the PayPal developer site. It's possible to have options, for example garment sizes, XL,L,M,S... I see how to set up the button so the user can make a choice, but how do I access the choice so that I can take action? Is this supposed to be done in HTML, or should I write a CGI program to take my action - this is my preferred option - but either way, how can I access the option values? I am new to all this, but I can't find anything in the PayPal Developer documentation.
This can be easily done. Please look at the follow sample implementation and the source code for setting a Multi option based button.
https://www.paypal.com/us/cgi-bin/webscr?cmd=_pdn_xclick_options_help_outside