Build a framework that connects WhatsApp to Watson services

Summary

To enable mobile users to leverage IBM Watson® services through a messenger app, complete this developer code pattern and build a framework that can act as an intermediator in connecting Watson services to WhatsApp Messenger.

Description

There are currently 2.4 billion users on WhatsApp, and the number keeps climbing. For medium and large businesses, WhatsApp introduced WhatsApp Business, which powers communication with customers all over the world so they can connect with businesses on WhatsApp in a simple, secure, and reliable way. To make the conversations smarter, Watson AI can be infused as the back end to deliver advanced AI capabilities to customers.

In this code pattern, you will learn to build a framework to connect Watson Machine Learning, deploy a simple house price-prediction model, and access it from your WhatsApp Messenger. When you have completed this code pattern, you will understand how to:

  • Integrate IBM Watson services into WhatsApp.
  • Deploy the application to IBM Cloud® Foundry.
  • Deploy machine learning models to IBM Cloud Object Storage.
  • Manage machine learning models in IBM Watson Studio.

Flow

Flow diagram

  1. User sends a message through WhatsApp.
  2. The message is redirected to the Twilio Programmable Messaging service.
  3. Twilio Programmable Messaging will forward the message to the back-end app hosted on IBM Cloud.
  4. The back-end app interacts with Watson Machine Learning to get the response.
  5. Watson Machine Learning does the necessary computations and returns a response.
  6. The back-end app processes the response and converts it to user-readable format and forwards to Twilio.
  7. Twilio forwards this message as a reply on WhatsApp.
  8. The user will receive this as a response from Watson Machine Learning service on WhatsApp.

Instructions

Get detailed instructions in the README file. These instructions explain how to:

  1. Clone the repo.
  2. Create Watson services.
  3. Deploy the server app on IBM Cloud Foundry.
  4. Create the Twilio service.
  5. Configure the credentials.
  6. Deploy the price-prediction model.