SAP Business One and Twilio integration
SAP Business One manages procurement, finance, and inventory for small-to-midsize operations. Twilio sends time-sensitive notifications via SMS and voice. Together, they keep your team informed the moment a supplier invoice arrives, a payment is due, or critical inventory runs low. ml-connector monitors SAP Business One for these events and notifies your team through Twilio without re-keying or manual escalation.
What moves between them
Monitoring flows from SAP Business One into Twilio. ml-connector polls SAP Business One on a scheduled cadence for newly created or updated invoices, purchase orders, overdue payments, and low inventory items. When these events are detected, ml-connector triggers SMS or voice notifications through Twilio to notify procurement, finance, and operations teams. The flow is one-directional: notifications originate in SAP Business One and are delivered through Twilio. Message status callbacks (delivery confirmation, failure, read receipts) flow back into SAP Business One as optional audit events, but no business data flows from Twilio back into SAP Business One.
How ml-connector handles it
ml-connector stores the SAP Business One Service Layer URL (unique per customer), Account SID, Auth Token, and target phone numbers encrypted. It maintains the B1SESSION token across requests and refreshes the session when a -5002 timeout error occurs, avoiding the cold-start latency of re-authenticating on every call. It polls SAP Business One via OData queries with UpdateDate filters to find new and modified invoices, purchase orders, and items since the last poll run, avoiding duplicate processing. When a threshold is crossed (invoice received, payment overdue by N days, stock below reorder point), ml-connector formats a notification message, looks up the appropriate phone numbers from a configuration table, and posts to Twilio's REST API with the message text and recipient list. For SMS delivery, it uses the core Messaging API; for voice alerts, it invokes the Voice API. Twilio returns a message SID for each notification; ml-connector logs the SID and message status for audit. Webhook signatures are validated using HMAC-SHA1 on callback delivery, and failure notifications (undelivered, failed) are logged as delivery exceptions. The integration handles SAP Business One's lack of guaranteed idempotency by checking for duplicate invoices via DocNum + InvoiceDate before processing.
A real-world example
A mid-sized distribution company uses SAP Business One for procurement and inventory. Their purchasing team is spread across three regional warehouses and often misses email notifications about supplier invoices and inventory reorder points. Before the integration, accounts payable struggled with late invoice processing and receiving teams did not know when to reorder until stock alerts surfaced in month-end reports. With SAP Business One connected to Twilio, the moment a purchase invoice arrives, the AP team gets an SMS alert; when inventory for a top SKU falls below the reorder point, a voice call notifies the warehouse manager. The team now processes invoices faster and prevents stockouts.
What you can do
- Send SMS alerts when purchase invoices arrive in SAP Business One with supplier name and total amount.
- Notify teams by voice call when a customer payment is overdue by N days, with the amount and due date.
- Trigger reorder point alerts to warehouse staff when inventory quantities drop below configured thresholds.
- Store and refresh the SAP Business One session token, and handle OData polling with UpdateDate filters to avoid duplicate notifications.
- Log all SMS and voice delivery confirmations, failures, and read receipts as audit events in SAP Business One.
Questions
- What business events in SAP Business One trigger notifications to Twilio?
- ml-connector monitors purchase invoices, sales invoices, customer payments, and inventory levels in SAP Business One. Triggers are configurable thresholds such as new invoice receipt, payment overdue by N days, or inventory below reorder point. When a condition is met, ml-connector sends an SMS or voice notification to the designated team member or queue.
- How does ml-connector handle SAP Business One's session token, which expires after 30 minutes of inactivity?
- ml-connector reuses the session token across multiple API calls to minimize authentication overhead. When a -5002 timeout error is returned, indicating the token has expired, ml-connector automatically refreshes the session by posting to /Login again and storing the new B1SESSION cookie. No manual re-authentication is required.
- Does the integration support Twilio's EU data residency option?
- Yes. ml-connector can be configured to use Twilio's dublin.ie1 regional endpoints for EU data residency compliance. This ensures message delivery occurs within the EU and audit logs are stored in EU data centers when required by local regulation.
Related integrations
More SAP Business One integrations
Other systems that connect to Twilio
Connect SAP Business One and Twilio
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started