Salesforce Commerce Cloud Business Manager generates notifications when certain events occur. A few such events are given below.
- When the minimum password length for the registered user is not set to at least 8 characters,
- If there are expired certificates,
- When IP range access restrictions are not configured for Business Manager, etc.
You can see these notifications within Business Manager when you click on the bell icon at the top right corner.
However, one must have access to Business Manager to see the above screen.
This blog talks about how to push these notifications to Slack channels so that one can view the notifications in Slack without logging into Business Manager.
Follow the below steps to integrate the Slack workspace with Salesforce Commerce Cloud Business Manager to push Business Manager notifications directly to Slack channels.
Generate Slack tokens
To connect Slack to Business Manager, you need a “Slack bot token or bot user OAuth token” for your Slack workspace. Complete the below steps to generate one.
- In the Slack app, click on the workspace menu.
2. Go to Settings & Administration > Manage Apps. This will open a new browser window.
3. In the new browser window, click the Build link.
4. Click the Create an App button. This will open a modal window.
5. From the modal window, select From an app manifest.
6. Select your workspace and click Next.
7. Select YAML and replace the existing content with the below content. In this case, a token will be generated with the name “your_new_bot. However, you are free to change the name and description according to your needs.
_metadata: major_version: 1 minor_version: 1 display_information: name: your_new_bot description: SFCC ECommerce Bot background_color: "#2d9c0b" features: bot_user: display_name: ECommerce Bot always_online: false oauth_config: scopes: bot: - groups:read - channels:read - chat:write - chat:write.public - team:read
8. Click Next.
9. Click Create.
10. Go to OAuth & Permissions and click Install to Workspace. This will redirect you to a new page.
11. On the new page, click Allow.
12. Copy the bot user’s OAuth token.
Integrate Slack workspace with business manager
1. Log in to your SFCC Business Manager and go to Administration > Operations > Notification Settings > Slack.
2. Click Connect to Slack Workspace.
3. Click Next.
4. Enter your Slack Workspace Name and Token (you copied this in the previous section), then click Connect Workspace.
5. Select the slack channels to which you want to push the notifications, and then click Add. In this case, we selected the bm_notifications channel.
Which notifications to push to Slack channels
1. Go to the Settings tab. Under the Slack Channel column for the individual events, select the Slack Channels to which you would like to push the notifications. Settings will be auto-saved.
That’s it. Your business manager is now integrated with Slack. From now on, you will start receiving notifications on your Slack channel, like the one below, whenever a new notification is generated in the Business Manager. Your team added to this channel will be able to see the notifications without requiring access to Business Manager.
What’s Next: It is also possible to programmatically generate the notifications and alerts and push them to slack channels.