# How to add Slack to Dynamics NAV

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

## Short answer

Build a Slack app that talks to Dynamics NAV through published web services. Use Socket Mode so the app connects outbound from your network, post Block Kit messages for alerts and approvals, and add slash commands for read-only lookups. NAV logic stays in codeunits, Slack is just the front end.

## System

Microsoft Dynamics NAV

## Capability

slack

## Intro

Engineering, planning and sales teams that run Slack still depend on NAV for the answers: what is on hand, when does the part arrive, which orders are blocked. They end up pinging the one person who knows the NAV client.

NAV has no Slack connector, but Slack apps are easy to build and NAV web services are stable. The interesting design choice is network posture: a NAV server on a private LAN can still serve Slack if the app uses Socket Mode and connects outward.

Keep the first version small: three slash commands and one alert channel. Prove the trust model before adding writes.

## Use Cases

### Slash command stock check

**Description:** /nav stock 4510 returns on-hand and available quantity by location from Item Ledger Entry sums via a published query.

### Order status for sales

**Description:** /nav order SO-1042 returns status, ship date and any credit block on the Sales Header.

### Stockout alerts

**Description:** A scheduled job posts items falling under Reorder Point or Safety Stock Quantity to the planning channel.

### Interactive PO approvals

**Description:** Approvers see a Block Kit message with vendor, amount and Approve or Reject buttons.

### Production disruption thread

**Description:** When a production order is flagged late, a thread is opened with the component shortage list so planners can discuss in context.

### Receiving notifications

**Description:** Posted Purchase Receipts for critical items notify the production channel that material has arrived.

## System Surface

- Web services from the Web Services page: SOAP on all versions, OData from NAV 2013 and OData v4 from NAV 2016, with page, query and codeunit objects.
- Queries are efficient for read-only slash commands because they can join Item, Item Ledger Entry and Location, and they publish as OData endpoints.
- Codeunits as web services for decisions and any controlled write, giving Slack a single, validated action to call.
- Job Queue Entries and the NAV Application Server for scheduled alert scans; on very old builds a Windows scheduled task calls a codeunit service instead.
- Authentication choices include Windows credentials and web service access keys; a service account with narrowly scoped permission sets suits an app.

## How It Works

### Create the Slack app

**Detail:** Define slash commands, interactivity and bot scopes. Enable Socket Mode so you avoid exposing a public request URL.

### Define the NAV contract

**Detail:** List the exact questions and actions. Publish one query or codeunit per question rather than a generic query endpoint.

### Write the app service

**Detail:** Run a small service inside your network that holds the Slack app token, receives events over the socket and calls NAV web services.

### Map Slack users to NAV users

**Detail:** Look up Slack email, match to NAV user and permission set. Unknown users get a polite refusal.

### Format with Block Kit

**Detail:** Return compact tables and buttons. Add a link to the document in the NAV web client when available.

### Implement approvals safely

**Detail:** On button click, verify the clicker, check the Approval Entry is still open and call the decision codeunit.

### Rate limit and log

**Detail:** Throttle alert posts, log every command and response, and alert on service failures.

## Example Flows

### Lookup in a channel

**Trigger:** Someone types /nav stock 4510.

**Steps:**

- Slack sends the command over the socket.
- The app resolves the user and checks permission.
- It calls a stock query for item 4510.
- It replies ephemerally with by-location quantities.

**Result:** The answer arrives in seconds and only the requester sees it.

### Late PO alert

**Trigger:** An hourly job finds a purchase line past Expected Receipt Date for an A-class item.

**Steps:**

- Codeunit writes an alert row.
- The app posts to the buyer channel with the vendor and days late.
- A button lets the buyer log a call outcome.
- The outcome is stored in a note on the line through a codeunit.

**Result:** Chasing is tracked instead of lost in chat.

### Approve from Slack

**Trigger:** A purchase order enters approval.

**Steps:**

- The app posts the summary to the approver by direct message.
- The approver clicks Approve.
- The app verifies and calls the decision codeunit.
- The message is updated to show who approved and when.

**Result:** Order released without opening NAV.

## On Prem

A NAV server on a private network can work with Slack if the integration service sits inside that network and opens only outbound HTTPS and WebSocket connections to Slack. Socket Mode removes the need to publish a callback URL. If your Slack plan or policy does not allow Socket Mode, place a minimal reverse proxy in your DMZ that forwards only the Slack paths and checks the request signature. Any AI that interprets free-text requests can run on a local model on the same host, so only the final answer text goes to Slack.

## Security

- Verify Slack request signatures or use Socket Mode tokens kept in a secret store.
- Make slash commands read-only by default and require explicit button clicks for writes.
- Use ephemeral replies for sensitive numbers so they do not remain in channel history.
- Restrict the service account in NAV to the published objects only.
- Record Slack user ID, NAV user and document in an audit table.

## Options

### Off-the-shelf iPaaS (Zapier-style or workflow tools) with a NAV connector

**Fit:** Simple notifications where a connector for your exact version exists.

**Effort:** Hours to days, with per-task fees.

### Custom Slack app plus NAV web services

**Fit:** Slash commands, approvals and tailored alerts.

**Effort:** 2 to 5 weeks for a first release.

### Partner delivery with Netray

**Fit:** A conversational assistant over NAV with local models and human-approved writes.

**Effort:** Scoped; pilot in a few weeks.

## Pitfalls

- Slash commands must respond in about three seconds; acknowledge first and answer asynchronously for slow queries.
- Channel posts persist; avoid putting prices or customer-confidential details in public channels.
- SOAP session limits on the service tier can throttle bursts; cache common lookups.
- Matching users by display name rather than email causes wrong-person approvals.
- Forgetting that NAV company names appear in the service URL when you run multiple companies.

## Faq

### Is there a Slack app for Dynamics NAV?

**Answer:** There is no official one. Third-party tools may exist for specific versions, but most teams build a small app on top of NAV web services. Check your version and whether the vendor still supports it before depending on a connector.

### Can Slack reach an on-prem NAV server?

**Answer:** Not directly, and it should not. A service inside your network connects outward to Slack using Socket Mode and calls NAV locally. That keeps the NAV endpoint private and avoids opening inbound firewall ports.

### Can we approve orders from Slack?

**Answer:** Yes, using interactive buttons that call a NAV codeunit as the mapped user. Verify the approval is still open and record who clicked. Start with low-risk approvals, then widen.

### What NAV versions work?

**Answer:** Any version with web services and a scheduling option. NAV 2013 R2 and later add the Job Queue, which simplifies alerts. Older releases can still work with an external scheduler.

### Can we ask free-text questions?

**Answer:** Yes, with an LLM that maps text to your fixed set of published queries. Run it on a local model if data must stay on-prem. Keep the model out of direct SQL and limit it to approved tools.

## Search terms

dynamics nav slack integration, slack for dynamics nav, navision slack, dynamics nav slack bot, dynamics nav slash command, nav slack approvals, dynamics nav slack alerts, slack navision connector, dynamics nav web services slack, slack app for navision

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