Slack Integration
Configure Slack notifications to receive job failure alerts directly in your Slack channels. Slack integration uses the Slack Bot API for reliable, formatted message delivery.
Prerequisites
Before configuring Slack notifications:
-
Slack Workspace Access: You need admin access or ability to install apps
-
Slack App Creation Permission: Ability to create Slack apps
-
Job Queue Admin Setup Complete: Privacy acknowledged and extension enabled
Creating a Slack App
Step 1: Create New Slack App
-
Go to api.slack.com/apps
-
Click Create an App
-
Choose From scratch
-
Enter App Name: "JQA Notifications" (or your preferred name)
-
Select your Workspace
-
Click Create App

Step 2: Configure Bot Token Scopes
-
In the left sidebar, click OAuth & Permissions
-
Scroll to Scopes section
-
Under Bot Token Scopes, click Add an OAuth Scope
-
Add the following scope:
| Scope | Purpose |
|---|---|
| chat:write | Post messages to channels |

Step 3: Install App to Workspace
-
Scroll to top of OAuth & Permissions page
-
Click Install to Workspace
-
Review permissions and click Allow
-
Copy the Bot User OAuth Token - you'll need this for Job Queue Admin

Token Format: xoxb-1234567890-1234567890123-AbCdEfGhIjKlMnOpQrStUvWx
Important: Keep this token secure - it grants posting access to your workspace.
Step 4: Invite Bot to Channel
-
Open Slack and go to the channel where you want notifications
-
Type
/invite @JQA Notifications(or your app name) -
Or click the channel name > Integrations > Add apps

Step 5: Get Channel ID
-
Right-click on the channel name in Slack
-
Select View channel details (or click channel name)
-
Scroll to bottom and copy the Channel ID

Channel ID Format: C01ABCDEFGH (starts with C for public, G for private)
Creating a Slack Channel in Job Queue Admin
Step 1: Open Notification Channels
-
Search for Notification Channels
-
Or from Job Queue Admin Setup: Actions > Navigate > Notification Channels
Step 2: Create New Channel
-
Click New to create a new channel
-
Fill in the required fields:
| Field | Value |
|---|---|
| Code | Unique identifier (e.g., SLACK-OPS) |
| Channel Type | Slack |
| Description | Descriptive name (e.g., "IT Operations Slack") |
| Slack Channel ID | Channel ID from Step 5 above |
| Slack Bot Token | Bot token from Step 3 above |
| Enabled | Yes |

Step 3: Save and Test
-
Click OK to save the channel
-
Use Send Test Notification action to verify delivery
-
Check your Slack channel for the test message
Slack Channel Fields
Identification
| Field | Description | Required |
|---|---|---|
| Code | Unique channel identifier | Yes |
| Channel Type | Must be "Slack" | Yes |
| Description | Human-readable name | No |
| Enabled | Active/inactive toggle | Yes |
Slack Settings
| Field | Description | Required |
|---|---|---|
| Slack Channel ID | Target channel ID (C... or G...) | Yes |
| Slack Bot Token | Bot User OAuth Token (xoxb-...) | Yes |
Slack Channel ID Format:
-
Public channels:
C01ABCDEFGH -
Private channels:
G01ABCDEFGH -
Get from channel details in Slack
Slack Bot Token Format:
-
Starts with
xoxb- -
From Slack App OAuth page
Slack Message Format
Block Kit Structure
Slack notifications use Block Kit for rich formatting:
{ "channel": "{Channel ID}", "blocks": [ { "type": "header", "text": { "type": "plain_text", "text": "Job Queue Failure" } }, { "type": "section", "fields": [ {"type": "mrkdwn", "text": "*Job:*\n{Description}"}, {"type": "mrkdwn", "text": "*Company:*\n{Company}"}, {"type": "mrkdwn", "text": "*Error:*\n{Error Message}"}, {"type": "mrkdwn", "text": "*Time:*\n{Timestamp}"} ] }, { "type": "actions", "elements": [ { "type": "button", "text": {"type": "plain_text", "text": "Restart Now"}, "url": "{Signed Action URL}" }, { "type": "button", "text": {"type": "plain_text", "text": "Put On Hold"}, "url": "{Signed Action URL}" }, { "type": "button", "text": {"type": "plain_text", "text": "View in BC"}, "url": "{Deep Link}" } ] } ] }
Example Slack Message

The message includes:
-
Header: "Job Queue Failure" with alert emoji
-
Job Details: Description, error, timestamp, company in fields
-
Action Buttons: Restart Now, Put On Hold, and View in BC
Interactive Action Buttons
Slack notifications include interactive buttons that let you take action directly from the notification:
Available Actions
| Button | Action | Description |
|---|---|---|
| Restart Now | Restarts the job | Sets job status to Ready and triggers the scheduler |
| Put On Hold | Puts job on hold | Prevents automatic restart, requires manual action |
| View in BC | Opens BC | Deep link to the Job Queue Entry card |
How It Works
-
Click an action button in the Slack notification
-
A browser window opens briefly showing the action result
-
The job status is updated in Business Central
-
You can close the browser tab and return to Slack
Button Security
-
Action buttons use signed URLs that expire after 7 days
-
Each notification has unique action links
-
Links cannot be forged or tampered with
-
After expiry, you'll see a friendly error asking you to use a more recent notification
Testing Slack Channel
Using Send Test Notification
-
Open the Slack Channel card
-
Click Send Test Notification in the action bar
-
A test notification is sent immediately
-
Check your Slack channel for the test message
Verifying Delivery
-
Check the target Slack channel
-
Message should appear within seconds
-
Review Notification Log for send status
Troubleshooting Test Failures
| Symptom | Possible Cause | Solution |
|---|---|---|
| No message in Slack | Bot not in channel | Invite bot to channel |
| channel_not_found | Invalid Channel ID | Verify Channel ID |
| invalid_auth | Invalid Bot Token | Verify token, regenerate if needed |
| not_in_channel | Bot not invited | Invite bot with /invite |
| Timeout error | Network connectivity | Check firewall rules |
Bot Token Management
Regenerating Token
If your token is compromised:
-
Go to api.slack.com/apps
-
Select your JQA app
-
Go to OAuth & Permissions
-
Click Reinstall to Workspace
-
Copy new token
-
Update Slack Bot Token in all channels using this app
Token Security
-
Store securely: Token is stored in BC database
-
Limit access: Only admins should access channel settings
-
Rotate periodically: Consider annual token rotation
-
Monitor usage: Check Slack app analytics for unusual activity
Multiple Slack Channels
You can create multiple Slack channels for different purposes:
Example: Routing by Team
| Channel Code | Slack Channel | Description |
|---|---|---|
| SLACK-SALES | #sales-alerts | Sales integration failures |
| SLACK-OPS | #it-operations | General job failures |
| SLACK-CRITICAL | #critical-alerts | Critical system failures |
Shared Bot Token
You can use the same Slack App (and bot token) for multiple notification channels:
-
Create one Slack App with
chat:writescope -
Invite bot to all target channels
-
Use same bot token with different Channel IDs in Job Queue Admin
Best Practices
Slack App Setup
-
Name clearly: Include "BC" or "JQA" in app name
-
Use workspace icon: Add recognizable app icon
-
Minimal scopes: Only request
chat:write
Channel Selection
-
Use dedicated alert channels: Don't spam general channels
-
Consider channel visibility: Public vs. private
-
Set up channel notifications: Configure Slack notification preferences
Trigger Configuration
-
Start with Error only: Reduce noise initially
-
Add Cooldown for critical jobs: Important awareness
Security Considerations
Bot Token Protection
-
Treat as password: Bot token grants posting access
-
Don't commit to source control: Keep in BC config only
-
Regenerate if exposed: Reinstall app to get new token
Channel Access
-
Private channels: Bot must be explicitly invited
-
Channel ID visibility: ID alone doesn't grant access
-
App permissions: Slack admins can revoke app access
Message Content
-
Error messages visible: Consider what errors contain
-
Deep links require BC access: URL alone doesn't grant access
-
Company name included: Multi-company considerations
Next Steps: Configure Auto-Restart Rules to automatically recover from transient errors, or set up Job Configurations for channel routing.