6 Standalone WhatsApp/Facebook messenger integration with OBDX

This topic describes the systematic instruction to Standalone WhatsApp/Facebook messenger integration with OBDX option.

Bank can also setup WhatsApp without Oracle Digital Assistant in OBDX. In this release, basic intents are supported

  • Help
  • Balance
  • Recent Transactions
  • Upcoming Payments

All the above transactions will have authentication and authorization as in OBDX for a OBDX user.

Login will be performed based on OTP.

Below is the configuration setup:

  1. The relevant antifactory for server node application will be available fromOBDX installer from this path:OBDX_Installer/installables/OBDX/BASE/<OBDX patchset version>/chatbot/config/digital-assistant/
  2. Navigate to Facebook Developers Console → WhatsApp Configuration. Add the Webhook Callback URL and set up the Verification Token to enable webhook integration.

  3. For setting up node server,
    1. Install node using homebrew
    2. Then open the path of the folder extracted from the installer package on terminal. This is be the path where package.json is located.
    3. Run “npm install”
  4. In environment variables add the following variables:
    1. PHONE_NUMBER_ID: can be fetched from Facebook developer’s console under: Quickstart > API Setup
    2. VERIFY_TOKEN: should be same as one set in Facebook developers console/ WhatsApp configuration
    3. PAGE_ID: is your Facebook page ID:
      • Go to your Facebook Page.
      • Click on About (left-hand menu).
      • Scroll down to Page ID, and you will see a numeric ID.
    4. CHANNEL: can be set as WhatsApp or Facebook respectively to use any one of the channels (WhatsApp or Facebook). Only one at a time is supported.
    5. BASE_URL: should be a https URL of the environment you want to point to.
    6. DEFAULT_HOME_ENTITY: to be set based on requirement in OBDX
    7. MYTOKEN: This token is required to send messages via the WhatsApp API:
      1. Go to Meta for Developers.
      2. Navigate to My Apps and select your app.
      3. Under WhatsApp, go to API Settings.
      4. Find the Temporary Access Token or generate a permanent token via Business Manager.
      5. Use this token as MYTOKEN in your .env file.
    8. PAGE_ACCESS_TOKEN: This token is needed to send messages via the Facebook Messenger API:
      1. Go to Meta for Developers.
      2. Select your app and navigate to Messenger > Settings.
      3. Under Access Tokens, choose your Facebook Page and generate a token.
      4. Save this token as PAGE_ACCESS_TOKEN in your .env file.
  5. After configuring the environment variables, deploy the code and start the application by running ‘node index.js to start the node server.
  6. Based on the channel that is set you can now test the chatbot on WhatsApp/Facebook.

    /digital-assistant/src/config/messages.json contains all text messages which can be customized.

    Note:

    There is language translation service in between the intent and WhatsApp server.

    /digital-assistant/src/services/IntentService.js has mapped intent. These intents can be added in the array.