Back to Medusa

{metadata.title}

www/apps/bloom/app/features/integrations/guides/slack/page.mdx

2.14.25.0 KB
Original Source

import { InProductAction, getOsShortcut, InlineIcon } from "docs-ui" import { ArrowUpRightOnBox } from "@medusajs/icons"

export const metadata = { title: Slack Integration, }

{metadata.title}

Add Slack to get notifications about orders, customers, and store events in your Slack workspace.

Slack notifications keep your team updated on important events without checking the admin dashboard constantly. Bloom sets it up for you in minutes.

When to Integrate Slack

Integrate Slack if you want to:

  • Get real-time notifications about new orders, customer signups, and other store events.
  • Keep your team informed about store activity without logging into the admin dashboard.

Prerequisites

Before adding Slack, you need a Slack workspace and a webhook URL.

To get your Slack webhook URL:

  1. Go to api.slack.com/apps and create a new app (or use an existing one).
  2. In your app settings, click "Incoming Webhooks" in the sidebar.
  3. Turn on "Activate Incoming Webhooks."
  4. Click "Add New Webhook to Workspace."
  5. Choose the channel where you want to receive notifications.
  6. Copy the webhook URL.

Webhook URLs start with https://hooks.slack.com/services/. You'll need this URL when Bloom asks for it.


Add Slack to Your Store

To add Slack using the <InProductAction product={"bloom"} type={"MEDUSA_AI_OPEN_PANE"} data={{ pane: "integrations" }}>Integrations</InProductAction> panel:

  1. Press <Kbd>{getOsShortcut()}</Kbd> + <Kbd>k</Kbd> to open the preview tab switcher.
  2. Select the "Integrations" tab from the list.
  3. Find the Slack card in the available integrations.
  4. Click "Build" on the Slack card.

Bloom will start setting up Slack and ask you questions about which notifications you want to receive.


Answer Bloom's Questions

After you click "Build," Bloom asks questions to configure Slack notifications, such as:

  1. Do you have a Slack app with incoming webhooks enabled? Answer "yes" if you completed the prerequisites.
  2. Which events do you want to receive notifications for? List the events you want to receive notifications for (like "new orders, order cancellations, and new customer signups").

Next, Bloom will ask you for your Slack credentials:

  1. Slack Webhook URL: Paste the webhook URL you copied from your Slack app settings.
  2. Admin URL: The URL to your Bloom admin dashboard (for example, https://your-store.com/app). This is used to link notifications back to your admin dashboard.
  • In preview, you can find it by:
    • Opening the <InProductAction product={"bloom"} type={"MEDUSA_AI_OPEN_PANE"} data={{ pane: "admin" }}>Admin</InProductAction> tab.
    • Clicking the <InlineIcon Icon={ArrowUpRightOnBox} alt="Open in new tab" /> icon in the bottom toolbar to open the admin in a new tab.
    • Copying the URL from the new tab.
<Note title="Technical Information">

Bloom stores your Slack credentials as environment variables in your store. They're never exposed in your code or logs. See Environment Variables for more details.

</Note>

Bloom will set up Slack to send notifications to your workspace when these events occur.


Test Slack

After Bloom finishes the setup, test Slack notifications in your preview store:

  1. Open your <InProductAction product={"bloom"} type={"MEDUSA_AI_OPEN_PANE"} data={{ pane: "store" }}>store</InProductAction> preview.
  2. Trigger an event you configured to receive notifications for.
  • For example, if you set up notifications for new orders, place a test order.
  1. Check your Slack channel for the notification.
  2. Verify the notification includes the correct details (order number, customer name, etc.).

If the notification appears in your Slack channel with accurate information, Slack is working correctly.

You can also ask Bloom to make changes to your notifications. For example, you can ask it to add more information, change the formatting, or add notifications for additional events.


Publish Slack Integration

Once you've tested Slack and notifications are working correctly, publish your store to make it live.

To publish your Slack integration:

  1. Click the "Publish" button at the top right of your project.
  2. If you haven't published before, Bloom asks for details about your store.
  3. Bloom will ask you to enter your live credentials:
  • Enter the same Slack webhook URL you used for the preview since Slack doesn't differentiate between environments.
  • Enter your live admin URL (for example, https://your-store.com/app). If you don't have it yet, you can use the preview admin URL and update it later from the Environment Variables page.
  1. Click "Publish" to make your changes live.

Your Slack integration is now active on your live store. You'll receive notifications for real customer events.


Need Help?

If you face any issues while adding Slack to your Bloom store, contact support or submit feedback.