Bots today are an essential part of Customer help services. With services used by millions of people, it’s difficult for Customer service people to handle all the problems addressed to them. Bots can be easily built and integrated into any services if you are using the Wayscript Platform. So today, we are going to build a Customer help Bot for Slack.
No prerequisites for this tutorial. However, you can read about the module we are going to use in this post.
When someone writes a message in the help channel, we’ll capture the message and perform actions on it, and later send a response. For this purpose, we’ll use the Slack Trigger.
Well, The trigger will depend on the action I add on the Slack channel. It’s a pinned message.
So basically we have three actions. But first, we have to configure the Trigger.
We want to receive actions in A, B or C.
For the output, be sure to have Slack_Message_Text selected. This variable contains the message the user sent.
Add it as a new module.
Once it’s done, click on Edit Code. We will write a script to perform actions on the Slack message we’ve received.
Here nothing complex. I used Switch expression for more visibility and simplicity. By default, if we have no valid option, we’ll just ask the user to provide the right message.
Click on Done Editing when finished. We’ll move the Slack Bot and configure it.
Wayscript provides a Slack module you can use to read or write messages. Then, we can use this module to create the Slack Help Bot.
Once it’s added and you have configured the workspace, be sure to have a separate channel for this bot. In my case, I called it help.
Now, we can add inputs. Most importantly, we need the name of the Bot and the message. You can add an image to if you want to give a face to your Bot. ;)
Great! The Bot is ready, and if you’ve followed exactly this tutorial, your result will look like this.