WordPress Plugin for the BotMan Web Widget

I recently was working on a chatbot for a website and wound up using a great PHP library for the task, BotMan. With BotMan, you can follow the really well-done documentation to set up a BotMan endpoint. This is where any client would call to send requests and where logic would be placed to respond to the request. Once it is up and running, you can interface with the BotMan endpoint with something like Postman or Paw. Of course, for your site, you will want some kind of web interface that can send messages to and display responses from BotMan.

BotMan actually provides a chat widget that you can install on your site. It is as simple as adding HTML as an iFrame and two JavaScript files. The iFrame calls in one of the JavaScript files and the other JavaScript file needs to be placed in the main HTML of your page. Finally there is a list of configuration options you can use when calling the Web Widget. In is a pretty easy process but I wanted to make it a little easier and create a plugin.

The WordPress plugin just sets up the Web Widget for use on a site. It will not create a BotMan endpoint for the widget to interact with. That is done separately. But this plugin will add the HTML iFrame to your pages and include the needed JavaScript files. Additionally, instead of editing the configuration options in code, you can use an admin in the WordPress Dashboard under “Settings > BotMan Widget Options.”

BotMan widget

The only setting that you will need to have correctly set for the widget to work is the Chat Server which will be the URL of the BotMan endpoint. You can download the plugin at GitHub:

https://github.com/stirrell/scc-botman-for-wp

If you see any problems please let me know.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>