ChatFlow Logo

WhatsApp Integration Guide

Step-by-step guide to integrating WhatsApp Business with ChatFlow for automated messaging.

Overview

Connect your WhatsApp Business account to ChatFlow to enable AI-powered automated responses to customer messages. This integration allows your chatbot to handle customer inquiries 24/7 through WhatsApp.

Prerequisites

Before you begin, ensure you have:

  1. Meta Business Account - A verified Meta (Facebook) Business account
  2. WhatsApp Business Account - Access to WhatsApp Business API
  3. Meta Developer Account - To create and manage your app
  4. ChatFlow Account - An active ChatFlow subscription (Pro or Enterprise)
  5. Trained Chatbot - A chatbot already created and trained in ChatFlow
  6. Business Phone Number - A phone number for WhatsApp Business

Step 1: Getting Started with WhatsApp Integration

1. Sign in to ChatFlow and Create Your Bot:

  • Make sure you have access to your ChatFlow account
  • Set up your chatbot by training on your website links, documents, text files, or PDFs

2. Find the WhatsApp Integration Option:

  • Navigate to your chatbot menu
  • Click on the Integrations tab
  • Select Add to WhatsApp to initiate the integration process
  • Follow the displayed steps to connect your WhatsApp business account to ChatFlow

Step 2: Setting Up Meta (Facebook) Business Account and App

1. Create a Meta (Facebook) Business Account:

  • Visit business.facebook.com
  • Enter your business name, your name, and work email address
  • Click Next
  • Provide your business details and click Submit

2. Create a New Meta (Facebook) App:

  • Visit the Meta Developer Dashboard
  • Log in to your Meta Developer Account
  • Select My Apps
  • Click Create App
  • Choose Use Case: Other and click Next
  • Choose App Type: Business and click Next
  • Provide app details: App Name, App Contact Email, Business Account (Optional)
  • Click Create App

Step 3: Setting Up Meta App for WhatsApp Integration

1. Add WhatsApp to your Meta App:

  • In the Developers Dashboard, choose your app
  • Locate Add products to your app in your app's dashboard tab
  • Choose WhatsApp for setup

2. Configure App Settings:

  • Select your Meta Business Account (if not selected in step 2)
  • Navigate to App settings > Basic from the sidebar
  • Set the Privacy Policy URL to: https://chat-flow.app/privacy
  • Save changes
  • Set App Mode to Live

Step 4: Generate WhatsApp Token

1. Create a System User:

  • Visit the Meta Business Suite
  • Find your business account in the top-left dropdown menu and click its Settings (gear) icon
  • Click Business Settings
  • Go to Users > System users
  • Add an Admin system user

2. Add Assets:

  • After creating the system user, click on Add Assets
  • Navigate to Apps > Your app name
  • Select your app and grant full control to manage the app

3. Generate System User Access Tokens:

  • Click the Generate New Token button on the system user
  • Choose the app that will use the token
  • Set the token expiration to Never
  • Select these permissions:
    • whatsapp_business_messaging
    • whatsapp_business_management
  • Generate the token
  • Important: Copy the access token and store it securely - you won't be able to see it again

4. Add a Business Phone Number for WhatsApp:

  • You can use your own business number or utilize the provided test number
  • In the WhatsApp Developer Dashboard, navigate to WhatsApp > API Setup from the sidebar
  • Go to Step 5: Add a Phone Number and click Add phone number
  • Fill in the required details in the form
  • Verify your number using the received code
  • Once added, select your phone number in Step 1 of API Setup

5. Add a Payment Method:

  • To send messages via WhatsApp, you need a valid payment method
  • Visit WhatsApp Pricing for details
  • After adding your business phone number, click Add payment method to address the Missing valid payment method alert
  • Enter your payment details

6. Test your Business Number:

  • Return to WhatsApp Developer Dashboard
  • Navigate to API Setup > Step 1
  • Enter a testing "To" number
  • Click Send message to verify successful message delivery

Step 5: Configure WhatsApp API Webhook Settings

1. Verify WhatsApp Webhook Callback:

  • In WhatsApp Developer Dashboard, navigate to Configuration
  • Under Webhook, click Edit
  • Copy the Callback URL and Verification Token from ChatFlow WhatsApp Integration modal
  • Paste them into your WhatsApp Developer Dashboard
  • Click Verify and save

2. Configure Webhook Subscription Field:

  • Under Webhook Fields, click Manage
  • Find the messages field and subscribe to it by checking the box
  • Return to ChatFlow and click Next

Step 6: Add WhatsApp Account to your ChatFlow Chatbot

1. Retrieve WhatsApp Account Information:

  • In WhatsApp Developer Dashboard, navigate to App Settings > Basic
  • Copy App Secret and paste it in ChatFlow integration modal in Facebook App Secret
  • Paste the permanent access token generated from Step 4.3 in ChatFlow integration modal in WhatsApp Access Token
  • Copy your Phone Number, Phone Number ID, and WhatsApp Business Account ID into the ChatFlow WhatsApp Integration modal
  • Click Save to complete the integration process

Step 7: Verify Integration

Once connected, you'll see:

  • Your WhatsApp number displayed
  • Integration status showing Active
  • Option to edit or delete the integration

Test Your Integration

  1. Open WhatsApp on a different phone
  2. Send a message to your connected WhatsApp Business number
  3. Your ChatFlow chatbot should respond automatically

Managing Your Integration

Enable/Disable Integration

  • Go to Integrations tab in your chatbot settings
  • Toggle the WhatsApp integration on or off as needed

Edit Integration Settings

  • Click the Edit button on your WhatsApp integration
  • Update tokens, phone numbers, or webhook settings
  • Save changes

Delete Integration

  • Click Delete on the WhatsApp integration
  • Confirm the deletion

Troubleshooting

Messages Not Being Received

  • Verify the integration shows as Active
  • Check that webhook subscription for messages is enabled
  • Ensure your chatbot is trained and active

Webhook Verification Failed

  • Double-check the Callback URL is correct
  • Verify the Verification Token matches exactly
  • Ensure your app is set to Live mode

Token Expired

  • Generate a new permanent access token
  • Update the token in ChatFlow integration settings

Payment Method Issues

  • Ensure a valid payment method is added to your Meta Business account
  • WhatsApp charges for messages beyond the free tier

Best Practices

  1. Response Time - The chatbot responds within seconds, improving customer satisfaction
  2. Fallback to Human - Configure handover triggers for complex inquiries
  3. Message Templates - Use approved templates for initiating conversations
  4. Business Hours - Set custom responses for outside business hours
  5. Regular Testing - Periodically test the integration to ensure it's working

Pricing Note

WhatsApp Business API has its own pricing structure:

  • First 1,000 conversations per month are free
  • Beyond that, charges apply based on conversation type and region
  • Visit WhatsApp Pricing for current rates

Note: This integration is available to Pro and Enterprise users. WhatsApp imposes charges for messages exceeding the 1,000 free monthly limit. ChatFlow is not liable for any charges incurred beyond this limit. Ensure your automated responses comply with WhatsApp's Business Policy and Commerce Policy.