Updated Tutorial: Database-Driven Chatbot

5 min read

Database-driven chatbot tutorial adapted to latest IBM Watson Assistant features

If you want to build a chatbot that gets its content from a database, there is good news—the existing tutorial “Build a Database-Driven Slackbot” was just updated to adapt to latest features of IBM Watson Assistant.

First, define a skill that reaches out to a database service like Db2. Thereafter, use the built-in integrations to easily tie in the assistant with Slack or Facebook Messenger. With the updated tutorial and code, you no longer need Botkit or Conversation Connector for the Slack integration—everything is built into Watson Assistant. This means that you have more UI options available. Chat using the preview, embed the chatbot into your own application, or use the WordPress plugin.

Updated Tutorial: Database-Driven Chatbot-1

Database-driven Slackbot: Architecture

Database-driven chatbot

With the acceptance of chatbots to support business tasks and assist in enterprise workflows, it is critical to access systems of record from within a dialog. The tutorial shows how to build a database-driven chatbot and integrate it with Slack as user interface. Instead of Slack, you can also use the Assistant-provided preview, Facebook Messenger integration, or WordPress plugin as alternative user interfaces. Dialog actions, realized as IBM Cloud Functions, query a Db2 or PostgreSQL database or insert new records. Therefore, a messenger application can serve dynamic, user-specific content from a database.

Get started

It is easy to build a database-driven chatbot. Reach out to systems of record from within a dialog so that Slack or other messenging systems can support enterprise workflows. The updated tutorial has all information to get started. Finally, check out the following resources to learn even more.

If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn.

Be the first to hear about news, product updates, and innovation from IBM Cloud