How to add WhatsApp to SAP Business One
Short answer
Connect the WhatsApp Business Platform (Cloud API or a BSP) to SAP Business One through the Service Layer. Outbound messages are triggered by document changes or scheduled queries, and inbound replies are written back as drafts, activities or UDF updates after validation.
Most SAP Business One customers are small and mid-size manufacturers and distributors where customers, suppliers and drivers already live on WhatsApp. Order status questions, delivery slot confirmations and quotation follow-ups happen in chats on someone's phone, and nothing from those chats lands on the Sales Order or Purchase Order in B1.
Business One does not ship a native WhatsApp channel. What it does give you is a clean enough API surface, the Service Layer for reads and writes plus SQL or HANA for event detection, that a thin middleware can send templated messages out and turn replies into controlled transactions.
This page walks through the realistic path: what to trigger on, how to handle templates and opt-in, how to map a reply back to a document, and where an on-prem B1 server changes the design.
What teams use it for
Delivery notification on posting
When a Delivery (ODLN) is posted for a customer contact flagged for WhatsApp, send a template with delivery number, item summary and carrier reference.
Order acknowledgement
After a Sales Order moves from draft to open, send the customer a confirmation with promised ship date taken from the row-level ship date.
Supplier PO confirmation
Send open Purchase Order lines due within a window to the supplier contact and capture a Confirm or Reschedule reply into a UDF on the PO row.
Payment reminders
Query overdue A/R Invoices per Business Partner and send a reminder template with the invoice number and balance due, respecting a per-customer cadence.
Internal approval nudges
Notify a manager on WhatsApp that a document is waiting in the Approval Procedure queue, with a link or a short reply code to approve through a controlled endpoint.
Field service updates
For service calls, message the customer when a technician is assigned or a Service Call status changes.
SAP Business One integration surface
- Service Layer (REST/OData over HTTPS, commonly port 50000 under /b1s/v1, newer builds also expose a v2 path): login with a company database, user and password, then use the B1SESSION cookie for reads and writes on Orders, DeliveryNotes, Invoices, BusinessPartners and Drafts.
- Business Partner contact data in OCRD and OCPR (contact persons) holds phone and mobile fields; add a user-defined field such as U_WA_OptIn and U_WA_Number rather than overloading the existing phone columns.
- Event detection: poll the Service Layer with a filter on UpdateDate and UpdateTime, or on SQL Server and HANA editions use the SBO_SP_TransactionNotification stored procedure for validation and a scheduled query for new documents. Direct triggers on system tables are not supported.
- B1if (the Business One Integration Framework, where installed) can host scenario packages that call outbound HTTP, which some partners use instead of an external service.
- User-defined tables and fields (UDT, UDF with the U_ prefix) to store message IDs, delivery status and opt-in evidence next to the document.
How it works
- 1
Set up the WhatsApp Business Platform account
Create a Meta business account, register a number (not already used on the consumer app) with the Cloud API or pick a Business Solution Provider. Submit message templates for Meta approval.
- 2
Add opt-in and number fields in B1
Create UDFs on Business Partners and contact persons for opt-in status, opt-in date and source. Store the number in E.164 format so matching inbound messages is a simple lookup.
- 3
Build a small middleware service
A service on the same network as B1 logs into the Service Layer with a dedicated integration user, detects events, and calls the WhatsApp send endpoint with the approved template and parameters.
- 4
Detect events safely
Poll for documents changed since the last high-water mark, then compare against a UDT of already-sent messages so a re-edited document does not send twice.
- 5
Receive replies on a webhook
Expose an HTTPS webhook that verifies Meta's signature, maps the sender number to a Business Partner and the conversation to a document via a stored message ID.
- 6
Write back with guard rails
Low-risk replies update a UDF or add an Activity. Anything that changes quantities, prices or dates becomes a Draft document for a user to review in B1.
- 7
Log and monitor
Record template name, status callbacks (sent, delivered, read, failed) and the B1 document key in the UDT so support can answer 'did the customer get it'.
Example flows
Shipment alert with slot confirmation
Trigger: A Delivery note is added for a customer with U_WA_OptIn set to Y.
- Middleware picks up the new DeliveryNotes entry via the change poll.
- It fills the shipment template: customer name, delivery number, expected arrival.
- Customer replies 'Tomorrow morning works'.
- Webhook matches the number to the Business Partner and the open conversation to the Delivery.
- An Activity is added against the Delivery with the reply text for the dispatcher.
Result: Dispatch sees the customer's slot preference on the document without phoning anyone.
Supplier confirmation loop
Trigger: A nightly job finds Purchase Order rows with a ship date in the next five days and no confirmation flag.
- Group rows by supplier contact so one message covers the PO.
- Send a template with PO number and two quick-reply buttons: Confirm, Reschedule.
- On Confirm, set the row UDF U_SupConfirmed to Y through a PATCH on the PurchaseOrders entity.
- On Reschedule, create an Activity for the buyer and do not edit the date automatically.
Result: Buyers review only the exceptions instead of chasing every supplier.
Keeping data on-prem
WhatsApp is cloud-only, so an on-prem Business One server does not mean 'no cloud', it means choosing what leaves the building. Keep the Service Layer inside your network and run the middleware in the same segment. Only outbound HTTPS to the WhatsApp API and an inbound webhook endpoint need exposure, ideally through a reverse proxy in a DMZ that forwards only the webhook path. Message bodies should carry minimal data: a document number and a status, not full line detail or prices, because everything sent is processed by Meta and your BSP. If you want natural-language understanding of free-text replies, run the classification step on a local open-weight model so the reply text is interpreted inside your network, then pass only the structured result to B1.
Security checklist
- Use a dedicated B1 integration user with a restricted authorization set, not a superuser; scope it to the document types the flow touches.
- Store the Service Layer credentials and WhatsApp access token in a secret store, not in scripts or UDFs.
- Verify the webhook signature on every inbound call and reject unmatched sender numbers instead of creating new Business Partners.
- Treat opt-in as evidence: keep timestamp and source in B1 so you can answer a consent audit.
- Never send prices, bank details or credentials in a template body.
Ways to get it done
Marketplace or partner add-on for B1 messaging
Effort: Days to a couple of weeks including template approval; licence per user or per message.
Fits standard notifications from sales and delivery documents where you want a supported product and few custom rules.
In-house middleware on the Service Layer
Effort: Two to six weeks for outbound alerts plus replies, then ongoing template upkeep.
Fits teams with a developer comfortable with REST and webhooks and a clear small set of flows.
Partner build with AI reply handling (Netray and a B1 partner)
Effort: Typically a scoped project of several weeks; human approval remains on any write that changes order data.
Fits when free-text replies must be understood and routed, or when classification has to run on a private model.
Pitfalls
- !Sending outside the 24-hour customer service window with free text: the API rejects it, so anything proactive needs an approved template.
- !Polling by UpdateDate alone can resend on trivial edits; keep a sent-log keyed by document and template.
- !Service Layer sessions time out; reuse a session and re-login on 401 instead of logging in per message.
- !Phone numbers stored with spaces and local prefixes make reply matching fail; normalize once at capture.
- !Auto-editing Sales Order dates from a chat reply bypasses your approval procedure; create a Draft instead.
Frequently asked questions
Does SAP Business One have native WhatsApp support?
Not as a built-in channel in the versions most customers run. You add it with a middleware that talks to the Service Layer and the WhatsApp Business Platform, or with a third-party add-on. Check your exact version and any bundled messaging features before building.
Do I need the WhatsApp Business app or the API?
For system-triggered messages tied to documents you need the Business Platform (Cloud API or a BSP). The phone-based Business app cannot be driven reliably from B1 and has limits on automation.
Can customers approve or change orders through WhatsApp?
They can send a reply, but a safe design turns it into an Activity or a Draft for review. Direct edits to open orders from chat text are risky, especially if pricing or credit checks apply.
Does it work with B1 on HANA and on SQL Server?
Yes if you stay on the Service Layer, which both editions expose. Anything using direct SQL for event detection must be written per database dialect and should be read-only.
What does it cost?
Expect per-conversation or per-message fees from Meta and your BSP, which vary by country and category, plus your development or add-on licence. Utility messages like delivery alerts are generally cheaper than marketing ones.
Want WhatsApp working on your SAP Business One?
A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.
Get a free assessment