ml-connector
SAP Business OneSlack

SAP Business One and Slack integration

SAP Business One manages enterprise financials, purchasing, and inventory for small-to-midsize businesses. Slack is where your team communicates. Connecting the two brings critical business events directly into the conversations where decisions happen. When a new purchase order exceeds a threshold, when an invoice is due, or when inventory falls below reorder points, the right teams see the alert in Slack immediately, formatted and routed to the right channel, without manual forwarding or email delays.

How SAP Business One works

SAP Business One exposes business documents, financial records, and master data through OData v4 REST endpoints at a customer-provided Service Layer URL (https://<customer-server>:<port>/b1s/v2/). Authentication uses a session token issued via POST /Login that returns a B1SESSION cookie, or OAuth 2.0 / OIDC if the server is on version 10.0 FP 2305 or later with IAM configured. Key entities include BusinessPartners, Invoices, PurchaseInvoices, PurchaseOrders, JournalEntries, and ChartOfAccounts. Webhooks are supported in version 10.0 FP 2602+ with Webhook Messenger Service enabled; otherwise, polling with UpdateDate filters is the standard approach. Sessions expire after 30 minutes of inactivity.

How Slack works

Slack exposes users, conversations, messages, and files through the Slack Web API at https://slack.com/api/. Authentication is OAuth 2.0 Authorization Code flow, resulting in a non-expiring bot token (xoxb- prefix) passed via Authorization header. The Events API delivers workspace activity via HTTP POST callbacks to a registered HTTPS endpoint; all webhook events require HMAC-SHA256 signature verification with the X-Slack-Signature header and a timestamp check to ensure requests are no older than 5 minutes. Key entities include Users, Conversations, Messages, and Files. Rate limits apply per method (e.g., chat.postMessage is 1 per second per channel).

What moves between them

Messages flow from SAP Business One into Slack. When a new purchase order, invoice, or journal entry is created or modified in SAP Business One, ml-connector reads the record via OData, formats it according to document type, and posts a message to the configured Slack channel. The timing can be near-real-time if SAP Business One webhooks are enabled, or on a scheduled polling interval (hourly, daily, by business event). Slack does not write financial data back to SAP Business One; the connection is one-directional. Routing is configurable: high-value purchase orders go to the procurement channel, receivables alerts go to AR, payables alerts go to AP.

How ml-connector handles it

ml-connector stores the SAP Business One Service Layer URL and session credentials encrypted, handling the B1SESSION login and refresh when the session expires after 30 minutes of inactivity. On the Slack side, it stores the OAuth 2.0 bot token encrypted and uses it for all Web API calls. For outbound posting, ml-connector calls chat.postMessage with formatted message blocks (not plain text), allowing rich formatting of tables and attachments. If SAP Business One webhooks are enabled, ml-connector validates the webhook source via IP allowlisting and configurable rules; otherwise it polls on a schedule with OData $filter on UpdateDate to find new records since the last check. When posting to Slack, it respects the 1-per-second rate limit on chat.postMessage per channel by queueing messages and spreading posts across a short window. Every record carry audit metadata (document number, date, amount, user who triggered it) so the Slack message is traceable back to the SAP Business One transaction. If a Slack message post fails (e.g., channel not found, bot not in channel), ml-connector logs the error with the original SAP Business One record so it can be retried.

A real-world example

A mid-sized wholesale distributor runs SAP Business One for purchasing, sales, and inventory. The finance team, warehouse staff, and procurement managers work across multiple locations and rely on Slack for day-to-day communication. Before the integration, purchase orders and invoice alerts arrived via email or were manually shared in Slack with screenshots, creating delays and context-switching. With SAP Business One and Slack connected, when a supplier invoice arrives, a formatted message with invoice number, amount, due date, and terms posts automatically to the accounts-payable channel; procurement staff see new POs in the procurement channel and can approve or flag issues in the same thread. Inventory reorder alerts go to the warehouse channel. Alerts are threaded and timestamped, so the team always knows when an event occurred and can query the audit log for details.

What you can do

  • Post purchase orders, invoices, and journal entries from SAP Business One as formatted messages to Slack channels based on document type and threshold rules.
  • Route financial alerts (payables, receivables, inventory) to team-specific Slack channels with customer configuration.
  • Sync business partner and user data so Slack mentions link SAP Business One contacts to the right people.
  • Handle SAP Business One session token refresh and Slack OAuth 2.0 token management, with encrypted credential storage.
  • Support both SAP Business One webhooks (if enabled) and scheduled polling, adapting to the customer's server version and network setup.

Questions

Do messages flow both ways between SAP Business One and Slack?
No. Messages flow one way, from SAP Business One into Slack. Slack is used for awareness and discussion, not for writing financial data back into SAP Business One. If you need to update a purchase order or invoice, that happens in SAP Business One directly; the Slack message serves as a notification and audit trail.
How does ml-connector handle SAP Business One's customer-specific Service Layer URL and session expiry?
ml-connector stores the customer's full Service Layer URL (including port and protocol) encrypted and logs in via POST /Login on startup. Each session lasts 30 minutes. ml-connector tracks session lifetime and re-authenticates before expiry, or immediately if a call returns error code -5002. This way, SAP Business One polling or webhook handling never encounters a stale session.
Which SAP Business One documents and Slack channels can be connected?
Any OData entity in SAP Business One can be monitored: BusinessPartners, PurchaseOrders, Invoices, JournalEntries, Items, etc. Routing rules are configured per document type and threshold (e.g., POs over 10,000 go to procurement-approvals; invoices past due go to ap-alerts). Slack channels are selected by the customer and ml-connector uses bot token permissions to post into them.

Related integrations

Connect SAP Business One and Slack

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started