Slack Deployment via Custom App
Connecting Slack Channel via Custom App
Instead of setting up via Public App, you can also connect Slack Channel via Custom App.
Custom Slack App Setup
This section will help you setup a Custom App on WOZTELL for Slack. This app is necessary for setting up live chat/chatbot on Slack.
Before proceeding to the rest of the settings, please make sure you have a Slack workspace ready.
Add Features and Functionality
- Go to Slack web portal: https://api.slack.com/start and create an app for your Slack workspace. Add the following features and functionality: Interactive Components, Event Subscriptions, Bots and Permissions.
Interactive Components
- Head to "Interactivity & Shortcuts" under "Features" and enter the Slack webhook URL under Request URL in Interactive Components.
https://webhook.stella.sanuker.com/v2.1/slack
Event Subscriptions
- Head to "Event Subscriptions" under "Features" and switch on Enable Events and fill in the same Request URL.
- Subscribe the following bot events: message.channels, message.groups, message.im and message.mpim.
Bots
- Head to "App Home" under "Features" and select "Edit" under "App Display Name". Then, set the display name and default username of your bot.
Permissions
- Head to "OAuth & Permissions" under "Features" and generate OAuth Access Token and Bot User OAuth Access Token.
- Add permission by the following scopes:
Scope | Description |
---|---|
channels:read | Access information about user's public channels |
channels:write | Modify your public channels |
chat:write:bot | Send messages as BOT DISPLAY NAME |
groups:read | Access information about user's private channels |
groups: write | Modify your private channels |
im:read | Access information about user's direct messages |
im:write | Modify user's direct messages |
mpim:read | Access information about user's group messages |
mpim:write | Make changes user's group messages |
files:write:user | Upload and modify files as users |
bot | Add a bot user with the username @BOT_USERNAME |
users:read | Access your workspace's profile information |
users.profile:read | Access user's profile and workspace profile fields |
API Methods
- Go to API Methods and run methods "users.list" with your OAuth Access Token. You will find the id and team_id of the channel you want to deploy chatbot onto in the returned result.
WOZTELL Channel Setting
- Go to WOZTELL, select "Channels" at the top menu bar.
- Click "+New Channel" and name your new channel.
- Select Slack as your deployment platform, select Use Your Own App and fill in all the necessary information.
Find your custom app information after you have completed below procedures:
- For Bot ID & Team ID, please head to API Methods.
- For Bot User OAuth Access Token & OAuth Access Token, please head to Permissions
- For App ID, Signing Secret & Verification Token, you may locate them in your App's Basic Information the in Slack web portal, after you have created a Slack App.
Connecting Custom App to the Slack Workspace
- In your Slack workspace, create a new Slack channel by clicking the β+β sign near βChannelsβ. Then, click βCreate a channelβ. The channel is for you to receive live chat tickets or to structure your workspace into different channels by different departments/teams.
- Fill in the information for the new channel, toggle on βMake privateβ if you want to create a private ticketing group. Then click βCreateβ. For your reference, you can find your "Slack Channel ID" from the URL on the web browser. The URL should look like this.
https://app.slack.com/client/<Team ID>/<Slack Channel ID>
- Add your corresponding teammates who will be handling live chat enquiries to your newly created channel.
- In order to add your custom Slack app to Channel, select βiβ and then βMore". Then, select βAdd appsβ.
- Find the your custom Slack app you have previously installed to your workspace, i.e. you should be able to find WOZTELL or your custom app name and select "Add" to add into the ticketing channel.
- Select the menu of the channel again, you can see βView 1 app in slack channel nameβ, click to review if your custom Slack app is added to the Slack channel.
- You should be able to see the your Slack custom app you have added to Slack channel now. This channel is ready for live chat ticketing!
Pairing Channels
Please follow our guide to pair up your inlet and outlet channel.
Broadcast Group
Broadcast Group is where you can mark and label which channel to send out the live chat tickets out.
Please make sure you have completed Level one of the standard procedure of Slack Live Chat Tree setup before proceeding to this step.
Head to your WOZTELL Channel for Slack and select "Broadcast Group".
Find the Slack channel which you would like the live chat tickets to be sent out to and select it. It should be the channel you have created back in step 2.
You may toggle default or customize a label (the label can be setup in the sample codes for level one standard procedure
Click "Save" when you are done.
Live Chat Settings
Live Chat Settings is where you can set up your idle timer in live chat. For some messaging platforms like WhatsApp, there is a limitation of 24-hours conversation window. You may need this idle timer to send an automated message out to end the live chat when the time is up.
Please make sure you have completed Level two of the standard procedure of Slack Live Chat Tree setup before proceeding to this step.
Head to your WOZTELL Channel for Slack and select "Live Chat Settings".
Set your idle timer. The minimum interval you can select is 15 minutes.
Select the tree and node to execute when the time is up.
Click "Save".
You may also set up your Live Chat Settings following this guide: Automatic End Live Chat Function]
Adding Trees & Global Nodes
This section will cover the steps on how to add the ticketing commands (i.e. done or transfer live chat) to the WOZTELL channnel for Slack.
Please make sure you have completed Level two of the standard procedure of Slack Live Chat Tree setup before proceeding to this step.
Sample Tree Structure
Getting Hands-on
Select the "Tree" section in your WOZTELL Channel for Slack.
Add all the global nodes of each command under "Default".
If your commands are scattered in different trees, you may add multiple trees.
Click "Save" when you are done.