Replying from Mattermost
Our Mattermost integration allows you to respond to messages from your customers directly from your self-hosted Mattermost instance.
All the API tokens used in this guide have been revoked and are no longer valid. Please keep all your API tokens a secret!
Getting started
On the Integrations page at the left side, find Reply from Mattermost and click the "Connect" button:
A modal should pop up that looks like this:
Your Mattermost URL
First, you'll need to fill in your Mattermost URL.
Your Mattermost URL is simply the URL at which your Mattermost instance is hosted. (If you don't already have Mattermost and want to try it, the easiest way to get your own instance set up is by deploying to Heroku: https://github.com/mattermost/mattermost-server#deploy-on-heroku)
For example, the URL we use for our Mattermost demo would be: https://papercups-mattermost-demo.herokuapp.com
Fill in your Mattermost URL here:
Getting a bot token
In order to get a bot token for Makassan, you may need to first enable bot accounts in your settings.
Enabling bot accounts
To enable bot accounts, you'll need to navigate to Menu > System Console > Integrations > Bot Accounts
.
First, open the menu and navigate to the System Console:
Then, navigate to the Bot Accounts subsection under the Integrations section.
Set Enable Bot Account Creation to true and hit the Save button at the bottom.
Creating a bot account
Next, set up your bot account by navigating to Menu > Integrations > Bot Accounts > Add Bot Account
.
First, open the menu and navigate to the Integrations:
On the Integrations page, navigate to Bot Accounts:
Click the "Add Bot Account" button:
Then, enter the following information in the Add Bot Account form:
Bot account details:
- Username:
papercups
(name this whatever you want) - Display Name:
Papercups
(name this whatever you want) - Role:
System Admin
(important!)
Click "Create Bot Account". That should lead you to this page:
Take note of the Token. This is the bot token which you should paste into Makassan:
Select a channel to reply from
If your bot token is working properly, you should now be able to select the channel from which you would like to reply to messages from Makassan.
As a best practice, it's good to set up a channel dedicated to responding to messages and nothing else.
Setting up an outgoing webhook
In order to reply to messages directly from Mattermost, you'll need to set up an outgoing webhook.
To do this, navigate to Menu > Integrations > Outgoing Webhooks > Add Outgoing Webhook
Once again, open the menu and navigate to the Integrations:
On the Integrations page, navigate to Outgoing Webhooks:
If you don't see this option, you may need to enable outgoing webhooks.
Click the "Add Outgoing Webhook" button:
Then, enter the following information in the form:
Outgoing webhook details:
- Title:
Makassan
- Description:
Webhook events for the Makassan integration
- Content Type:
application/json
(important!) - Channel: Should match the channel you chose above (important!)
- Callback URLs:
https://s1.makassan.com/api/mattermost/webhook
or REPLACE WITH YOUR SELF-HOSTED URL (important!)
Click Save. After creating the new outgoing webhook, take note of the Token.
Finally, copy the token into the Makassan UI:
Enabling outgoing webhooks
If you don't see an option for outgoing webhooks, you may need to enable it.
You can do this by navigating to Menu > System Console > Integrations > Integrations Management
and setting Enable Outgoing Webhooks set to true.
Testing the integration
From here, you can test sending messages through the chat widget to verify that they show up in your Mattermost channel.
In order to reply from Mattermost, simply reply to the message in a thread.