Docs.bmc.com will undergo a brief maintenance outage 27 March 2025. The site will be unavailable for ten minutes starting at 6:30 AM CDT/5 PM IST.

  Space banner This version is currently available to SaaS customers only. It will be available to on-premises customers soon.

Enabling Slack in a chatbot application


You can use Slack as one of the communication channels for chatbot applications so that Slack users can connect to BMC Helix Virtual Agent. The configuration for BMC Helix Virtual Agent to work with Slack is applied to all chatbots in your tenancy. If you have multiple chatbots, you must repeat the procedure for each chatbot. 

You can enable the following types of Slack applications:

  • Single workspace Slack application
  • Slack Enterprise Grid in which you can create unlimited workspaces that replicate the way your company is structured.

Important

If you have configured Slack earlier to work with BMC Helix Virtual Agent, you must migrate this classic Slack application to the new Slack application. If you do not want to create a Slack application, complete the steps in To migrate the classic Slack application.


The following image describes the process of configuring Slack to work with your BMC Helix Virtual Agent application:

2002_enabling Slack process.png


Task 1: To create an application in Slack and set the application scope

  1. Create a Slack workspace and an application in Slack.

    1. Create a Slack App to create an application in Slack, and complete the steps in the wizard.

    2. Configure a bot user for your Slack application as specified in Creating a bot user.

  2. Set the OAuth permissions.

    1. Navigate to the application that you created in Slack.
    2. Select OAuth & Permissions.
    3. Select Scopes > Bot Token Scopes and select the following OAuth scopes:

      • channels:history
      • chat:write
      • files:read
      • files:write
      • users:read
      • im:history

    • The following image shows the Bot Token Scopes that you must select:

    • 2008_Slack_bot_token_scopes.png

  3. On the OAuth & Permissions page, in the OAuth Tokens & Redirect URL section, click Install App to Workspace
  4. Copy the Slack application credentials.
    1. On the OAuth OAuth & Permissions page, click Install Workspace to get the Access Token.
    2. In the Tokens for Your Workspace section, copy the Bot User OAuth Access Token.
    3. In the left pane, under the Settings menu , select Basic Information.
    4. Copy the following credentials:

      • App ID
      • Verification token

      The following image shows the Slack application credentials that you must copy:
      2002_Slack app credentials.png


Task 2: To configure a chatbot application to work with Slack

  1. Log in to BMC Helix Innovation Studio.
  2. On the Workspace tab, click the application in which you want to configure a chatbot to work with Slack. 
  3. Click the Chatbots tab, and click the chatbot that you want to configure to work with Slack. 
  4. Click the Channels tab and select New Slack
  5. In the Slack Settings section, enter values for the following fields, and click Save.

    Field

    Description

    Description

    Enter the description that provides details about the setting.

    Slack Application ID

    Enter the App ID that you copied earlier.

    Slack Bot User Auth Access Token

    Enter the Bot User OAuth Access Token that you copied earlier.

    Slack Verification Token

    Enter the Verification Token that you copied earlier.

    Webhook URL

    (Information only) This field is populated automatically.
    Webhook URL is the Request URL that you provide when you configure your Slack application.

  6. Copy the Webhook URL for future reference. 


Task 3: Subscribe to Slack event and configure interactive components

You must subscribe to events in Slack to receive notifications for these events, such as when the end user posts a message. You also configure the interactive components in Slack such as buttons, menus, and date pickers. 

  1. Subscribe to Slack events. 

    1. Navigate to the application that you created in Slack.
    2. In the left pane, under the Features menu, select Event Subscriptions.
    3. In the Enable Events section, select the Enable Events toggle button.
    4. In Request URL, enter the webhook URL that you copied earlier.
    5. Click Subscribe to bot events and add message.im.
    6. In Subscribe to events on behalf of users, ensure that you have not added any Workspace event.

    The following image shows the bot event that you must subscribe:

    2002_slack bot event subscription.png

  2. Configure the interactive components.
    1. Navigate to the application that you created in Slack.
    2. In the left pane, under the Features menu , select Interactivity & Shortcuts.
    3. In Interactivity, select the Interactivity toggle button.
    4. In Request URL, specify the webhook URL that you copied earlier, and save the changes.
    5. Reinstall the app.
  3. (If you are using Slack Enterprise Grid), under Features, select App Home
  4. In the Show Tabs section, select Allow users to send Slash commands and messages from the messages tab

    The following image shows the Show Tabs section:

    Slack_Display app in the message tab.png

You have now configured Slack to work with BMC Helix Virtual Agent.


To migrate the classic Slack application

  1. Navigate to the application that you created in Slack.
  2. In the left pane, under the Tools menu, select Update to Granular Scopes.
  3. Set Bot Token Scopes.
    1. Delete all the existing Bot Token Scopes that you has set earlier.
    2. Select the following Bot Token Scopes: 
      • channels:history
      • chat:write
      • files:read
      • im:history
    3. Delete all the User Token Scopes that you selected earlier.
    4. Select Yes, migrate my app, as shown in the following example:

      2002_migrate Slack.png
  4. Subscribe to bot events. 

    1. In the left pane, under the Features menu, select Event Subscriptions.
    2. Delete all the Events that you subscribed to earlier.
    3. Click Subscribe to bot events and add the message.im event.

    For more information about migrating the classic Slack application, see Migration guide for classic Slack apps