# How to add Slack to SAP Business One

> Source: https://netray.co/integrations/sap-business-one-slack
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Integrations

## Short answer

Build a Slack app that calls the Business One Service Layer for alerts, slash commands and interactive approvals. Use Socket Mode when B1 sits behind a firewall, map Slack users to B1 users, and send changes back as drafts or activities.

## System

SAP Business One

## Capability

slack

## Intro

Slack tends to appear in Business One companies that are younger, distribution-heavy or tech-adjacent: e-commerce suppliers, electronics distributors, small assemblers. Operations talk in channels, but order holds, stock-outs and late shipments are discovered by someone opening B1 and noticing.

A Slack app can turn those states into messages with context and a next action. The Service Layer is the safe way in; it enforces B1 authorizations and business logic, unlike direct SQL writes.

This page is specific to how B1 behaves: session handling, pagination, UDFs, and the common case of a server that has no inbound internet access.

## Use Cases

### Stock-out channel

**Description:** Post to a purchasing channel when an item's available quantity (on hand minus committed) drops below its minimum, with open PO coverage and lead time.

### Slash command order lookup

**Description:** Type /b1 order 10482 to see status, ship date, delivery and invoice state, pulled through the Service Layer.

### Quote approval buttons

**Description:** Post Sales Quotations above a discount threshold with Approve and Send back buttons for the sales manager.

### Late shipment watch

**Description:** Flag Sales Order rows past ship date without a delivery and mention the account owner stored in a UDF.

### New customer creation review

**Description:** Post newly created Business Partners to a finance channel so duplicates and missing tax data are caught early.

### Month-end close reminders

**Description:** Post lists of unposted drafts and open goods receipts without invoices for the controller.

## System Surface

- Service Layer entities such as Orders, Quotations, DeliveryNotes, Invoices, BusinessPartners, Items and Drafts, reachable over HTTPS under the /b1s path with cookie-based sessions.
- OData query options ($filter, $select, $orderby, $top) plus server-side paging with a next link; default page sizes are small, so code must follow paging.
- Saved User Queries and, on HANA, calculation views, which let you keep complex joins like available-to-promise outside the app.
- Item availability lives across OITW (stock per warehouse) with on-hand, committed and ordered fields; reading these through queries is common for stock alerts.
- UDFs on documents and Business Partners to hold the Slack user ID, channel preferences and a 'last alerted' marker.

## How It Works

### Create the Slack app

**Detail:** Define bot scopes (chat:write, commands, and user lookups only if needed), enable Interactivity, and add a slash command.

### Choose the transport

**Detail:** Use HTTP request URLs if you can host a public endpoint, or Socket Mode so the backend opens an outbound connection and B1 never needs inbound exposure.

### Link users

**Detail:** Store Slack user ID next to the B1 user code in a UDT. Slash commands resolve the caller and apply the matching access level.

### Poll or schedule B1 queries

**Detail:** Run saved queries on a schedule, keep a last-alerted marker per item or document so the same alert is not repeated each cycle.

### Build Block Kit messages

**Detail:** Include document number, key numbers and a link to the B1 Web Client or a deep link into your internal page.

### Handle interactions

**Detail:** On button click, re-fetch the document, confirm its state, then act through the Service Layer, or create a Draft or Activity where policy requires review.

## Example Flows

### Discount approval for a quotation

**Trigger:** A Quotation is saved with a discount percentage over the sales manager threshold.

**Steps:**

- A scheduled query finds quotations in status open with U_NeedsApproval = Y.
- Bot posts a message to the manager with customer, total, margin and discount.
- Manager clicks Approve; backend checks the user mapping and quotation state.
- The UDF is set to Approved and an Activity logs approver and time.

**Result:** Sales can convert the quote without chasing, and the audit trail sits in B1.

### Order lookup command

**Trigger:** A rep types /b1 order 10482 in Slack.

**Steps:**

- The backend resolves the Slack user to a B1 user and permissions.
- It queries the order with its rows, linked deliveries and invoices.
- It returns an ephemeral message visible only to the rep.

**Result:** Reps get answers in seconds, without opening B1 or interrupting customer service.

## On Prem

A Business One server on a private network is the normal case, and Slack's Socket Mode fits it well: the backend opens an outbound WebSocket to Slack, so you do not publish any port. Keep the Service Layer reachable only from the backend host. Remember that Slack stores message content, so avoid pasting price lists or customer-specific pricing into channels that include contractors or guests. If you want AI-written summaries or natural-language queries, host the model locally (an open-weight model served with Ollama or vLLM) and send only the generated message to Slack. Slack's own AI features do not read your B1 data unless you send it there.

## Security

- Verify Slack request signatures and reject stale timestamps on every inbound HTTP call.
- Do not post to public channels by default; use private channels and ephemeral responses for sensitive lookups.
- Apply B1 authorizations through a per-user mapping rather than a single powerful bot login where reads vary by role.
- Rotate the bot token and Service Layer password; store them in a secret manager.

## Options

### Workflow tools such as Zapier or Make with HTTP calls

**Fit:** Works for simple one-way alerts if your B1 endpoint can be reached from the tool.

**Effort:** Hours to days, but on-prem reach and paging are awkward.

### Custom Slack app over the Service Layer

**Fit:** Best for slash commands, approvals and per-user permissions.

**Effort:** Two to five weeks depending on the flows.

### Partner-built assistant with private model (Netray with a B1 partner)

**Fit:** Fits when you want natural-language questions on B1 data inside Slack without sending data to a public model.

**Effort:** Scoped project; read-only first, writes behind approval.

## Pitfalls

- Forgetting Service Layer paging so alerts miss items beyond the first page.
- Alert storms from a threshold crossing repeatedly; add hysteresis and a cool-down.
- Slash commands must acknowledge within three seconds; do the B1 call asynchronously and post the result after.
- Using on-hand instead of available quantity makes stock alerts misleading when sales orders already commit stock.

## Faq

### Is there an official SAP Business One Slack connector?

**Answer:** Not as a standard feature in the editions most customers run. Some partners and marketplace vendors offer connectors, and many teams build a small app on the Service Layer instead.

### Can Slack reach my on-prem B1 server?

**Answer:** Not directly and it should not. Use Socket Mode with a backend inside your network, or a reverse proxy with strict path allow-listing.

### Can users create documents from Slack?

**Answer:** They can start them. The safe pattern creates a Draft in B1 for review. Direct posting of orders or invoices from chat bypasses checks you probably rely on.

### What about Slack versus Teams for B1?

**Answer:** Choose whichever your company already lives in. The B1 side is the same Service Layer. Teams has stronger identity integration if you use Microsoft 365; Slack is simpler for alerts and commands.

### How do I keep costs down?

**Answer:** The Slack API is free to build against; costs are your Slack plan and hosting. Keep polling intervals sensible and cache item data to limit load on the B1 server.

## Search terms

sap business one slack integration, slack for sap business one, sap b1 slack bot, sap business one slack notifications, sap b1 slash command, slack sap business one approval, sap business one service layer slack, sap b1 low stock alert slack, connect slack to sap b1, sap business one slack app

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