Guides

How to Integrate SAP with WhatsApp API (Ominiflow Guide 2026)

Published on
Updated on
24 min read
By Kapil Nagar
SAP ERP integrated with WhatsApp Business API through Ominiflow

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 systemIntegration optionsTypical customer profile
S/4HANAOData, SAP Event Mesh, CPI iFlowsCloud-native enterprises, greenfield
SAP ECCRFC/BAPI, IDoc, PI/PO or CPIManufacturing, distribution, legacy
Business OneService Layer REST APISMBs on SAP B1
C4C / Service CloudOData + ticket triggersService-led B2B
  1. SAP event — e.g. delivery document created (LIKP), billing document posted (VF01), PO released
  2. Integration middleware — SAP CPI, SAP PI/PO, or custom ABAP proxy extracts customer phone, order ID, status
  3. HTTP POST to Ominiflow webhook or Cloud API endpoint with template name + variables
  4. Ominiflow — validates template, formats E.164 phone, sends message, stores conversation
  5. 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 caseSAP triggerTemplate categorySample copy
Order & delivery updatesOutbound delivery (VL01N)Utility (₹0.115)"Order {{1}} shipped. Track: {{2}}"
Invoice & payment remindersFI billing due dateUtility"Invoice {{1}} for ₹{{2}} due {{3}}"
PO / PR approvalsWorkflow item pendingUtilityInteractive Approve / Reject buttons
Stock alertsMM reorder pointUtility"SKU {{1}} below minimum stock"
Service notificationsCS ticket openedUtility"Case {{1}} registered. ETA: {{2}}"
Promotional campaignsManual segment exportMarketing (₹0.86)Requires documented opt-in

Integration methods compared

MethodBest forProsCons
SAP CPIS/4HANA enterpriseRetries, mapping, security, monitoringCPI licensing, specialist skills
OData / RESTS/4HANA, B1 Service LayerStandard APIs, event extensionsPolling latency if not event-driven
IDoc / RFCECC legacyMature, well-understood in manufacturingXML parsing, older patterns
Make / iPaaSB1 SMB, quick POCFast setup, visual flowsLatency, 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

  1. Create an Ominiflow account and connect your WhatsApp Business number
  2. Complete Meta business verification — phone status must show CONNECTED
  3. Create and get approval for utility templates (order update, invoice, OTP) in Ominiflow
  4. 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 variableSAP sourceValidation
Customer mobileKNA1-TELF1 or ship-to contactE.164: 919876543210
Order numberVBELNStrip leading zeros if needed
Delivery dateEDATUFormat DD MMM YYYY for readability
Tracking URLCarrier integration or Z-tableHTTPS only; test deep links
Invoice amountFI document totalLocale formatting (₹1,23,456.00)

Step 3: Build the integration flow in CPI (example)

  1. Create iFlow with HTTPS sender or SAP RM adapter triggered on delivery creation
  2. Groovy script or Message Mapping: SAP XML/JSON → Ominiflow payload
  3. HTTP receiver POST to Ominiflow message API or your middleware endpoint
  4. Add error handling: log failed numbers, retry queue, alert SAP basis team
  5. Idempotency key on VBELN + event type to prevent duplicate sends on CPI retry

Step 4: Configure Ominiflow webhook (two-way)

  1. Set inbound webhook URL in Ominiflow dashboard
  2. When customer replies "Track order" or "Speak to agent", route to chatbot or human inbox
  3. 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

  1. Meta verification complete — Business Manager, display name, CONNECTED number
  2. Templates approved — one per SAP trigger; utility for transactional
  3. Phone normalization — ABAP/CPI layer converts local to E.164
  4. CPI error queue — failed sends logged with SAP doc number
  5. Webhook signature verification — HMAC-SHA256 on inbound
  6. Authorization in SAP — restrict who can trigger outbound WhatsApp
  7. Load test — month-end billing batch + peak shipment window
  8. 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

MistakeImpactFix
Consumer WhatsApp at SAP scaleAccount ban, no APICloud API via BSP only
Local phone without country codeSilent send failuresNormalize E.164 in CPI
Template variable mismatchError #132000Match {{1}}/{{2}} order to approval
No CPI fallbackMessages drop at month-end batchDead-letter queue + alert
Marketing template for delivery alertHigher cost, block riskUtility category for transactional
Slow webhook endpointDuplicate inbound processingReturn 200 fast; queue SAP write-back

More pitfalls: 5 common WhatsApp API mistakes

Troubleshooting production issues

SymptomLikely causeFix
CPI succeeds; no WhatsApp deliveryInvalid token or PENDING numberRefresh token; verify CONNECTED status
Some customers never receiveBad phone in KNA1 masterValidation report; quarantine invalid numbers
Duplicate messages on retryNo idempotency on CPIDedup on VBELN + event type
Customer reply not in SAPInbound webhook not wired to CPIConfigure Ominiflow → CPI write-back iFlow
Template rejected at scalePromotional language in utilityRecategorize 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.

Need help? Chat with AI