How do I integrate SAP with WhatsApp API?
Connect SAP S/4HANA, ECC, or Business One to WhatsApp via Ominiflow. Send order updates, invoice alerts, and approval notifications automatically using CPI, OData, or webhooks. Connect SAP events (delivery, invoice, approval) to middleware such as SAP CPI or Make, which POSTs approved template messages to Ominiflow's WhatsApp Cloud API. Map customer phone numbers from SAP master data in E.164 format.
Last updated: 6 July 2026
SAP runs your orders, inventory, finance, and logistics. WhatsApp is where customers and field teams actually respond. Integrating SAP with the WhatsApp Cloud API through Ominiflow turns ERP events into instant, trackable messages — delivery updates, invoice alerts, approval requests, and support replies — without manual phone calls or email delays that sit unread for hours.
This guide is for SAP basis teams, integration architects, and ops leads planning a production rollout. We cover Cloud API architecture (the only supported path since on-premise was retired in October 2025), system-specific connectors, template strategy, and the failure modes that stall enterprise go-lives.
Too long? Start here
- SAP → middleware → Ominiflow → Cloud API is the standard architecture for enterprise WhatsApp messaging
- Works with SAP S/4HANA, SAP ECC, and SAP Business One — integration depth varies by landscape
- Trigger messages from SAP events: goods issue, invoice posted, PO approval, service ticket created
- Use SAP CPI, OData APIs, IDocs, or Make as the connector layer
- Business-initiated messages require approved Meta templates — utility ₹0.115, marketing ₹0.86 per conversation in India
- Customer replies arrive via webhooks; heavy processing must run async after HTTP 200
- Phone numbers must be E.164 (+919876543210). SAP master data often stores local format — normalize in middleware
Why integrate SAP with WhatsApp?
Email open rates for transactional alerts hover around 20–40%. WhatsApp utility messages routinely hit 90%+ read rates within an hour. For distribution and manufacturing teams, that gap translates directly into fewer "where is my order?" calls and faster approval cycles.
- Faster customer communication — shipment and delivery status straight from SAP TM / SD modules
- Reduced call-center load — proactive utility templates answer status before the customer calls
- Mobile-first approvals — managers approve POs or leave requests on WhatsApp with one tap
- Field service efficiency — technicians get work-order details and customer contact on WhatsApp
- Audit trail — message delivery status logged alongside SAP document numbers in Ominiflow
"SAP remains the system of record. WhatsApp is the notification layer. Don't try to make WhatsApp your ERP — route events out, replies back in, and keep document numbers on both sides."
Cloud API in 2026: what SAP teams need to know
Meta hosts WhatsApp Cloud API on its infrastructure. On-premise API clients were deprecated — unsupported for new integrations after October 23, 2025. All new SAP integrations should target Graph API endpoints via a BSP like Ominiflow or direct Cloud API with your own webhook infra.
Ominiflow sits on the messaging layer. SAP remains authoritative for orders, invoices, and inventory. Ominiflow handles templates, opt-in, inbox routing, and Cloud API compliance. Architecture reference: WhatsApp API integration guide.
Which SAP systems can connect?
| SAP system | Integration options | Typical customer profile |
|---|---|---|
| S/4HANA | OData, SAP Event Mesh, CPI iFlows | Cloud-native enterprises, greenfield |
| SAP ECC | RFC/BAPI, IDoc, PI/PO or CPI | Manufacturing, distribution, legacy |
| Business One | Service Layer REST API | SMBs on SAP B1 |
| C4C / Service Cloud | OData + ticket triggers | Service-led B2B |
Integration architecture (recommended)
- SAP event — e.g. delivery document created (LIKP), billing document posted (VF01), PO released
- Integration middleware — SAP CPI, SAP PI/PO, or custom ABAP proxy extracts customer phone, order ID, status
- HTTP POST to Ominiflow webhook or Cloud API endpoint with template name + variables
- Ominiflow — validates template, formats E.164 phone, sends message, stores conversation
- Customer reply — routed to Ominiflow inbox; optional write-back to SAP via OData or RFC
Outbound vs inbound pipes
- Outbound: SAP event → CPI → Ominiflow API →
POST graph.facebook.com/v21.0/{phone_number_id}/messages→ customer - Inbound: customer text → Meta webhook → Ominiflow → your HTTPS endpoint → SAP service request or CRM note
Return HTTP 200 on webhooks within ~5 seconds. Queue SAP write-backs asynchronously — Meta retries slow endpoints and duplicate processing breaks idempotency.
Top SAP + WhatsApp use cases
| Use case | SAP trigger | Template category | Sample copy |
|---|---|---|---|
| Order & delivery updates | Outbound delivery (VL01N) | Utility (₹0.115) | "Order {{1}} shipped. Track: {{2}}" |
| Invoice & payment reminders | FI billing due date | Utility | "Invoice {{1}} for ₹{{2}} due {{3}}" |
| PO / PR approvals | Workflow item pending | Utility | Interactive Approve / Reject buttons |
| Stock alerts | MM reorder point | Utility | "SKU {{1}} below minimum stock" |
| Service notifications | CS ticket opened | Utility | "Case {{1}} registered. ETA: {{2}}" |
| Promotional campaigns | Manual segment export | Marketing (₹0.86) | Requires documented opt-in |
Integration methods compared
| Method | Best for | Pros | Cons |
|---|---|---|---|
| SAP CPI | S/4HANA enterprise | Retries, mapping, security, monitoring | CPI licensing, specialist skills |
| OData / REST | S/4HANA, B1 Service Layer | Standard APIs, event extensions | Polling latency if not event-driven |
| IDoc / RFC | ECC legacy | Mature, well-understood in manufacturing | XML parsing, older patterns |
| Make / iPaaS | B1 SMB, quick POC | Fast setup, visual flows | Latency, per-task cost at scale |
1. SAP Integration Suite (CPI) — best for S/4HANA
Build an iFlow that listens to SAP events (via API, IDoc, or Event Mesh) and calls Ominiflow's REST API. CPI handles retries, mapping, and enterprise security. Recommended for teams already on Integration Suite.
2. OData / REST from S/4HANA or B1
Expose or consume OData services. A scheduled job or event-driven extension posts new sales orders to Ominiflow when status changes. B1 teams use Service Layer REST — popular path for mid-market distributors.
3. IDoc / RFC (ECC legacy)
Outbound IDoc (ORDERS, DESADV) parsed by middleware → transformed to JSON → WhatsApp template payload. Common in plants still on ECC with PI/PO landscapes.
4. Make or middleware hub
For teams without CPI, Make can poll SAP Service Layer (B1) or receive webhooks from a thin SAP proxy and forward to Ominiflow. Fine for POC; evaluate CPI before production scale.
The 24-hour rule for SAP triggers
Meta splits messages into two worlds:
- Session messages: Customer messaged you first → 24 hours to reply freely without a template
- Business-initiated: SAP fires outbound alert → must use approved template in correct category
Most SAP integrations are business-initiated (delivery shipped, invoice due). Design utility templates upfront — not free-form strings from ABAP. Template guide: WhatsApp template message API guide.
Step-by-step: SAP to Ominiflow WhatsApp
Step 1: Provision WhatsApp API on Ominiflow
- Create an Ominiflow account and connect your WhatsApp Business number
- Complete Meta business verification — phone status must show CONNECTED
- Create and get approval for utility templates (order update, invoice, OTP) in Ominiflow
- Note API credentials: Phone Number ID, access token, webhook verify token
Setup walkthrough: WhatsApp Business API setup
Step 2: Map SAP data fields
Define which SAP fields feed each template variable:
| Template variable | SAP source | Validation |
|---|---|---|
| Customer mobile | KNA1-TELF1 or ship-to contact | E.164: 919876543210 |
| Order number | VBELN | Strip leading zeros if needed |
| Delivery date | EDATU | Format DD MMM YYYY for readability |
| Tracking URL | Carrier integration or Z-table | HTTPS only; test deep links |
| Invoice amount | FI document total | Locale formatting (₹1,23,456.00) |
Step 3: Build the integration flow in CPI (example)
- Create iFlow with HTTPS sender or SAP RM adapter triggered on delivery creation
- Groovy script or Message Mapping: SAP XML/JSON → Ominiflow payload
- HTTP receiver POST to Ominiflow message API or your middleware endpoint
- Add error handling: log failed numbers, retry queue, alert SAP basis team
- Idempotency key on
VBELN+ event type to prevent duplicate sends on CPI retry
Step 4: Configure Ominiflow webhook (two-way)
- Set inbound webhook URL in Ominiflow dashboard
- When customer replies "Track order" or "Speak to agent", route to chatbot or human inbox
- Optional: Ominiflow outbound webhook → CPI → update SAP service request or CRM note
Webhook deep dive: webhook integration guide
Step 5: Test in SAP QA before production
- Use test customer master with your own WhatsApp number
- Verify template variable order matches Meta approval exactly
- Load-test CPI for peak dispatch windows (e.g. 5 PM shipment batch)
- Test wrong phone formats in QA — they fail silently in production
Sample API payload (conceptual)
Middleware sends JSON to Ominiflow / WhatsApp Cloud API:
POST https://graph.facebook.com/v21.0/{PHONE_NUMBER_ID}/messages
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"messaging_product": "whatsapp",
"to": "919876543210",
"type": "template",
"template": {
"name": "order_shipped_update",
"language": { "code": "en" },
"components": [{
"type": "body",
"parameters": [
{ "type": "text", "text": "4500012345" },
{ "type": "text", "text": "18 Jul 2026" },
{ "type": "text", "text": "https://track.example/88421" }
]
}]
}
}Template names and parameter count must match approved templates exactly. Error #132000 = variable count mismatch.
Enterprise integration checklist
- Meta verification complete — Business Manager, display name, CONNECTED number
- Templates approved — one per SAP trigger; utility for transactional
- Phone normalization — ABAP/CPI layer converts local to E.164
- CPI error queue — failed sends logged with SAP doc number
- Webhook signature verification — HMAC-SHA256 on inbound
- Authorization in SAP — restrict who can trigger outbound WhatsApp
- Load test — month-end billing batch + peak shipment window
- Runbook — basis team knows how to pause integration during incidents
Enterprise compliance notes
- GDPR / DPDP — store only necessary phone numbers; document lawful basis for messaging
- Opt-in — marketing broadcasts need explicit consent; transactional utility messages have different rules
- SAP authorization — restrict which users can trigger outbound WhatsApp from SAP transactions
- No sensitive data in templates — avoid full credit card numbers or passwords in message body
- Audit — log SAP document number + WhatsApp message ID for reconciliation
- PII in logs — redact phone numbers in CPI and application logs
Cost model for SAP WhatsApp volume
Total cost = BSP platform fee + Meta per-conversation charges + CPI/middleware + template maintenance.
India ballpark: utility ₹0.115/conversation, marketing ₹0.86/conversation. A distributor sending 20,000 delivery updates/month pays ~₹2,300 in Meta utility fees alone — before BSP platform cost. Full breakdown: WhatsApp API pricing guide.
Common mistakes to avoid
| Mistake | Impact | Fix |
|---|---|---|
| Consumer WhatsApp at SAP scale | Account ban, no API | Cloud API via BSP only |
| Local phone without country code | Silent send failures | Normalize E.164 in CPI |
| Template variable mismatch | Error #132000 | Match {{1}}/{{2}} order to approval |
| No CPI fallback | Messages drop at month-end batch | Dead-letter queue + alert |
| Marketing template for delivery alert | Higher cost, block risk | Utility category for transactional |
| Slow webhook endpoint | Duplicate inbound processing | Return 200 fast; queue SAP write-back |
More pitfalls: 5 common WhatsApp API mistakes
Troubleshooting production issues
| Symptom | Likely cause | Fix |
|---|---|---|
| CPI succeeds; no WhatsApp delivery | Invalid token or PENDING number | Refresh token; verify CONNECTED status |
| Some customers never receive | Bad phone in KNA1 master | Validation report; quarantine invalid numbers |
| Duplicate messages on retry | No idempotency on CPI | Dedup on VBELN + event type |
| Customer reply not in SAP | Inbound webhook not wired to CPI | Configure Ominiflow → CPI write-back iFlow |
| Template rejected at scale | Promotional language in utility | Recategorize or rewrite copy |
Get SAP + WhatsApp running on Ominiflow
Ominiflow provides WhatsApp Cloud API access, template management, team inbox, chatbots, and webhooks — the messaging layer your SAP integration needs. Our team helps map SD/FI/MM events to compliant templates.
Book Enterprise Integration Call →
Related: Zoho CRM integration · OTP on WhatsApp · automation platform
FAQ
Can SAP send WhatsApp messages automatically? expand_more
Yes. When a SAP event (delivery, invoice, approval) triggers middleware that calls Ominiflow's WhatsApp Cloud API with an approved template, messages send without manual action.
What is the best way to integrate SAP S/4HANA with WhatsApp? expand_more
SAP Cloud Platform Integration (CPI) or SAP Event Mesh connected to Ominiflow webhooks is the most scalable approach for S/4HANA cloud deployments.
Does SAP Business One support WhatsApp integration? expand_more
SAP B1 does not include WhatsApp natively, but its Service Layer REST API can connect to Ominiflow via Make, custom add-ons, or middleware when orders or invoices change.
Do SAP WhatsApp messages need templates? expand_more
For business-initiated messages outside the 24-hour customer service window, yes — Meta requires pre-approved utility or marketing templates via Cloud API.
Can customers reply on WhatsApp and update SAP? expand_more
Yes, with two-way setup: Ominiflow receives replies via webhook and your integration writes notes or service requests back to SAP through OData, BAPI, or CPI.
How much do SAP-triggered WhatsApp messages cost in India? expand_more
Meta charges per conversation: utility templates ₹0.115, marketing ₹0.86. A 10,000 delivery-update month costs ~₹1,150 in Meta utility fees plus BSP platform and CPI costs.
Is on-premise WhatsApp API still supported for SAP? expand_more
No. On-premise was deprecated in October 2025. All new SAP integrations must use Cloud API. Updated July 2026. SAP + WhatsApp Cloud API integration guide for enterprise teams. Meta India rates: utility ₹0.115, marketing ₹0.86 per conversation.