Viber
Viber is a messenger app that allows you to send and receive messages, calls, and video calls.
To use Viber as an inbound channel, you need to:
Create a script
Dialog start
In Viber, only clients can begin the conversation with the bot. To make the dialog start on any first client phrase, add a global $TEXT
intent.
- Click Add screen → Create your own intent.
- Add
$TEXT
as an example phrase. - Activate Make the block available from any script point.
- Connect this intent with the welcome screen in your script.
From now on, the bot will start the dialog as soon as the client writes the first message.
Handling unpredictable client messages
To make the bot able to respond to client messages that are not intended in the script, add another intent and enter $TEXT
.
Connect the Other intents option with a block that will contain a response in case the client writes something unpredictable.
In this case, the global
$TEXT
intent configured to start the dialog won’t catch phrases from other screens and won’t transfer the dialog to the welcome screen.Set up the Viber service
First, you have to prepare your Viber account:
- Using your Viber credentials, log in to Viber Admin Panel.
- You’ll get a confirmation code right in the Viber app.
- In the Viber Admin Panel, click Create Bot Account.
- Load Account Image, the image that will be used in the bot profile and in the Dialogs section.
- Fill in the required fields.
- You can also fill in the fields that are not required.
- Accept the user agreement.
- Click Create.
- Receive and copy the token.
- It’s a letter-number combination that looks like this:
4a9a532197a7d267-1e8e559263524c09-d229ab2cb137d16b
. - You’ll need it to send and receive messages via the Viber server.
- It’s a letter-number combination that looks like this:
Publish the script
In your chatbot Channels settings, pick Viber from the list.
Fill in the fields:
- Channel name — you can change it or use the default one.
- Token — the token you copied earlier.
- Sender name — the name displayed as the bot’s name.
- Welcome message in the chat window — enable the toggle and write the greeting message that will show up right after the client opens the chat. The session will start after the client has sent their first message.
Click Connect.
Test your bot
Now test the bot by writing to it in Viber.