Slack alerts¶
ForgeSync posts its alerts to channels in your own Slack workspace. We never hold a token for your workspace: you create the app, you install it, and the token lives only on your ForgeSync server. If you skip Slack, warning and critical alerts go to your alert email address instead.
Setting it up¶
- On the ForgeSync server run
php artisan fe:slack:manifest. It prints a link. - Open the link, choose your workspace, review the summary and click Create. The app is called ForgeSync Alerts and asks only for the permissions it needs: post messages, create and join public channels, and read channel details.
- On the app page click Install to Workspace and allow it.
- Under OAuth & Permissions copy the Bot User OAuth Token. It starts
with
xoxb-. - On the server run
php artisan fe:slack:setupand paste the token when it asks. Pasting at the prompt keeps the token out of your shell history. For scripted installs,php artisan fe:slack:setup --token=xoxb-...does the same without the prompt.
The command checks the token, creates the channels, joins them, posts a "ForgeSync is connected" message to each, and records them. Run it again any time: it keeps the channels it recorded last time (even if you renamed them or made them private), revives one that was archived, finds what exists and creates nothing twice.
Which channels appear¶
With the default profile, one channel per topic:
| Channel | Key | What posts there |
|---|---|---|
#forgesync-forgesync |
forgesync |
health, customer links, quote requests |
#forgesync-erp-queue |
erp_queue |
orders on their way to Sage, and the ones that failed |
#forgesync-cron |
cron |
scheduled job failures and connection outages |
#forgesync-orders |
orders |
each web order as it books into Sage |
#forgesync-new-products |
new_products |
Sage items staged for the web store |
#forgesync-watchdog |
watchdog |
a job that went silent |
#forgesync-ebay, #forgesync-amazon |
ebay, amazon |
marketplace activity |
#forgesync-live |
live |
the daily summary |
The compact profile (--profile=compact) creates two: #forgesync-ops for
everything that needs a person (key ops), and #forgesync-activity for the
rest (key activity). The prefix is yours to change with --prefix=.
Using channels you created yourself¶
If your workspace does not allow apps to create channels, or you want a
private channel: create it, run /invite @ForgeSync in it, open Channel
details and copy the channel ID from the bottom of the About tab, then run
php artisan fe:slack:setup --existing=erp_queue=C0123ABCD (paste the token
when it asks; one --existing per channel key, using the keys in the table above; the
compact profile uses ops and activity). Channels without an --existing
entry are still created by the setup.
How it stays proven¶
Every day the server checks the token and every channel without posting
anything, and records the result. If the token is revoked or a channel is
archived, php artisan fe:verify reports it, we are alerted, and your
warning and critical alerts go to the alert email until it is repaired. If
the app only lacks the channels:read permission, fe:verify warns rather
than fails: add the permission or recreate the app from the manifest link.
php artisan fe:slack:probe shows the same check on demand.
Turning it off¶
php artisan fe:slack:setup --disable stops posting; warning and critical
alerts then go to the alert email. To re-enable, run
php artisan fe:slack:setup and paste the token when it asks. To revoke the token as
well, uninstall the app in Slack: Apps, ForgeSync Alerts, Configuration,
Remove App.