Setup Mattermost

The following describes how to set up Mattermost for EasyChat.

The description was developed on a completely new Mattermost-Account. It can also be used if you have an existing account.

Please be aware, that we are switching between two different Mattermost-User. The sys-sdmin user and a technical user for EasyChat which must be created. The user is documented at the start of a paragraph.

Please be also aware, that you need the EasyChat Setting page to gain information for Mattermost and to add information into it from Mattermost. A description is available in that description.

Prerequisits

You need the following:

  • Mattermost-Account and installation (please see https://mattermost.com/)
  • EasyChat License (please see /easychat/)
  • A Mattermost user with sys admin rights (default user in newly created accounts)
  • The tech user for Mattermost must have an own EMail-Adress.

The EasyChat Settings Page

The EasyChat-setting page is located here. You need to login with the given EaysChat-Id and EasyChat-Key.

Mattermost

Create a channel

With your given Mattermost user you can create a public channel in Mattermost.

createnewchannel.png

Select the “+” button near to your team name above to the right and select “Create New Channel”.

createnewchannelwindow.png

The name can be freely chosen.

Mandatory: The channel must be a “public” channel, visible to all of your team member. Needed functionality of Mattermost is only available for a “public” channel.

Select “Create Channel” to add the channel to your team.

mmdesktop.png

Create the EasyChat Bot User

This must be done with a sys-admin user.

invite.png

The tech user for EasyChat is created via a user invitation like all any other user.

Select “Invite member” on the right

Add the EMail-address of the EasyChat user.

Select “Invite” and “Done”.

inviteemail.png

The technical user gets an EMail with the content above.

Select “Join now”. You will forwarded to the Mattermost register page in a browser.

mmgetstarted.png

In this browser window you can register the new technical user. The setting can be choosen freely.

Allow Access Token Authentication for the EasyChat Bot User

This must be done with a sys-admin user.

EasyChat needs an AccessToken-Authentication to allow an API-communication. This kind of authentication is disabled by default.

manageroles.png

Select “System Console -> User”

Open the menu of you newly created EasyChat Bot User and select “Manage Roles”

manageroleswindow.png

The user must be a “member”.

“Allow this account to generate personal access tokens” must be active.

Create an AccessToken as an EasyChat Bot User

This must be done as a logged in EasyChat Bot User.

profile.png

When logged in as the EasyChat Bot User, choose “Profile -> security” in the user menu above right.

profilewindow.png

Select “Personal Access Token”

personalaccesstoken.png

Create an access token. The name can be choosen freely.

personalaccesstokencopy.png

Please copy the generated token. You are not able to see the token again via Mattermost. If you lose a token, simply create a new one.

Add EasyChat Bot User to the Mattermost channel

This must be done with a sys-admin user.

easychatchannel.png

To add the EasyChat Bot User to the channel, select the channel on the left and select “Add Members”.

addpeople.png

Search for the name of the EasyChat Bot User and select the user.

Click “Add”

Add Webhook Outpost

This must be done as a sys-admin user.

The Outgoing Webhook is organizing the outgoing communication of the team member with the customer. It is a simple outgoing ApiCall where all of the messages added to the channel is forwarded to.

outgoingwebhook.png

Select “Integrations” in the main manu above left.

Select “Add Outgoing Webhooks”

outgoingwebhookadd.png

For the Outgoing Webhooks these settings are needed.

The name and the description can be choosed freely. All trigger settings should not be changed.

As the “Content-Type” choose “application/json”

As channel choose your newly created channel.

The Callback Url has “https://easychat.yotron.de/v1/chat/post/<your_easychat_id>”

easychatsetting.png

You find your “personal” url in the EasyChat setting.

outgoingwebhooktoken.png

Please store the token. Unlike the AccessToken, you are always able to see this token afterwards.

Setup EasyChat

With a proper configuration in Mattermost you are able to configure EasyChat. After login to the EasyChat Setting Page you find the following part.

easychatsetup.png

In the upper part you must setup the Mattermost connection for your EasyChat License.

Collaboration-Host Url

If you are using the cloud version of Mattermost the Host-Url has this template: “https://.cloud.mattermost.com”. But it can be different if you are using an own installation of Mattermost.

Collaboration-Channel-id

The Collaboration-Channel-id you find in the Channel menu under “View Info”.

mminfo.png

Collaboration Access Token

Here you must add the Access token of the EasyChat Bot User as mentioned above. The Access Token is only visible once after the creation of the user. You are not able to see the token after that.

Collaboration Bot User Id and Collaboration Bot User Name

Both you find in the main manu under “System console -> Users” mmuserid.png

Outgoing Webhook Token

Both you find in the main menu under “Integrations -> Outgoing Webhooks” outgoingwebhookinfo.png

Are you interested? Contact

Jörn Kleinbub

YOTRON GmbH is founded by Jörn Kleinbub. A consultant for data management, IT automation, DevOps and cloud management with experience in a wide range of project for a lot of different customers in different sectors.

Verlassen des Chats? / Leaving Chat?

Sie verlieren die aktuelle Chatkommunikation. / You are losing the current chat communication.

Ask YOTRON-AI about us, our services, our supported technologies or some organizational info. It will answer.

Send
Read the GDPR/DSGVO