Slack Integration

Slack is a communication and collaboration platform. If you have created a team in Slack and are maintaining customer relationship through the Slack team, you can create Slack App and bot for the team, bind the App to Hyphenate Customer Engagement Cloud, and provide customer service through the Slack bot.

Follow these steps:

Note: The Slack channel is a value-added service. To activate it, please provide the tenant ID and contact Hyphenate.

1. Open https://api.slack.com/apps in your browser, go to “Your Apps”, and click Create an App.

Your Apps

2. On the “Create an App” window, enter an App Name, select a Development Slack Team, and click Create App.

Create app

After you create an app, the app settings page is displayed.

On the App settings page, choose Bot Users, click Add Bot User, set the bot user information, and click Add Bot User.

Add bot user

1. On the App settings page, choose Basic Information, view “App Credentials”, and write down the “Client ID” value.

App Credentials

2. On the App settings page, choose OAuth & Permissions, click Add a new Redirect URL, enter a redirect url, click Add, and then click Save URLs.

Format of the redirect url: https://kefu.easemob.com/v1/slack-channels/oauth/callback/{tenantId}/{clientId}

  • tenantId: your tenant ID on Hyphenate Customer Engagement Cloud. To find it, go to “Admin Mode > Settings > Company”.
  • clientId: Client ID of your Slack App. To find it, go to “Basic Information” on your App settings page (see Step 1).

Example of a complete redirect url: https://kefu.easemob.com/v1/slack-channels/oauth/callback/16038/19678373537.193968334981

Add a new Redirect URL

3. On the “OAuth & Permissions” page, select Permission Scopes and click Save Changes.

Set the following Permission Scopes:

  • bot
  • channels:history
  • groups:history
  • im:history
  • mpim:history
  • team:read
  • users:read

Select permission scopes

4. On the App settings page, choose Event Subscriptions, turn on the “Enable Events” switch, and add a request URL in the Request URL field.

Format of the request url: https://kefu.easemob.com/v1/slack-channels/events/callback/{tenantId}/{clientId}

  • tenantId: your tenant ID on Hyphenate Customer Engagement Cloud. To find it, go to “Admin Mode > Settings > Company”.
  • clientId: Client ID of your Slack App. To find it, go to “Basic Information” on your App settings page (see Step 1).

Example of a complete request url: https://kefu.easemob.com/v1/slack-channels/events/callback/16038/19678373537.193968334981

Add request URL

5. On the “Event Subscriptions” page, set “Subscribe to Bot Events”, and click Save Changes.

Subscribe to the following Bot Events:

  • message.channels
  • message.im
  • message.groups
  • message.mpim

Subscribe to bot events

After you save Event Subscriptions, the Verification Token is generated in the App Credentials area on the Basic Information page.

6. On the App settings page, choose Install App, and click Install App to Team.

Add App to your team

7. Confirm the authorization information, and click Authorize.

Authorize

At this point, Slack App is successfully installed into your Slack Team, and you can see you Slack Bot on the DIRECT MESSAGES list on your Team's homepage.

1. On the App settings page, choose “Basic Information” and go to “App Credentials”.

App Credentials

2. On another web page, log in to Hyphenate Customer Engagement Cloud, go to “Admin Mode > Channels > Slack”, and click Add Slack Account.

Slack channel account

3. Enter the account name, and copy Client ID, Client Secret, Token from the “App Credentials” of your Slack app to Hyphenate, and click Save.

1. Set the authorization address.

Authorization address format: https://slack.com/oauth/authorize?scope =bot&client_id={clientId}

  • clientId: Client ID of your Slack App. To find it, go to “Basic Information” on your App settings page.

Example of a complete authorization address: https://slack.com/oauth/authorize?scope=bot&client_id=19678373537.193968334981

2. In your browser, open the above authorization address, confirm the authorization information, and click Authorize.

Authorize ChatBot

When authorization is successful, you can send messages to ChatBot in your Slack Team and reply to the messages on Hyphenate Customer Engagement Cloud. The replies are sent through the ChatBot.

Slack channelsMessaging mode
Direct MessageCustomers send direct messages to ChatBot, and agents reply to the messages on Hyphenate Customer Engagement Cloud
Public ChannelCustomers send @chatbot messages, and agents reply to the @ messages on Hyphenate Customer Engagement Cloud
Private Channelsame as above
Group Direct Messagesame as above