Lorixen.
EN

Slack slash commands for your own business tools

Short answer: A Slack slash command lets your team type something like /stock BLU-204 or /booking today in Slack and get an answer from your own systems. Slack sends a signed request to a URL you control; your app checks the signature, replies within three seconds (even if only to say "working on it"), and can send the full answer later. Keep commands narrow, show replies only to the person who asked unless the whole channel needs them, and never let a command do something risky without a confirmation step.

Why small businesses use them

Plenty of small teams live in Slack all day but keep business information elsewhere: stock in the shop system, bookings in a scheduling tool, job status in a database, customer details in a CRM. Switching tools and logging in for one quick answer adds friction. A slash command brings that answer into the conversation.

Typical internal commands:

  • /stock SKU to check stock across locations.
  • /order 10452 to see an order's status and courier.
  • /roster tomorrow to see who's working.
  • /lead Smith to find a customer in the CRM.
  • /refund-request 10452 to start an approval flow, not to refund directly.

How a slash command works

Slack's documentation lays out the flow:

  1. You create a Slack app, add a slash command and give it a request URL on your server.
  2. When someone uses the command, Slack sends an HTTP POST to that URL with a body encoded as application/x-www-form-urlencoded.
  3. The payload includes who ran it, in which channel, the text they typed after the command, and a response_url you can use to reply later.
  4. Your app responds.

Slack's example payload includes fields such as user_id, channel_id, command, text and response_url.

The three-second rule

Slack requires your app to confirm it received the command within 3,000 milliseconds of the request being sent; otherwise the user sees an operation_timeout error. That's fine for quick lookups, but many real tasks, such as calling a slow inventory API or running a report, take longer.

The pattern that works:

  1. Acknowledge immediately with an HTTP 200. You can include a short message such as "Checking stock for BLU-204…"
  2. Do the work in the background, in a queue or a separate process.
  3. Send the result to response_url when it's ready.

Slack's own framework examples show the same idea, acknowledging the command first and then doing the work.

Verify every request

Your request URL is reachable from the internet, so anyone could send it fake requests. Slack signs each request so you can tell genuine ones apart.

Slack's guide to verifying requests explains that each request carries an X-Slack-Signature header. The signature is created by hashing the request body with SHA-256 combined with your app's signing secret, using a base string made of v0, the request timestamp from X-Slack-Request-Timestamp, and the raw body. Your app recalculates the signature and compares it.

Slack also recommends checking that the timestamp isn't more than five minutes from your server's time, which protects against replayed requests. Slack's slash command guide adds that if you can't verify a request, you should return an error and ignore it.

Signing secrets replace the old verification tokens, which Slack marks as deprecated. If an old integration still relies on the token field, move it to signature checks.

Who sees the reply

Slack lets you choose the visibility with response_type:

  • ephemeral, the default, shows the reply only to the person who ran the command.
  • in_channel posts it for everyone in the channel, and Slack notes that the original command is then shown too.

For internal lookups, ephemeral is usually right: customer details or order information shouldn't be broadcast in a busy channel. Use in_channel for things meant to be shared, such as posting today's roster in a team channel.

Design commands people will actually use

  • One job per command. /stock and /order are clearer than /shop stock BLU-204.
  • Helpful usage hints. Fill in Slack's description and usage hint so people see how to use it as they type.
  • Forgiving input. Accept order numbers with or without a hash, SKUs in any case, dates like "today" or "tomorrow".
  • Short, scannable replies. Use Slack's message formatting to show three or four key facts, with a link to the full record.
  • Clear errors. "No order 10452 found. Check the number?" beats "Error 404".

Permissions and safety

A slash command runs with whatever access your back end gives it. Think about:

  • Who can run it. Slack tells you the user_id. Check it against a list of allowed staff for sensitive commands.
  • What it can change. Read-only commands are low risk. For anything that changes data, such as cancelling an order or issuing credit, show a confirmation button and log who approved it.
  • What it reveals. Avoid returning full customer addresses or payment details. Show what staff need and link to the secure system for more.
  • Secrets. Store the signing secret and any API keys on the server, never in the code repository.

Hosting

You need a small HTTPS endpoint. Options include a serverless function, a route in an existing internal app, or an automation platform that supports Slack commands. Whatever you choose, it must handle the three-second acknowledgement and background work.

If you'd rather not expose a URL at all, Slack also offers ways for apps to receive events over an outgoing connection; check Slack's documentation for whether that suits your setup.

A worked example

A hypothetical Brisbane outdoor furniture retailer has staff asking "is the teak bench in stock in the Gold Coast store?" several times a day. The team builds /stock on a small serverless function. It verifies Slack's signature, replies instantly with "Checking…", queries the shop system in the background, and posts an ephemeral reply listing stock by store with a link to the product admin page. A later /hold command asks for confirmation and records who reserved the item.

FAQ

Do I need a paid Slack plan?

Check Slack's current plan details for custom apps in your workspace.

Can one app have several commands?

Yes. You can add multiple slash commands to the same Slack app and route them in your code.

What if my back end is down?

Return a quick, friendly error rather than letting Slack time out.

Can commands start automations elsewhere?

Yes. Your endpoint can call other systems or trigger workflows, as long as it acknowledges Slack quickly.

If you'd like a few slash commands that pull answers from your own systems into Slack, tell us which questions your team asks most. For more on the internal tools we build, see web app development in Vienna.

Sources

WhatsAppBook a call