Skip to content

dussa-vinay17/Whatsapp-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Whatsapp-API

Integrate WhatsApp with Salesforce so that every incoming customer message automatically creates a Case record in Salesforce.

This project uses:

  1. Meta WhatsApp Cloud API (Webhook)
  2. Salesforce Apex REST API endpoint
  3. JSON message parsing to capture phone number & message text
  4. Automatic Case creation in Salesforce

🧩 Architecture Flow

Customer WhatsApp Message
    ↓
Meta WhatsApp Webhook
    ↓
Salesforce Apex REST API
    ↓
Parse Message (number, text)
    ↓
Create Case Record in Salesforce

🚀 Features

✔ Automatically creates a Case when a WhatsApp message is received
✔ Stores sender WhatsApp phone number in Salesforce
✔ Saves message text inside the Case Description
✔ Helps support teams reply faster and never miss a message
✔ Can be extended for Auto Replies / Routing / Chatbots

📌 Prerequisites

Before starting, ensure you have:

1.Requirement	Description
2. Salesforce Org	Developer / Sandbox / Production
3. WhatsApp Business Cloud API	Meta Developer account
4. Webhook URL	Public endpoint URL (Site / Experience Cloud / Heroku / Ngrok, etc.)
5. Permissions	API Enabled, Modify All Data, Case Create access

🛠 Implementation Overview

1️⃣ Setup WhatsApp Cloud API
    Create/Configure a Meta Developer Account
    Get a WhatsApp Business Phone Number
    Obtain Access Token and Phone Number ID

 2️⃣ Create a Salesforce REST Endpoint
    Create an Apex REST API to receive webhook calls
    Parse WhatsApp message JSON and extract details
    Insert a new Case record in Salesforce

3️⃣ Configure Webhook in Meta Developer Console
    Add Salesforce REST API endpoint as Webhook URL
    Verify Webhook Token
    Subscribe to messages events

4️⃣ Test the Integration
    Send a WhatsApp message to the registered number
    Check Salesforce → Cases for new records  

🧪 Testing Options

You can test using:
🔹 Real WhatsApp message from your registered number
🔹 Postman / cURL JSON message payload
🔹 Meta Webhook testing tool      

📚 Possible Enhancements

You can improve this project with:
✨ Auto Reply using WhatsApp API
✨ Case Assignment Rules / Queues
✨ Lead / Contact creation from WhatsApp
✨ Omni-Channel Routing for support agents
✨ Store chat history for conversation tracking
✨ Integrate with Einstein/AI for message classification

🤝 Contributing

Contributions are welcome! Feel free to submit issues, feature requests, and pull requests.

About

Integrate WhatsApp with Salesforce so that every incoming customer message automatically creates a Case record in Salesforce.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages