Viber

Introduction

Viber is a cross-platform voice over IP and instant messaging software — simple, fast, secure, and synced across all your devices. Through Viber, brands can engage with their customers with rich messaging that they can easily engage with.

MoEngage <> Viber

MoEngage and Viber integration via MoEngage Connectors allows you to leverage advanced segmentation, predictive capabilities, personalization, and triggering features to message your users on Viber via Viber Bot through the Viber APIs. 

Integration

Viber allows both promotional and non-promotional messaging to users as long your brand has secured users’ consent. You can only send messages to the users, who have subscribed your Viber bot. Users first message to the bot will automatically make them subscribed. These users needed not specifically subscribe to your bot. 

REQUIREMENT DESCRIPTION
Active Viber account

An Active Viber account on a platform which supports bots (iOS/Android).

This account will automatically be set as the account administrator during the account creation process.

Viber bot A Viber bot is required to use this integration. Learn about creating a bot here. Note: an active Viber account is needed to receive the login code to access the bot creation page.
Account authentication token A unique account identifier used to validate your account in all API requests. Once your account is created your authentication token will appear in the account’s edit info screen (for admins only). 
Setup account webhook

It needs to be done once during the account setup process to define your webhook and the type of responses you would like to receive.

Viber user ids

You will need to have users' IDs to send messages on Line.

Once a user subscribes to your Viber bot, you can access the user’s IDs through Viber Users APIs.

Note-

  • You can send personalised campaigns only to the users for which you have a user identifier (phone number).
  • Viber bot does not have phone number for your users by default. You can get the phone number in 2 ways -
    • You need to ask it explicitly from the user (by sending a broadcast message on Viber ID). 
    • You can access phone numbers directly, if you are a part of Viber's Business messages service. 

Step 1: Collect customer user IDs

To send messages in Viber, you need to collect your users' IDs to identify your user and interact with them consistently. User IDs are generated by Viber and can be used when interacting with Viber APIs

Step 2: Save user's Viber ID on MoEngage

Once you obtain a list of Viber user IDs, you will send them to MoEngage. 

  • If you have a user identifier such as phone number, you can add them on MoEngage as a viber_id - custom tracked user attribute/property (like phone number). You can save this data to MoEngage either using:
  • If you do not have any user identifier (meaning the user has not shared his personal details with your bot), you can upload them as Anonymous users.  

Step 3: Create Connector Campaign on MoEngage to send Viber Message

To create a connector campaign on MoEngage, 

1. Navigate to Create Campaign >> Connectors >> Custom and choose delivery type most suitable to your needs 

Screenshot_2022-02-21_at_10.48.46_PM.png

 

2. Choose Segment of users for whom viber_id exists (You can combine with other Segment criteria) 

3. On step 2 of the campaign, 

  • Select method as POST
  • Add Webhook URL as :
    https://chatapi.viber.com/pa/send_message
  • In Headers, use
    X-Viber-Auth-Token: <Account authentication token>

    The authentication token is generated upon bot creation. You can view it in the “edit info” screen of your Viber admin panel.

  • In Body, choose Raw and use the content depending on what kind of message type you want to send out. You can look at different types here. Screenshot_2022-03-17_at_4.43.38_PM.png

Here are few content samples for different message types:

Text Image Video

{
  "receiver": "01234567890A=",
  "min_api_version": 1,
  "sender": {
    "name": "John McClane",
    "avatar": "http://avatar.example.com"
  },
  "tracking_data": "tracking data",
  "type": "text",
  "text": "Hello world!"
}
        

Note- You can send up to 100 messages to a user in an hour without reply. The limit is reset when a user replies to a message. 

4. At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available on Step 2 of Create Connector Campaign

Screen_Shot_2022-02-22_at_11.12.42_AM.png

If your test user successfully receives the message, your set-up is good to go. You can go ahead and Publish the campaign.

 

Previous

Next

Was this article helpful?
1 out of 1 found this helpful

How can we improve this article?