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.
Create Slack App
1. Open https://api.slack.com/apps in your browser, go to “Your Apps”, and click Create an App.
2. On the “Create an App” window, enter an App Name, select a Development Slack Team, and click Create App.
After you create an app, the app settings page is displayed.
Add Bot User
On the App settings page, choose Bot Users, click Add Bot User, set the bot user information, and click Add Bot User.
Install Slack App
1. On the App settings page, choose Basic Information, view “App Credentials”, and write down the “Client ID” value.
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
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
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
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
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.
7. Confirm the authorization information, and click 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.
Create Slack Account
1. On the App settings page, choose “Basic Information” and go to “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.
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.
Authorize Slack Bot
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.
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 channels | Messaging mode |
---|---|
Direct Message | Customers send direct messages to ChatBot, and agents reply to the messages on Hyphenate Customer Engagement Cloud |
Public Channel | Customers send @chatbot messages, and agents reply to the @ messages on Hyphenate Customer Engagement Cloud |
Private Channel | same as above |
Group Direct Message | same as above |