# WhatsApp Business Messaging and API Integration (WABA) Training Material

## Course Overview

This training material is designed for teams who want to understand, set up, and use WhatsApp Business Messaging with WhatsApp Business Account (WABA) and API integration. It combines business context, account setup, API basics, template management, and a hands-on demo flow.

## Target Audience

- Business analysts
- Solution consultants
- Project managers
- Support teams
- Developers and integration teams
- Operations teams managing WhatsApp messaging

## Training Duration

1 day

## Learning Outcomes

By the end of this training, participants should be able to:

- Explain the WhatsApp Business ecosystem and the role of Meta, WhatsApp, and BSPs
- Identify suitable use cases for WhatsApp Business Messaging
- Understand the requirements to create and configure a WABA
- Set up phone numbers for WhatsApp Business API usage
- Generate and manage API credentials for Meta Cloud API
- Send text and media messages via API
- Create and manage template messages
- Understand webhook callbacks and backend reply handling
- Perform a basic end-to-end WABA integration demo

## Suggested Agenda

| Time | Topic |
|---|---|
| 9:00 AM - 9:30 AM | Module 1: Introduction to WhatsApp Business API |
| 9:30 AM - 10:45 AM | Module 2: WABA Account and Phone Number Setup |
| 10:45 AM - 11:00 AM | Break |
| 11:00 AM - 12:00 PM | Module 3: Getting API Credentials |
| 12:00 PM - 1:00 PM | Lunch |
| 1:00 PM - 2:15 PM | Module 4: Sending Messages via API |
| 2:15 PM - 3:15 PM | Module 5: Message Template Management |
| 3:15 PM - 3:30 PM | Break |
| 3:30 PM - 5:00 PM | Module 6: Live Demo and Q&A |

---

## Module 1: Introduction to WhatsApp Business API

### 1.1 Understanding WhatsApp Business Ecosystem

WhatsApp Business Messaging is part of the Meta ecosystem and enables businesses to communicate with customers through a secure and scalable messaging channel.

#### Role of WhatsApp

- Provides the messaging platform used by end customers
- Delivers person-to-business communication over mobile devices
- Supports text, image, document, location, and interactive messages
- Enforces messaging policies, quality ratings, and commerce rules

#### Role of Meta Platforms

- Owns WhatsApp and the underlying business platform
- Provides Meta Business Manager and developer tools
- Manages WhatsApp Cloud API infrastructure
- Controls template approval, access control, and business verification

#### Role of Business Solution Provider (BSP)

- Acts as an implementation or service partner for businesses
- Helps onboard businesses to WhatsApp Business Platform
- May provide hosting, support, dashboards, CRM integrations, and managed services
- Simplifies setup for customers who do not want to integrate directly with Meta APIs

### 1.2 Use Cases

#### Customer Support

- Handle inquiries
- Resolve issues
- Share order updates
- Provide self-service flows

#### Marketing Broadcasts

- Promote campaigns and offers
- Re-engage customers
- Send personalized outreach using approved templates

#### OTP / Transactional Alerts

- Send one-time passwords
- Notify customers of payment events
- Confirm account activity securely

#### Notifications

- Appointment reminders
- Delivery status updates
- Billing reminders
- Service disruption alerts

#### Conversational Commerce

- Product discovery
- Cart reminders
- Guided purchases
- Lead qualification and follow-up

### Key Takeaways

- WhatsApp Business API is built for medium to large scale business communication
- Meta controls platform access, governance, and templates
- BSPs help accelerate implementation and operations
- The best use cases combine business value with fast, relevant customer communication

---

## Module 2: WABA Account and Phone Number Setup

### 2.1 Prerequisites

Before creating a WABA, the business should prepare the following:

#### Facebook Business Manager Account

- A valid Meta Business Manager account is required
- The business must have administrator access
- Business settings must be accessible for asset assignment

#### Verified Business

- Business verification improves trust and unlocks production readiness
- Meta may request legal business information
- Verification status affects onboarding progress and feature access

#### Business Documents Required

Common supporting documents include:

- Company registration certificate
- Business license
- Utility bill or bank statement
- Proof of legal business name
- Website and business email domain consistency

### 2.2 Creating WhatsApp Business Account (WABA)

#### Setting Up in Meta Business Manager

Steps:

1. Log in to Meta Business Manager
2. Open Business Settings
3. Go to Accounts
4. Select WhatsApp Accounts
5. Add or create a new WhatsApp Business Account

#### Adding WhatsApp Business Account

During setup, define:

- Business name
- Display name
- Time zone
- Business category
- Support email
- Website

#### Assigning System Users

System users are used for backend and API access.

- Create system users under Business Settings
- Assign assets such as apps and WhatsApp accounts
- Grant appropriate permissions for messaging operations

#### Understanding WABA ID and Business ID

- `Business ID`: Identifier of the Meta Business account
- `WABA ID`: Identifier of the WhatsApp Business Account
- Both are needed in administration, integration, and troubleshooting

### 2.3 Phone Number Setup

#### Requirements for Phone Number

- Must be able to receive OTP via SMS or voice
- Should not already be actively linked to another WhatsApp app or API environment unless migrated properly
- Should be owned and controlled by the business
- Must meet Meta policy and format requirements

#### OTP Verification Process

1. Add the phone number to the WhatsApp Business Account
2. Choose SMS or voice verification
3. Receive verification code
4. Enter code in the platform
5. Confirm successful registration

#### Number Quality Rating Explanation

Meta monitors number quality based on user feedback and messaging behavior.

Quality states usually include:

- High
- Medium
- Low

A poor quality rating may lead to:

- Messaging limits
- Reduced deliverability
- Number restriction

Best practices:

- Send only expected messages
- Use clear opt-in practices
- Avoid spam-like or excessive notifications
- Keep templates relevant and accurate

### Key Takeaways

- Business verification and correct document preparation reduce onboarding delays
- WABA and phone setup are foundational for production messaging
- Number quality directly affects account performance and trust

---

## Module 3: Getting API Credentials

### 3.1 Meta Cloud API Setup

Meta Cloud API allows direct API-based messaging without self-hosting WhatsApp infrastructure.

#### Accessing WhatsApp Cloud API

Typical setup flow:

1. Go to Meta for Developers
2. Create or select an app
3. Add the WhatsApp product
4. Access API setup configuration
5. Retrieve test credentials and production assets

#### Generating Required Credentials

##### App ID

- Identifies the Meta app used for integration

##### App Secret

- Used securely in backend integrations
- Must never be exposed in frontend code

##### Permanent Access Token

- Required to call production APIs
- Usually generated through Business Manager and system user configuration

##### Phone Number ID

- Unique identifier for the sending phone number in the API

##### WABA ID

- Identifies the WhatsApp Business Account connected to the number

### 3.2 System Users and Token Management

#### Creating System User

1. Open Meta Business Settings
2. Go to Users
3. Select System Users
4. Add a new system user
5. Choose admin or employee access as needed

#### Assigning Assets

Assign the following where relevant:

- App
- WhatsApp Account
- Phone number assets

Permissions should follow least privilege while still allowing messaging operations.

#### Generating Long-Lived Token

- Generate token from the system user flow
- Select the app and required scopes
- Store the token securely in server-side configuration or secret management tools
- Rotate credentials according to internal security policy

### Security Best Practices

- Never expose tokens in browser code
- Store secrets in environment variables or a vault
- Restrict admin access to business assets
- Maintain credential ownership documentation
- Revoke unused users and tokens promptly

### Key Takeaways

- Cloud API setup depends on both developer-side and business-side configuration
- System users are critical for production integrations
- Secure token handling is mandatory

---

## Module 4: Sending Messages via API

### 4.1 API Fundamentals

#### REST API Overview

WhatsApp Cloud API uses HTTPS REST endpoints and JSON payloads.

Core actions include:

- Sending messages
- Uploading media
- Managing templates
- Receiving webhook events

#### Endpoint Structure

Example send message endpoint:

```text
POST https://graph.facebook.com/v23.0/{PHONE_NUMBER_ID}/messages
```

Common components:

- API version
- Phone Number ID
- Resource path such as `/messages`

#### JSON Request Format

Typical request structure:

```json
{
  "messaging_product": "whatsapp",
  "to": "60123456789",
  "type": "text",
  "text": {
    "body": "Hello from WhatsApp Cloud API"
  }
}
```

### 4.2 Sending Test Messages

#### Text Message Example

```bash
curl -X POST "https://graph.facebook.com/v23.0/<PHONE_NUMBER_ID>/messages" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "60123456789",
    "type": "text",
    "text": {
      "body": "Hello, this is a test message from our integration."
    }
  }'
```

#### Media Message Example

Image message:

```bash
curl -X POST "https://graph.facebook.com/v23.0/<PHONE_NUMBER_ID>/messages" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "60123456789",
    "type": "image",
    "image": {
      "link": "https://example.com/product.jpg"
    }
  }'
```

Document message:

```bash
curl -X POST "https://graph.facebook.com/v23.0/<PHONE_NUMBER_ID>/messages" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "60123456789",
    "type": "document",
    "document": {
      "link": "https://example.com/manual.pdf",
      "filename": "manual.pdf"
    }
  }'
```

### Response Example

```json
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "60123456789",
      "wa_id": "60123456789"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBg..."
    }
  ]
}
```

### Common API Errors

- Invalid access token
- Wrong phone number ID
- Template not approved
- Recipient not allowed in test mode
- Invalid JSON payload
- Missing permissions

### Key Takeaways

- Message sending is straightforward once the account and credentials are ready
- Correct endpoint, token, and payload structure are essential
- API testing should begin with simple text messages before moving to media and templates

---

## Module 5: Message Template Management

### 5.1 What is a Template Message?

Template messages are pre-approved message formats used to initiate conversations or send structured outbound communication outside the customer service window, subject to platform rules.

#### Purpose of Template

- Start business-initiated conversations
- Send proactive alerts and reminders
- Support marketing, utility, and authentication scenarios

#### Template Categories

##### Marketing

Used for:

- Promotions
- Product recommendations
- Campaign messages

##### Utility

Used for:

- Order confirmations
- Billing updates
- Delivery notifications

##### Authentication

Used for:

- OTPs
- Login verification
- Security confirmation flows

### 5.2 Creating Template

Templates can contain several components.

#### Header

May include:

- Text
- Image
- Video
- Document

#### Body

- Main message content
- Supports placeholders such as customer name or order number

Example:

```text
Hello {{1}}, your order {{2}} has been shipped.
```

#### Footer

- Optional supporting line
- Often used for disclaimers or short notes

#### Buttons

Supported button types may include:

- URL
- Call
- Quick Reply

Example structure:

- Call to action button for website visit
- Phone button for customer support
- Quick reply button for response capture

### 5.3 Template Approval Process

#### Submission Guidelines

- Use clear and accurate wording
- Match the selected category correctly
- Ensure variables are meaningful and not excessive
- Avoid vague or misleading content
- Align content with the business use case and user opt-in

#### Common Rejection Reasons

- Promotional content categorized incorrectly
- Missing variable context
- Policy-violating content
- Overly generic text
- Grammar or formatting issues
- Mismatch between template type and actual intent

#### Editing and Resubmitting

- Review rejection reason carefully
- Update wording or category
- Remove policy-sensitive phrasing
- Resubmit after correction

### Sample Utility Template

```json
{
  "name": "order_update_notice",
  "category": "UTILITY",
  "language": "en_US",
  "components": [
    {
      "type": "BODY",
      "text": "Hello {{1}}, your order {{2}} is now ready for delivery."
    },
    {
      "type": "FOOTER",
      "text": "Thank you for choosing us."
    }
  ]
}
```

### Key Takeaways

- Templates are mandatory for many outbound business-initiated messages
- Good template design improves approval success and customer experience
- Category accuracy and policy compliance matter

---

## Module 6: Live Demo (Hands-On)

### Demo Objective

Show an end-to-end flow from account setup to message delivery and webhook handling.

### Demo Flow

#### 1. Create WABA

- Open Meta Business Manager
- Create or select WhatsApp Business Account
- Confirm assigned assets

#### 2. Generate Token

- Create system user
- Assign app and WhatsApp assets
- Generate access token
- Save token securely

#### 3. Create Template

- Create a basic utility template
- Submit for approval or review an existing approved sample

#### 4. Send API Request

- Use `curl`, Postman, or backend code
- Send a text or template message
- Observe API response

#### 5. Receive Webhook Callback

- Configure webhook callback URL
- Verify webhook token
- Receive delivery and incoming message events

#### 6. Handle Reply in Backend

- Parse webhook payload
- Extract sender number and message content
- Trigger internal business logic such as CRM logging or ticket creation

### Sample Webhook Event

```json
{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WABA_ID",
      "changes": [
        {
          "field": "messages",
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "60123456789",
              "phone_number_id": "PHONE_NUMBER_ID"
            },
            "contacts": [
              {
                "profile": {
                  "name": "John"
                },
                "wa_id": "60111111111"
              }
            ],
            "messages": [
              {
                "from": "60111111111",
                "id": "wamid.xxx",
                "timestamp": "1710000000",
                "text": {
                  "body": "Hi, I need help"
                },
                "type": "text"
              }
            ]
          }
        }
      ]
    }
  ]
}
```

### Backend Handling Example

Pseudo flow:

1. Receive webhook HTTP POST
2. Validate source and request structure
3. Read message payload
4. Store event in log or database
5. Trigger reply logic or agent handoff
6. Return HTTP 200 response

### Hands-On Checklist

- WABA available
- Phone number verified
- System user created
- Token generated
- Test recipient ready
- Webhook endpoint accessible
- Sample payloads prepared

### Key Takeaways

- The live demo connects business setup with technical integration
- Webhooks are essential for two-way messaging
- A successful demo proves readiness for pilot or production rollout

---

## Best Practices

- Obtain clear customer opt-in before sending messages
- Use the right template category for each use case
- Protect tokens and application secrets
- Monitor number quality and delivery performance
- Start with a small pilot before scaling
- Log message requests and webhook responses for troubleshooting
- Build fallback procedures for token expiry or webhook downtime

## Common Risks and Challenges

- Delays in business verification
- Incorrect system user permission setup
- Rejected templates due to poor wording or wrong category
- Token mismanagement or expired credentials
- Webhook misconfiguration
- Low quality rating caused by poor messaging practices

## Trainer Notes

- Keep Module 1 business-friendly for non-technical attendees
- Use screenshots during Modules 2 and 3
- Demonstrate one successful API call before showing errors
- Prepare approved templates in advance for a smooth live demo
- Use real business examples relevant to the audience
- Reserve time for Q&A around verification and template approval

## Practical Exercises

### Exercise 1: Identify the Correct Use Case

Ask participants to classify the following into customer support, marketing, utility, authentication, or commerce:

- Payment reminder
- OTP login code
- Flash sale promotion
- Delivery status update
- Product recommendation with checkout link

### Exercise 2: Build a Sample Message Payload

Participants create a JSON payload for:

- One text message
- One image message
- One utility template message

### Exercise 3: Webhook Interpretation

Participants review a webhook sample and identify:

- Sender phone number
- Message type
- Message body
- Phone number ID

## Assessment Questions

1. What is the difference between Business ID and WABA ID?
2. Why are system users important in production integration?
3. When should a template message be used?
4. What are three common reasons a template may be rejected?
5. What is the purpose of a webhook in WhatsApp API integration?
6. What risks can arise from a low phone number quality rating?

## Conclusion

WhatsApp Business Messaging with WABA and API integration allows businesses to deliver scalable, secure, and real-time customer communication. Success depends on proper account setup, secure credential handling, policy-compliant template design, and reliable backend integration. With the right setup and operational discipline, WhatsApp can become a powerful customer engagement channel.

## Optional Next Step

This material can be converted into:

- A slide deck
- A participant handbook
- A trainer script
- A step-by-step technical implementation guide
- A bilingual English and Bahasa Malaysia version
