Integrate a BotPress chatbot
This guide presents how to integrate a Chatbot powered platform BotPress into a Lutece site.
Three modes of integration are possible:
- mode 1 : The cat is in the form of a web page (classic XPage)
- mode 2 : The cat comes in a popup that opens with a button at the bottom right of any page of the site
- mode 3 : The cat is integrated in iframe in another site
To integrate a BotPress bot the only information needed is its identifier and the address of the server
Include the feature
The necessary plugins are :
- The ChatBot plugin which offers the conversational user interface in webpage, popup or content mode to integrate in iframe. This interface is not related to Botpress. It can be used with other chatbot technologies and allows a great flexibility of customization.
- The plugin BotPress which allows to instantiate bots on the interface of the ChatBot plugin and to communicate with BotPress servers via the Converse API. Different types of response such as QuickReplies can be handled by this plugin.
New dependencies in the site POM
Add the plugins dependencies in the site POM ::
<dependency> <groupId>fr.paris.lutece.plugins</groupId> <artifactId>plugin-botpress</artifactId> <version>1.0.1</version> <type>lutece-plugin</type> </dependency> <dependency> <groupId>fr.paris.lutece.plugins</groupId> <artifactId>plugin-chatbot</artifactId> <version>1.0.4</version> <type>lutece-plugin</type> </dependency>
Administration and use
Declare a BotPress bot in the Lutece Back Office
In the Back Office of Lutece click on the menu Manage BotPress Bots then on Add Bot and fill in the following fields :
Mode 1: web page
Access to the web page is via the following URL :
Mode 2: Integration via a popup
This integration is done by adding the bookmark of the PageInclude proposed by the ChatBot plugin in the HTML template of the site (file WEB-INF/templates/site/page_frameset.html).
You must add the following line in this file before closing the body tag :
Mode 3: IFRAME integration
The URL to source the IFRAME is :