I have a Watson Assistant chatbot embedded in a webpage using the Web Chat embedding integration JavaScript.
I need to make the embedded chatbot catch the login information from the webpage the chatbot is embedded in. Like, making the chatbot starts with "Hi Adam" based on that Adam is already logged into the webpage. Or, even how to make the chatbot catch different elements in the page it's embedded into.
Any advice is appreciated..
Thanks..
You will need to extend the IBM Web Chat client, to capture the login info, and then pass this info back into the Watson Assistant payload. I would suggest adding the info to the context, so that it can easily be used in your answers as you have commented about. This will mean extra JS coding. There is more info in the Watson doc's about extending the Web chat bot or on the IBM Github.
Related
My friends and I are trying to create a chatbot using IBM Watson Assistant and integrating it with Facebook Messenger as platform to host the chatbot.
Our intention is to extract the text and image data that is inputted in the chatbot. Since the chatbot is integrated with Facebook, we are having problems finding a way to extract the data.
Any form of help would be much appreciated!
Thanks!!!!!!!!
Designing a Watson Assistant chatbot for a website and Facebook Messenger raises some issues due to the different way these channels format the Watson response. I am trying to understand how to deal with this.
Currently, a Watson Assistant dialog node allows responses that include text, image, pause, and an option. So far so good. The problem is that in text response I need:
add some empty line. In HTML I can use <br/> and it works fine on Website but not on Facebook.
add a link. In HTML I use link while Facebook Messenger render directly the single URL
I need to list an unordered or ordered list. In HTML I can use ol/li or ul/li tags in Facebook messenger no.
carriage return. In HTML I can use <br/> in Facebook see 1.
How do I deal with these incompatibilities?
I expect to have somewhere best practices documented to write a multi-channel chatbot but I haven't found them.
When building a chatbot with IBM Watson Assistant that has to face different output channels (in your case website and Facebook Messenger), I see two options:
Limit the responses to the common output features. Watson Assistant supports rich responses with multi-line support. Use that instead of <br/>. Check with the integration-specific docs, here Facebook Messenger integration, what is supported.
Use two bots, one for the website and one for Facebook Messenger. In that case you could use the native response format supported by Watson Assistant. The downside is that you have to maintain two bots.
(not an option from your description) Add a wrapper around Watson Assistant and translate your generic responses to your desired output channel with optimized formatting. It would require more effort, but has the best output.
As a common format, consider some basic Markdown as supported by Watson Assistan and some output channels.
I have created my chatbot with IBM Watson Assistant from the GUI using Intents, Entities and Dialog and also tested the same using the "Test Yourself" utility. Now I want to embed this Chatbot on another HTML page. How do I do this? How would I start?
Check out the section on integrations for IBM Watson Assistant. In addition the GitHub organisation Watson Developer Cloud provides the SDKs and has samples. One of them is Watson Simple which is a good starting point.
I am trying to implement IBM Watson chatbot into facebook messenger. I am able to verify my webhook. Also, able to receive and send custom messages through facebook to my webhook.
The problem is that i can't receive messages from IBM Watson. IBM Watson is not able to detect my messages and provide appropriate response. Also, can't receive my welcome message from IBM Watson in facebook messenger when chat window is opened. The tutorial which I followed was on youtube and the link is https://www.youtube.com/watch?v=FdsjS7ZnPLw
Any suggestion would be a great help. Thanks.
The most common cause is not subscribing your webhook to a page after creating it.
The UI doesn't appear until you create your webhook in FB (It's been a year since I have had to do it, so it may have changed).
If that is set up, try connecting to your application layer in postman and make sure you are sending and receiving the right information.
Regarding Welcome message:
The Welcome node of your dialog is not processed by the Facebook Messenger integration. The welcome message is not displayed in the Facebook chat like it is in the "Try it out" pane or in the Preview Link integration web page. It is not triggered from here because nodes with the welcome special condition are skipped in dialog flows that are started by users. Facebook Messenger waits for the user to initiate the conversation. If you need to set default values for context variables at the start of your conversation, do not set them in the welcome node.
for more information check: Integrating IBM Watson Assistant with Facebook Messenger
I can already connect my conversation to my Facebook page and the bot is working.
My Problem is that i couldn't find a single tutorial on how to make calls to a server that is owned by a company and has information about accounts and payments, for example when i type to the Chat-bot that i want to see a list of accounts, the chat-bot would reply with a list from that API; Or i can login to that server with my account by typing the account's name and password in the chat-bot. I just wanted to know if anyone knows how to do that or if its even possible or knows a tutorial that explains it. I also would prefer if the tutorial was detailed because i'm new to this field.
As #Felipe Paixao said, you need to develop an orchestrating application.
I've found one example that explains step-by-step how to use Watson Conversation with Facebook Messenger.
Requirements:
Facebook page
IBM Bluemix
A Facebook Developer Account
Source code.
Step - IBM Bluemix:
Create a SDK for Node.js application
Create a Watson Conversation service
Create your Workspace for Watson Conversation and build your Dialog
Configure the JS app and integrate it with the Watson Service Connections -> Connect Existent:
In your App created in IBM Bluemix, access the Tools and go to IDE Eclipse, and create a new file: app.js with this code.
Replace with your credentials the username and password
You can see your credentials inside Service Credentials, or going to your workspace and access:
Step - Facebook Developers:
Enter to facebook developers with your Facebook account
In the Dashboard select Create a New App and Select Messenger
Put the URL from your Bluemix (Now IBM Cloud) app and select the options marked: messages, message_deliveries, messaging_options e messaging_postbacks.
Now, return to our app to configure the app.js file with our new FB token autogenerated and deploy it.
Step Final
Test your chatbot: If you made everything OK, we will have your chatbot available on your Facebook page.
Obs.: For built your example, you can add the lines of code for call your API in the app.js using the http module, using the Advanced JSON in Watson Conversation and create one "action": "callApi", and recognize with your code for do something, like this example.
See the Official Reference that I used to build Facebook Messenger with Node.js SDK (Back-end) source code based on Priscila Parodi codes.
You need to develop an orchestrating application, that would be responsible to connect the IBM Watson Conversation with your desired Fronted, Facebook in this case, and the Backend systems. I imagine that you are using the automatic deploy to Facebook from the Conversation Tooling, this option would not resolve your need to access a Backend.
The image passed by #data_henrik shows exactly that.
In conversation, you can create context variables that will be used as triggers in the Orchestrator to let him know when you need to call a Backend service to provide an information and then write the response into the Conversation context.
About using the Chatbot to login into a system, passing a password, this isn't a safe option since all information typed would go to Watson Conversation log and any person with access to the tooling/api could see the passwords.