Setting Up a Slack Channel

This topic describes how to create and integrate your Slack application with your Aisera bot. It includes the following sections:

See Setting up Slack to use as a Data Source for Conversational and User Learning, if you plan to retrieve data from your Slack conversations, or if you need more detailed instructions about field mapping.

Create a Slack Application

First, you need to create a Slack application.

  1. Login to the Slack workspace where you want to create your Slack App (where it is being managed).

  2. Click Create New App.

Create a New Slack App

Create an App Using a Manifest File

  1. After clicking the Create New App button, choose From an app manifest in the resulting window, and select the root Enterprise Grid workspace where you want to create the app.

  2. Modify the manifest.json file below to include your company name where the following manifest file displays <company>. Customize the name, description, long_description, background_color, and display_name fields to personalize your Slack bot.

{
    "display_information": {
        "name": "MY-GPT-ABC",
        "description": "I'm Grace, your HR expert! I'm here to help you troubleshoot common technical issues!",
        "background_color": "#cf1717",
        "long_description": "I'm Grace, your HR expert, here to answer your Business Technology questions! I'm here to help you troubleshoot common technical issues, find answers to your IT questions, and guide you through simple solutions!"
    },
    "features": {
        "bot_user": {
            "display_name": "Grace (GPT-ABC)",
            "always_online": true
        }
    },
    "oauth_config": {
        "redirect_urls": [
            "https://<company>.login.aisera.cloud/"
        ],
        "scopes": {
            "bot": [
                "app_mentions:read",
                "channels:history",
                "channels:manage",
                "channels:read",
                "chat:write",
                "groups:history",
                "groups:read",
                "im:history",
                "im:read",
                "im:write",
                "links:write",
                "mpim:history",
                "mpim:read",
                "reactions:read",
                "reactions:write",
                "users.profile:read",
                "users:read",
                "users:read.email",
                "chat:write.customize"
            ]
        }
    },
    "settings": {
        "event_subscriptions": {
            "request_url": "https://<company>.chatbot.aisera.cloud/slack/receive",
            "bot_events": [
                "app_mention",
                "message.channels",
                "message.groups",
                "message.im",
                "message.mpim",
                "reaction_added"
            ]
        },
        "interactivity": {
            "is_enabled": true,
            "request_url": "https://<company>.chatbot.aisera.cloud/slack/receive",
            "message_menu_options_url": "https://<company>.chatbot.aisera.cloud/slack/receive"
        },
        "org_deploy_enabled": true,
        "socket_mode_enabled": false,
        "token_rotation_enabled": false
    }
}
  1. Paste your manifest configuration file into the input field and click Next.

  2. Review the configuration summary and click Create to finalize the app creation.

  3. Navigate to App Home > Show Tabs and enable Allow users to send Slash commands and messages from the messages tab.

Slack Show Tabs Window
  1. Navigate to Event Subscription > Enable Events.

  2. Choose Retry to validate the configuration.

  3. Click Save.

  4. Navigate to Install App and select Install to Organization.

Managing Your Slack app in the Enterprise Grid organization

To manage the Slack app you just created:

  1. Go to the Enterprise Grid Admin page.

  2. Navigate to Integrations and click Integrations. You will see your Aisera installed app.

  3. Select your Aisera Slack app.

  4. Choose the ellipsis (three dots) and select Add to more workspaces.

  5. Select the Slack workspace that you want to add your bot to and click Next.

Branding your Enterprise Grid App

  1. Access your app settings.

    1. Select your app from the list on the Slack API window.

  2. Edit Display information.

    1. In the Basic Information section, update the app name, description, or other display information.

    2. To change the app icon, choose App Icon and upload a new image that meets Slack requirements.

  3. Click Save Changes to store your branding information.

Create a Slack App from Scratch

  1. After clicking the Create New App button, choose From scratch in the resulting window.

  1. Set:

a. App Name

b. Slack Development Workspace

  1. Set the Display information: a. App name b. Short description c. App Icon & Preview → Needs to be a 512 x5 12 px PNG file d. Background color

  2. Save your changes.

  1. On the Slack left navigation menu, click Event Subscriptions: a. Enable Events.

  1. Set the chatbot-server endpoint to the Request URL of your Aisera Slack Channel, with /slack/receive at the end, like this: <chatbot-server-url>/slack/receive To get the <chatbot-server-url>: a. Log into the Admin Console b. Navigate to Settings -> Channels c. Open the webchat Channel. d. At the bottom of the page, under the JavaScript Snippet, find the source URL

e. Add the modified uri followed by /slack/receive in the Slack Request URL field. It will be immediately verified.

  1. Expand Subscribe to bot events and click Add Bot User Events.

  2. Add following events and Save Changes.

  3. From the left side navigation, go to Interactivity & Shortcuts and enable it..

  4. Set the chatbot endpoint (see above) as the Request URL for Interactivity & Select Menus <chatbot-server-uri>/slack/receive (same as in the step in the section above).

  1. Click Save Changes.

  2. On the Slack left navigation menu, select OAuth & Permissions: a. Add a New Redirect URL. b. Set the Admin UI URL. c. Click Add and Save URLs.

You can get the Redirect URL from the top of the Aisera Admin UI, when it is open to your Aisera tenant.

  1. Click on Add New OAuth Scope in Slack and add: a. Channels:read b. Channels:manage c. Chat:write d. Groups:read e. Im:read f. Im:write g. Mpim:read h. Reactions:read i. Reactions:write j. Users:read k. Users:read.email l. Users.profile:read

Your complete list should look like this:

  1. Navigate to the Slack App Home window. a. Edit the App Display Name + default name. b. Set Always Show My Bot as Online to true.

c. Set Allow users to send Slash commands and messages from the messages tab to true.

  1. Go to Basic Information and copy the following information for use later. a. Client ID b. Client Secret c. Verification Token

Install the Aisera App into your Slack Workspace

The following steps need to be done by a workspace member with permission to install the channel within the application in Aisera Admin Console.

  1. Open a browser and login into your Slack workspace.

  2. On a different browser tab, login to Aisera Admin Console using provided credentials.

  3. Navigate to Settings -> Channels.

  4. Click + Add New Channel.

  5. Select Slack.

  6. Set values for: a. Channel Name (Name your channel as it appears in Admin Console) b. Client ID (will be provided by Aisera) c. Client Secret (will be provided by Aisera) d. Verification Token (will be provided by Aisera)

Make sure you install the app on the correct workspace and click Allow.

  1. You will be redirected back to Aisera’s Admin UI and you should see a Success message.

  2. Navigate to Settings -> AiseraGPT.

  3. Select the App you would like to add the newly created Slack Channel.

  4. Scroll down to the Channels section on your App Details page.

  5. Click + Add Channel.

  6. Select the relevant Slack channel.

  7. Click OK.

Setting up a Slack Silent Mode bot (Optional)

This section describes how to set up a Slack application in Silent Mode.

Prerequisites:

  • Make sure your Slack bot has been created and integrated with Aisera (as described in Create a Slack Application).

  • Make sure you have added the reaction_added subscription event in Slack:

  • Search for the reaction_added event, and subscribe to it.

Set up Silent Mode

  1. Create two channels: 1. one for the bot end users 2. one for agents (if you want your agents to communicate with employees via Slack)

  2. Integrate the two channels with your Slack bot, using the Slack application.

  1. Add the Slack channels into your Aisera application or bot.

  2. Configure each Slack channel.

Configuration Options:

Make Conversation Public: Bot will reply to users in the public channel’s thread if enabled. Otherwise Bot will reply user by DM

Handle All Messages: Bot will behave similar as regular channel if this enabled, means will handle all the request except casual only

Set up Silent Mode Workflows

You can use the following workflows with Slack Silent Mode.

Escalation Feedback Flow

Add the following Escalation Feedback Flow nodes to your Workflow if you have a configuration where users can choose to escalate to an agent.

  1. Add the Escalation Silently Node to your AI Workflow Studio canvas.

  1. Add an Escalation Silently Action.

  1. Add a Response Message.

HandleConversationEvent Flow

The workflow graph look like this:

LiveAgentPickUp branch

Add a Silent Mode Follow Up Action for LiveAgentPickUp.

LiveAgentComplete branch

Add a Silent Mode Follow Up Action for LiveAgentComplete.

ChimeInRequest branch

Edit the JavaScript for the ChimeInRequest branch.

Last updated