Please, is it possible to create a form to collect the user’s input in an entity, when the users open the chat window? For example, assuming that the Bot will be located at the lower right side of our website then when users click on the Bot, will open the chat Windows and display a form to users to input:
(Name | Surname | E-mail | Order ID) and also to create a button “Start” which trigger an action to send the values and also will start the conversation.
Is it possible to achieve this implementation?
We infer from your explanation that you would like to show a form as soon as the chat window is opened before starting the actual conversation.
We have two suggestions for you in this use case:
1- Create a dialog task(say Welcome Message), add a message node after the default user intent node.
In the message node response, add a response for channel “Web/mobile client” and create a custom template to display a form in the message node.
Please refer the following link for more information on custom template:
However, creating a custom template for a form and to accept input from it involves a lot of code. We do not have a working model at our end for this implementation. Also, the conversation session will already be initiated.
Once, the custom template is developed,
You can have the onConnect event in the Natural Language >> Default conversation >> Event handlers enabled.
Now, run this task on the onConnect event.
This allows us to display the form when the chat window is opened.
2- In your website, you will need to write code to add an icon(similar to the chat icon and keep the actual chat window icon hidden) at the lower right side and on clicking that icon, open a popup element, write the code to display a form element and accept inputs.
Add a “start conversation” button at the end of the form, clicking on that, send the values to the backend and also show the Actual Kore bot chat window now.
This doesn’t involve any changes from the platform. The code for the form is purely written in your website source code.
Let us know if you need any further clarification.