# How to add WhatsApp to Sage X3

> Source: https://netray.co/integrations/sage-x3-whatsapp
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Sage X3 has no native WhatsApp channel, so you add one with a small middleware service. It listens for X3 events (a shipped delivery, an approval request), sends a WhatsApp Business Platform template message, and writes replies back through X3 REST or SOAP web services. Keep the middleware inside your network and let only Meta's webhook reach it.

## System

Sage X3

## Capability

whatsapp

## Intro

Sage X3 is common in mid-market manufacturers and distributors that run it on-premises or in a hosted private cloud, often across several legal entities and countries. The users who need information fastest are rarely at an X3 screen: a sales rep at a customer site, a buyer chasing a supplier, a plant manager away from the desk. In many markets those people already live in WhatsApp.

The usual request is small and specific: tell the customer when the delivery ships, let a manager approve a purchase request from a phone, let a supplier confirm a date by replying. None of this needs a new X3 module. It needs a reliable bridge between X3 events and the WhatsApp Business Platform.

This page covers the bridge: where X3 exposes events and data, how the WhatsApp side works (templates, opt-in, the 24-hour window), and where the build goes wrong.

## Use Cases

### Shipment and delivery notices to customers

**Description:** When a delivery (SDELIVERY) is validated, send the customer contact a template with the delivery number, carrier and tracking link. The ship-to contact comes from the customer record (BPCUSTOMER and its contacts).

### Purchase request approvals from a phone

**Description:** Send the approver a short summary of a purchase request and two quick-reply buttons. The reply calls an X3 web service that records the decision, subject to your approval workflow rules.

### Supplier date confirmation

**Description:** After a purchase order (PORDER) is released, send the supplier contact a template asking for a confirmed ship date. A date reply is parsed, shown to the buyer for review, then written to the order line.

### Order status on request

**Description:** A known customer contact messages the order number and gets status, quantities shipped and expected date, read from the sales order tables through a read-only service.

### Overdue invoice reminders

**Description:** Finance triggers a template reminder for open items past due, with a payment link. Replies such as a promised payment date are logged to the customer account for the collector.

## System Surface

X3 web services: SOAP via the Syracuse web services pool (the CAdxWebServiceXmlCC class with run, read, query, save and modify methods) and REST/SData endpoints exposed by Syracuse. Exact paths and the publishing screens vary by X3 version.

Event hooks: X3 workflow rules and alert/notification functions can fire on object events, and a 4GL (L4G) subprogram can call an external HTTP endpoint or write to a staging table that your middleware polls.

Database: X3 runs on SQL Server or Oracle. Tables such as SORDER, SDELIVERY, PORDER, BPCUSTOMER and BPSUPPLIER are readable, but treat direct reads as a fallback and prefer services so X3 business rules apply.

Import/export templates: batch files dropped to a folder let you push low-volume updates in without writing code, useful for supplier replies reviewed offline.

Auth: a dedicated X3 service user with a limited function profile, or an OAuth/token setup on newer Syracuse versions. Never reuse a named person's login.

## How It Works

### Set up the WhatsApp Business Platform

**Detail:** Create a Meta business account, register a number, and choose Cloud API directly or a Business Solution Provider. Submit message templates for approval (shipment notice, approval request, reminder).

### Capture opt-in and map contacts

**Detail:** Store a mobile number in E.164 format and an opt-in flag on the X3 contact or a custom table. Without recorded consent you cannot message business-initiated.

### Emit events from X3

**Detail:** Use a workflow rule or a small L4G subprogram on delivery validation to post the document number to your middleware, or to write a row to a staging table that the middleware polls every minute.

### Build the middleware

**Detail:** A small service (Node, Python or .NET) reads the document through X3 web services, fills template variables, and calls the Cloud API. It stores the WhatsApp message ID against the X3 document.

### Receive replies on a webhook

**Detail:** Expose one HTTPS endpoint for Meta's webhook. Verify the signature, match the sender to a known contact, and ignore anything unmatched.

### Write back with review

**Detail:** Button replies for approvals can post directly. Free-text replies (dates, quantities) go to a review queue before any X3 update.

## Example Flows

### Delivery shipped notice

**Trigger:** A sales delivery is validated in X3.

**Steps:**

- Workflow rule or L4G subprogram posts the delivery number to the middleware.
- Middleware reads the delivery header and ship-to contact via a read-only web service.
- It checks the opt-in flag and sends the approved shipment template.
- Delivery status updates from Meta (sent, delivered, read) are stored.

**Result:** The customer sees the delivery and carrier details within a minute, and the CSR sees the message status next to the document.

### Mobile purchase request approval

**Trigger:** A purchase request requires approval from a plant manager.

**Steps:**

- Middleware picks up the pending request from the workflow notification.
- It sends a template with requester, amount and two buttons.
- On Approve, the middleware calls the X3 service that records the decision under a service profile that is allowed only that action.
- A confirmation message is sent back with the request number.

**Result:** Approvals no longer wait for the manager to return to a desk, and the audit trail shows who tapped what and when.

## On Prem

A fully on-prem X3 still works with WhatsApp because only the middleware needs internet access, and only outbound to Meta plus one inbound webhook. Place the middleware in a DMZ, keep the X3 web services reachable from the DMZ only, and have the webhook handler store messages in a queue before anything touches X3. No ERP data needs to be sent to a third-party AI to do this. If you later add an AI step to interpret free-text replies, run an open-weight model locally so customer messages and order data stay inside your network.

## Security

- Use a dedicated X3 service account with a function profile limited to the few services the bridge calls, and a folder-level scope matching the legal entity.
- Verify the Meta webhook signature on every request and reject unknown senders.
- Never put pricing, bank details or full addresses in template variables unless the recipient is verified.
- Log every inbound and outbound message with the X3 document key for audit and GDPR requests.
- Honour opt-out keywords and flag them on the contact record.

## Options

### Use a BSP or no-code tool with a custom X3 call

**Fit:** Low volume notices and a team without developers.

**Effort:** Days to a couple of weeks, but two-way X3 write-back is usually still custom.

### Build the middleware in-house

**Fit:** Teams with an X3 developer who knows L4G and web service publishing.

**Effort:** Typically 3 to 8 weeks for notices plus approvals.

### Partner build such as Netray with an X3 partner

**Fit:** Two-way flows, AI interpretation of replies and on-prem constraints.

**Effort:** Scoped per flow; read-only notices first, write-back after review.

## Pitfalls

- Business-initiated messages need approved templates and consent; a free-form message outside the 24-hour window is rejected.
- Mobile numbers stored in X3 contact fields are often free-text; normalise to E.164 before sending.
- Writing replies straight into X3 order lines without review invites wrong dates from ambiguous text.
- Polling a table every few seconds can load a busy X3 database; poll gently or use workflow triggers.
- Folder and legal entity context matters: call the service in the right X3 folder or you will read the wrong company data.

## Faq

### Does Sage X3 have a built-in WhatsApp integration?

**Answer:** Not as a standard feature in the versions most manufacturers run. You connect through the WhatsApp Business Platform and a middleware service that talks to X3 web services. Some resellers and marketplace add-ons exist; check what your version and region support before building.

### Can we use a personal WhatsApp number?

**Answer:** No. Automated business messaging needs the WhatsApp Business Platform (Cloud API or a provider) with a registered business number. Using personal accounts or unofficial libraries risks the number being banned and gives you no audit trail.

### Can replies update X3 automatically?

**Answer:** Button replies such as approve or reject can, using a limited service account. Free-text replies like dates are better parsed, shown to a person, and then written. That keeps wrong data out of order lines.

### Does this work with on-premises Sage X3?

**Answer:** Yes. Only the small middleware needs internet access. Keep X3 itself behind your firewall, expose a single webhook endpoint, and have the middleware call X3 services internally.

### What does it cost to run?

**Answer:** Meta charges per conversation or per template message depending on category and country, so costs scale with volume. Add a small server for the middleware. Check Meta's current pricing for your countries, as it changes.

## Search terms

sage x3 whatsapp integration, whatsapp for sage x3, sage x3 whatsapp api, send whatsapp from sage x3, sage x3 order status whatsapp, sage x3 whatsapp approvals, whatsapp business api erp sage x3, sage x3 delivery notification whatsapp, sage x3 customer notifications

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
