> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Viber

## Introduction

[Viber](https://www.viber.com/en/) is a cross-platform voice-over-IP and instant messaging software application that is secure, fast, and synchronized across all devices. Through Viber, brands can engage with their users using rich messaging with which they can easily interact.

## MoEngage and Viber

MoEngage and Viber integration allows you to leverage advanced segmentation, predictive capabilities, personalization, and triggering features to message your users on the Viber Bot through the [Viber REST Bot API](https://developers.viber.com/docs/api/rest-bot-api/).

## Use cases

The integration with MoEngage helps you with the following use cases:

* **Personalized Messaging:** You can send personalized messages to users based on their preferences.
* **Rich Media Content**: You can make messages more visual with images, videos, and files through Viber messages.
* **Automated Campaigns**: You can send messages automatically at scheduled times or trigger messages based on user actions.

## Methods to Send Messages via Viber Integration

You can send messages via Viber integration with the following methods:

* [Native APIs](#integration-via-native): You can use MoEngage campaigns to send messages using Viber APIs.
* [Infobip Connector](#integration-via-infobip): You can send messages to your Viber users using the Infobip connector.
* [8x8 Connector](#integration-via-8x8-connector): You can engage users on Viber using the 8x8 Chat Apps API. This connector allows you to send text, media (images, videos, files), and messages with call-to-action (CTA) buttons directly from MoEngage campaigns.

<h2 id="integration-via-native">
  Integration via Native
</h2>

<Info>
  **Prerequisites**

  * **Viber bot**: To use this integration, you must have a Viber bot. When sending Viber messages, your messages are associated with your Viber bot official, resulting in users seeing your bot details. For more information on creating a bot, refer to [Viber Partners portal](https://partners.viber.com/login).
  * **Active auth token**: An active Viber account that supports bots (iOS or Android). During account creation, the Viber account is set as the account administrator.
  * **Account authentication token**: This unique account identifier validates your account in all API requests. After you create the account, an authentication token will appear on your account's edit info screen (only for admins).
  * **Viber user IDs**: This unique ID is associated with each Viber user.\
    **Note**: After subscribing to your Viber bot, you can access the user's IDs through the [Viber Users API](https://developers.viber.com/docs/api/rest-bot-api/#get-user-details).
  * **Setup account webhook**: Define webhook and response preferences during account setup to configure message handling.
  * Viber is part of the Connected Channels add-on. Contact your dedicated MoEngage CSM (customer success manager) to enable it for your account.
</Info>

Viber allows you to send promotional and non-promotional messages to users, provided your brand has secured their consent. Users must have subscribed to your Viber bot to receive messages.

<Note>
  * After users send their first message to the Viber bot, they are automatically subscribed.
  * Personalized campaigns can only be sent to users if you have their user identifier (phone number).
  * The Viber bot does not assign a default phone number to users. You can obtain a phone number in two ways:
    * You must directly request it from the user by sending a broadcast message on their Viber ID.
    * You can access phone numbers directly if you are part of the Business Messages service of Viber.
</Note>

### Step 1: Connect Viber on the App Marketplace

To connect Viber on the App marketplace, perform the following steps:

1. On the left navigation menu in the MoEngage dashboard, click **App marketplace**.
2. On the App Marketplace page, search for **Viber**. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131833803284.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=afc19306f6d1cb0901ad5224d1c7ded2" alt="App marketplace search results showing Viber" width="2538" height="1358" data-path="images/partner_35131833803284.png" />
3. Click the **Viber** tile.
4. On the Viber page, go to the **Integrate** tab.
5. Click the + Add integration down arrow key and then click **Send messages (Native)**. <img src="https://mintcdn.com/moengage/Q5fGPh1IanYG_0OI/images/partner_42711159673620.png?fit=max&auto=format&n=Q5fGPh1IanYG_0OI&q=85&s=6a17c01005867ae674b22cb8e9e91589" alt="Integration dropdown with Send messages (Native) selected" width="2584" height="1392" data-path="images/partner_42711159673620.png" />
6. Enter the following details:

| Field                 | Required | Description                                                                                                                                                                                                                                                                                                               |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Connection name**   | Yes      | Name of the Viber connection.                                                                                                                                                                                                                                                                                             |
| **Viber Auth Token**  | Yes      | Your Viber Auth token. The authentication token is generated upon bot creation, and the account’s admins can view it on the “edit info” screen of their bot or on the Viber Admin Panel. For more information, refer to [Authentication token](https://developers.viber.com/docs/api/rest-bot-api/#authentication-token). |
| **Sender Name**       | Yes      | The sender’s name to be displayed.                                                                                                                                                                                                                                                                                        |
| **Sender Avatar URL** | No       | This is the sender’s avatar URL. **Note**: The avatar's maximum size must not exceed 100 KB. The recommended resolution is  720x720 pixels.                                                                                                                                                                               |

<img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131834786068.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=61998050ffa7c02c2e8590640b4d41bf" alt="Native connection details form" width="1262" height="1126" data-path="images/partner_35131834786068.png" />

7. Click **Connect**. Your Viber connection is integrated.

#### Step 1.1: Collect users' Viber IDs

To send messages in Viber, you must collect your users’ Viber IDs to identify and interact with them consistently. Viber users' IDs are generated by Viber and can be used when interacting with [Viber APIs](https://developers.viber.com/docs/api/rest-bot-api/#send-message).

#### Step 1.2: **Save the Users' Viber IDs on MoEngage**

After obtaining a list of Viber users' IDs, you must add them to MoEngage as a **viber\_id**, a custom-tracked user attribute or property. You can do one of the following:

* Pass this data to MoEngage using the [User Data API](/api/user/track-user).
* Upload it using **User Imports** inside MoEngage.

### Step 2: Create a Viber Campaign on MoEngage

To create a campaign on MoEngage, perform the following steps:

1. On the left navigation menu in the MoEngage dashboard, click **Engage**, and then click  **Campaigns**
2. On the **All campaigns** page, click **+ Create campaign**.
3. On the **Create campaign** dialog box, under **Connected Apps**, click **Viber** and then click the most suitable delivery type. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131834786580.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=d27176770b31c9567e920cb8c231728d" alt="Create campaign dialog with Viber selected and delivery types" width="2880" height="1536" data-path="images/partner_35131834786580.png" />
4. Under **Select audience**, click **Filter users by**.
5. On the **User property** tab, select the segment of users for whom **Viber\_id** exists (you can combine it with other segment criteria).
6. In step 2 of the campaign creation (**Content**), select the native message connector and specify the content you want to send out. 
7. Enter the following details: <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131833805588.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=401c32297dd25bae4f1ce4e7c9b5da1b" alt="Native connector content configuration" width="512" height="1260" data-path="images/partner_35131833805588.png" />
   | Field           | Required | Description                                                                                                                                                                        |
   | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **Connector**   | Yes      | Select **Send messages (Native)** in this list.                                                                                                                                    |
   | **Connections** | Yes      | Select the connection that you added to the MoEngage App marketplace.                                                                                                              |
   | **Receiver ID** | Yes      | Type the Receiver ID. It is the recipient's unique Viber user ID. You can also use personalization here.                                                                           |
   | **Tracking ID** | Yes      | This allows the account to track messages and user’s replies. The sent tracking\_data value will be passed back with the user’s reply. You can enter a maximum of 4096 characters. |
8. Select the **Message type** to send. Supported types are **Text**, **Picture**, and **Video**. Based on the type, enter the fields in the sections below.

<Tabs>
  <Tab title="Text Message">
    If you select **Text**, enter the following details:

    | Field           | Required | Description                                                                                                                            |
    | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
    | Message Content | Yes      | Text of the message you want to send. You can also use personalization here. **Note**: You can enter a maximum of 7000/768 characters. |
    | Media URL       | No       | Leave this blank.                                                                                                                      |
    | Video Size      | No       | Leave this blank.                                                                                                                      |
    | Video Duration  | No       | Leave this blank.                                                                                                                      |
  </Tab>

  <Tab title="Picture Message">
    If you select **Picture**, enter the following fields:

    | Field           | Required | Description                                                                                                                                                                                                                                       |
    | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Message Content | Yes      | The description of your picture message. You can also use personalization here.<br />**Note**: You can enter a maximum of 7000/768 characters.                                                                                                    |
    | Media URL       | Yes      | This is URL of the image being sent. It must be a valid URL starting with *https\://* or *http\://*. The supported image types are .jpg, .jpeg, and .png. The recommended resolution is 800  x 800 pixels. You can also use personalization here. |
    | Video Size      | No       | Leave this blank.                                                                                                                                                                                                                                 |
    | Video Duration  | No       | Leave this blank.                                                                                                                                                                                                                                 |
  </Tab>

  <Tab title="Video Message">
    If you select **Video**, enter the following fields:

    | Field           | Required | Description                                                                                                                                                                                                                                                     |
    | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Message Content | No       | Leave this blank.                                                                                                                                                                                                                                               |
    | Media URL       | Yes      | This is URL of the video being sent. It must be a valid URL starting with *https\://* or *http\://*. It must supported video types are 3gp, m4v, mov, and  mp4. You can also use personalization here.<br />**Note**: The maximum allowed video size is 200 MB. |
    | Video Size      | Yes      | This is the size of the video in bytes.                                                                                                                                                                                                                         |
    | Video Duration  | Yes      | This is the duration of the video. This is required with a maximum limit of 180 seconds.                                                                                                                                                                        |
  </Tab>
</Tabs>

For more information, refer [here](https://developers.viber.com/docs/api/rest-bot-api/#send-message).

9. Your campaign is now ready to be tested and sent. Using the *Test* functionality, you can also test your connector configuration. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131833806612.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=4a512309df51a6aa14b68a7bfd8a156c" alt="Test campaign widget for the native connector" width="2454" height="312" data-path="images/partner_35131833806612.png" /> If your test user successfully receives the message, your setup is ready.
10. Publish the campaign.

***

<h2 id="integration-via-infobip">
  Integration via Infobip
</h2>

<Info>
  **Prerequisites**

  * **Viber Bot**: To use this integration, you must have a Viber bot. When sending Viber messages, your messages are associated with your Viber bot official, resulting in users seeing your bot details. For more information on creating a bot, refer [here](https://partners.viber.com/login).
  * **Infobip APIs**: This allows for a Viber connection to be established with a connected Viber bot, enabling access to Infobip APIs.
</Info>

### Step 1: Connect Viber on the App marketplace

To connect Viber on the App marketplace, perform the following steps:

1. On the left navigation menu in the MoEngage dashboard, click **App marketplace**.
2. On the App Marketplace page, search for **Viber**. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131833803284.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=afc19306f6d1cb0901ad5224d1c7ded2" alt="App marketplace search results showing Viber" width="2538" height="1358" data-path="images/partner_35131833803284.png" />
3. Click the **Viber** tile.
4. On the Viber page, go to the **Integrate** tab.
5. Click the +Add integration dropdown and then click **Send messages (Infobip)**. <img src="https://mintcdn.com/moengage/Q5fGPh1IanYG_0OI/images/partner_42711159677844.png?fit=max&auto=format&n=Q5fGPh1IanYG_0OI&q=85&s=5c4b957751a2dede1323abc031b37da5" alt="Integration dropdown with Send messages (Infobip) selected" width="2584" height="1392" data-path="images/partner_42711159677844.png" />
6. Enter the following details:
   | Field                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Required | Description                                                                                                                                                                                     |
   | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **Connection name**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Yes      | Name of the Viber connection.                                                                                                                                                                   |
   | **API Base URL**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Yes      | This is a unique API base URL provided by each Infobip client to identify the source of each API request. For more information, refer [here](https://www.infobip.com/docs/essentials/base-url). |
   | **API Key**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Yes      | It is your Infobip API key. For more information, refer [here](https://www.infobip.com/docs/essentials/api-essentials/api-authentication#api-key-header).                                       |
   | <img src="https://mintcdn.com/moengage/Wf9uoFrhUQOFSAMK/images/integrate.png?fit=max&auto=format&n=Wf9uoFrhUQOFSAMK&q=85&s=e61742448f2f8d3ffe32311aa3fda2c8" alt="Integrate" width="1456" height="1770" data-path="images/integrate.png" /> |          |                                                                                                                                                                                                 |
7. Click **Connect**. Your Viber connection is now integrated.

#### Step 1.1: **Collect Users' Viber IDs**

To send messages in Viber, you must collect your users’ Viber IDs to identify and interact with them consistently. Viber users' IDs are generated by Viber and can be used when interacting with [Viber APIs](https://developers.viber.com/docs/api/rest-bot-api/#send-message).

#### Step 1.2: **Save Users Viber IDs on MoEngage**

After obtaining a list of Viber users' IDs, you must add them to MoEngage as a **viber\_id**, a custom-tracked user attribute or property. You can do one of the following:

* Pass this data to MoEngage using the [User Data API](/api/user/track-user)
* Upload it using User Imports inside MoEngage.

### Step 2: **Create a Viber Campaign on MoEngage**

1. On the left navigation menu in the MoEngage dashboard, click **Engage**, and then click  **Campaigns**
2. On the **All campaigns** page, click **+ Create campaign**.
3. On the **Create campaign** dialog box, under **Connected Apps**, click **Viber** and then click the most suitable delivery type. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131834786580.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=d27176770b31c9567e920cb8c231728d" alt="Create campaign dialog with Viber selected and delivery types" width="2880" height="1536" data-path="images/partner_35131834786580.png" />
4. Under **Select audience**, click **Filter users by**.
5. On the **User property** tab, select the segment of users for whom **viber\_id** exists (you can combine it with other segment criteria).
6. In step 2 of the campaign creation (**Content**), select the send message Infobip connector and specify the content you want to send out.
7. Enter the following details:

<img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131833807892.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=6cf0085fb1da2dcf8c440cc9143de77a" alt="Infobip connector content configuration" width="494" height="1378" data-path="images/partner_35131833807892.png" />

| Field                  | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Connector**          | Yes      | Select **Send messages (Native)** in this list.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Connections**        | Yes      | Select the connection you added to the MoEngage App marketplace.                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Sender ID**          | Yes      | Type the Sender ID. This is a unique identifier of your Viber account. It can be alphanumeric or numeric. You can also use personalization here. <br />**Note**: You can enter a maximum of 11 characters.                                                                                                                                                                                                                                                           |
| **User mobile number** | Yes      | Type the user's mobile number. You can also use personalization here. **Note**: <ul><li>You must use the Distributed Ledger Technology (DLT) parameters to send SMS messages to phone numbers registered in India.</li><li>You must use the IYS regulations parameters to send SMS messages to phone numbers registered in Turkey.</li><li>You must use the use case-dependent parameters to send SMS messages to phone numbers registered in South Korea.</li></ul> |

8. Select the **Message type**: **Text**, **Image**, **Video**, or **File**. Based on the type, enter the fields in the sections below.

<Tabs>
  <Tab title="Text Message">
    If you select **Text**, enter the following fields:

    | Field             | Required | Description                                                                                                                                                                                                                              |
    | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Message           | Yes      | Content of the message being sent. You can also use personalization here. **Note**: You can enter a maximum of  1000 characters.                                                                                                         |
    | Button Text       | No       | This is the text that will appear on the action button. You can also use personalization here. It is required only if adding a button. **Note**: You can enter a maximum of 30 characters.                                               |
    | Button Action URL | No       | This is the URL users are directed to or the action performed when pressing the action button. You can also use personalization here. It is required only if adding a button.<br />**Note**: You can enter a maximum of 1000 characters. |
    | Media URL         | No       | Leave this blank.                                                                                                                                                                                                                        |
    | Video Duration    | No       | Leave this blank.                                                                                                                                                                                                                        |
    | Thumbnail URL     | No       | Leave this blank.                                                                                                                                                                                                                        |
    | File name         | No       | Leave this blank.                                                                                                                                                                                                                        |
  </Tab>

  <Tab title="Image Message">
    If you select **Image**, enter the following fields:

    | Field             | Required | Description                                                                                                                                                                                                                              |
    | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Message           | No       | Text to be displayed alongside the image. It is required when sending a message with a button and an image. You can also use personalization here.                                                                                       |
    | Button Text       | No       | This is the text that will appear on the action button. You can also use personalization here. It is required only if adding a button.<br />**Note**: You can enter a maximum of 30 characters.                                          |
    | Button Action URL | No       | This is the URL users are directed to or the action performed when pressing the action button. You can also use personalization here. It is required only if adding a button.<br />**Note**: You can enter a maximum of 1000 characters. |
    | Media URL         | Yes      | This is the URL of the image being sent. It must be a valid URL starting with *https\://* or *http\://*. The supported image types are .jpg, .jpeg, and .png. The recommended resolution is  800  x 800 pixels.                          |
    | Video Duration    | No       | Leave this blank.                                                                                                                                                                                                                        |
    | Thumbnail URL     | No       | Leave this blank.                                                                                                                                                                                                                        |
    | File name         | No       | Leave this blank.                                                                                                                                                                                                                        |
  </Tab>

  <Tab title="Video Message">
    If you select **Video**, enter the following fields:

    | Field             | Required | Description                                                                                                                                                                                                                                                  |
    | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | Message           | No       | Leave this blank.                                                                                                                                                                                                                                            |
    | Button Text       | No       | This is the text that will appear on the action button. You can also use personalization here.<br />**Note**: You can enter a maximum of 30 characters.                                                                                                      |
    | Button Action URL | No       | This is the URL users are directed to or the action performed when pressing the action button. You can also use personalization here. It is required only if adding a button.<br />**Note**: You can enter a maximum of 1000 characters.                     |
    | Media URL         | Yes      | This is the URL of the video being sent. It must be a valid URL starting with https\:// or http\://. The supported video types are 3gp, m4v, mov, and mp4. The maximum video size is 200 MB. **Note**: You can enter a maximum of 1000 characters.           |
    | Video Duration    | Yes      | This is the duration of the video, with a maximum limit of 180 seconds. You can also use personalization here. Example: `PT5S`                                                                                                                               |
    | Thumbnail URL     | Yes      | This is the URL of the thumbnail being sent. It must be a valid URL starting with *https\://* or *http\://*. The supported thumbnail types are .jpg, .jpeg, and .png. The recommended resolution is 800 x 800 pixels. You can also use personalization here. |
    | File name         | No       | Leave this blank.                                                                                                                                                                                                                                            |
  </Tab>

  <Tab title="File Message">
    If you select **File**, enter the following fields:

    | Field             | Required | Description                                                                                                                                                                                                                                                                                                                     |
    | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Message           | No       | Leave this blank.                                                                                                                                                                                                                                                                                                               |
    | Button Text       | No       | Leave this blank.                                                                                                                                                                                                                                                                                                               |
    | Button Action URL | No       | Leave this blank.                                                                                                                                                                                                                                                                                                               |
    | Media URL         | Yes      | This is the URL of the file being sent. It must be a valid URL starting with https\:// or http\://. Supported file types are .doc, .docx, .rtf, .dot, .dotx, .odt ,.odf, .fodt, .txt, .info, .pdf, .xps, .pdax, .eps, .xls, .xlsx, .ods, .fods, .csv, .xlsm, and .xltx.<br />**Note**: The maximum allowed file size is 200 MB. |
    | Video Duration    | No       | Leave this blank.                                                                                                                                                                                                                                                                                                               |
    | Thumbnail URL     | No       | Leave this blank.                                                                                                                                                                                                                                                                                                               |
    | File name         | Yes      | This is the name of the attached file being sent (file extension included). The supported file extensions are \*\\.(docx?\|dotx?\|xlsx?\|f?ods\|f?odt\|rtf\|odf\|txt\|info\|pdf\|xps\|pdax\|eps\|csv\|xlsm\|xltx)\$. You can also use personalization here.                                                                     |
  </Tab>
</Tabs>

For more information, refer [here](https://www.infobip.com/docs/api/channels/viber/viber-business-messages/send-viber-messages).

9. Your campaign is now ready to be tested and sent. Using the *Test* functionality, you can also test your connector configuration. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131833806612.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=4a512309df51a6aa14b68a7bfd8a156c" alt="Test campaign widget for the Infobip connector" width="2454" height="312" data-path="images/partner_35131833806612.png" /> If your test user successfully receives the message, your setup is ready.
10. Publish the campaign.

***

<h2 id="integration-via-8x8-connector">
  Integration via 8x8 connector
</h2>

<Info>
  **Prerequisites**

  Before configuring this connector, please ensure you have the following:

  * **8x8 Connect Account**: You must have an active 8x8 Connect portal account.
  * **Viber Channel Enabled**: Your 8x8 Subaccount must be provisioned for Viber. For assistance with provisioning your Viber channel, contact your 8x8 account manager or 8x8 support.
  * **8x8 API Access**: You must have access to generate an API Key and locate your Subaccount ID within the 8x8 Connect portal.
</Info>

### **Step 1: Connect Viber on the App Marketplace**

To connect the 8x8 connector on the App marketplace, perform the following steps:

1. On the left navigation menu in the MoEngage UI, click **App marketplace**.
2. On the App Marketplace page, search for **Viber**.
3. Click the **Viber** tile.
4. On the Viber page, go to the **Integrate** tab.
5. Click the **Add integration** down arrow key and then click **Send messages (8x8)**. <img src="https://mintcdn.com/moengage/Q5fGPh1IanYG_0OI/images/partner_42711159678484.png?fit=max&auto=format&n=Q5fGPh1IanYG_0OI&q=85&s=01920ccb872803fb90dc02502d00b69a" alt="Integration dropdown with Send messages (8x8) selected" width="2584" height="1412" data-path="images/partner_42711159678484.png" />
6. Enter the following details:
   | Field                 | Required | Description                                                                                                                                                                           |
   | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **Connection name**   | Yes      | A name for this connector instance. This is for your reference within MoEngage.                                                                                                       |
   | **8x8 Subaccount ID** | Yes      | This is your 8x8 Chat Apps API Subaccount ID. Log in to your 8x8 Connect portal, navigate to the **Channels** section under **Messaging App**s, and copy the **Subaccount ID** value. |
   | **8x8 API Token**     | Yes      | Your 8x8 Chat Apps API authentication token. Log in to your 8x8 Connect portal, navigate to the **API Keys** section, and copy the **API Key** to use as your token.                  |
7. After filling in the fields, click **Connect** to complete the connector setup. <img src="https://mintcdn.com/moengage/Q5fGPh1IanYG_0OI/images/partner_42711136446228.png?fit=max&auto=format&n=Q5fGPh1IanYG_0OI&q=85&s=616ad5b3f4ae27c9e844c2445baa836b" alt="8x8 connection details form" width="1326" height="1028" data-path="images/partner_42711136446228.png" />

### **Step 2: Create a 8x8 Connector Campaign on MoEngage**

To create a campaign on MoEngage, perform the following steps:

1. On the left navigation menu in the MoEngage UI, click **Engage**, and then click  **Campaigns**.
2. On the **All campaigns** page, click **+ Create campaign**.
3. On the **Create campaign** dialog box, under **Connected Apps**, click **Viber** and then click the most suitable delivery type. <img src="https://mintcdn.com/moengage/6TqgY-HweNast5mr/images/partner_35131834786580.png?fit=max&auto=format&n=6TqgY-HweNast5mr&q=85&s=d27176770b31c9567e920cb8c231728d" alt="Create campaign dialog with Viber selected and delivery types" width="2880" height="1536" data-path="images/partner_35131834786580.png" />
4. Under **Select audience**, click **Filter users by**.
5. On the **User property** tab, select the segment of users for whom **viber\_id** exists (you can combine it with other segment criteria).
6. In step 2 of the campaign creation (**Content**), select the 8x8 Viber connector and specify the content you want to send out.
7. Enter the following details: <img src="https://mintcdn.com/moengage/Q5fGPh1IanYG_0OI/images/partner_42711159682964.png?fit=max&auto=format&n=Q5fGPh1IanYG_0OI&q=85&s=38972b34709623d85e06e59d74964548" alt="8x8 connector content configuration" width="581" height="924" data-path="images/partner_42711159682964.png" />

<Tabs>
  <Tab title="Text Message">
    If you select **Text**, enter the following fields:

    | Field                       | Required    | Description                                                                                                                                 |
    | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Recipient Mobile Number** | Yes         | Enter the recipient's mobile number in the E.164 international format. The number must include the country code (for example, 14155552671). |
    | **Message Text**            | Yes         | This is the text content of the message. You can combine it with a CTA button.                                                              |
    | **Media URL**               | No          | Leave this blank (not applicable for Text message).                                                                                         |
    | **Video Content Details**   | No          | Leave this blank (not applicable for Text message).                                                                                         |
    | **Button Caption**          | Conditional | This is the title to display on the CTA button (for example, **Shop Now**). Required if **Button Action URL** is provided.                  |
    | **Button Action URL**       | Conditional | This is the destination HTTPS URL that the user will be redirected to when they tap the button. Required if **Button Caption** is provided. |
  </Tab>

  <Tab title="Image Message">
    If you select **Image**, enter the following fields:

    | Field                       | Required    | Description                                                                                                                                 |
    | --------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Recipient Mobile Number** | Yes         | Enter the recipient's mobile number in the E.164 international format. The number must include the country code (for example, 14155552671). |
    | **Message Text**            | No          | This is the text content of the message. You can combine it with the image and/or a CTA button.                                             |
    | **Media URL**               | Yes         | This is the public HTTPS URL for the image. This field is required if the **Content Type** is set to **Image**.                             |
    | **Video Content Details**   | No          | Leave this blank (not applicable for Image message).                                                                                        |
    | **Button Caption**          | Conditional | This is the title to display on the CTA button (for example, **Shop Now**). Required if **Button Action URL** is provided.                  |
    | **Button Action URL**       | Conditional | This is the destination HTTPS URL that the user will be redirected to when they tap the button. Required if **Button Caption** is provided. |
  </Tab>

  <Tab title="Video Message">
    If you select **Video**, enter the following fields:

    | Field                       | Required      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
    | --------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Recipient Mobile Number** | Yes           | Enter the recipient's mobile number in the E.164 international format. The number must include the country code (for example, 14155552671).                                                                                                                                                                                                                                                                                                                     |
    | **Message Text**            | No            | This is the text content of the message. You can combine it with the video and/or a CTA button                                                                                                                                                                                                                                                                                                                                                                  |
    | **Media URL**               | Yes           | This is the public HTTPS URL for the video. This field is required if the **Content Type** is set to **Video**.                                                                                                                                                                                                                                                                                                                                                 |
    | **Video Content Details**   | Yes           | This is required only when the Content Type is 'Video'. You must provide a JSON object with the following keys: <ul><li>`filesize`: (Integer). The size of the video file in bytes.</li><li>`duration`: (Integer) The duration of the video in seconds.</li><li>`thumbnail`: (String) A public HTTPS URL for the video's thumbnail image.</li></ul> For more information, refer [here](https://developer.8x8.com/connect/docs/usage-samples-viber/#video-only). |
    | **Button Caption**          | Conditional   | This is the title to display on the CTA button (for example, **Shop Now**). Required if **Button Action URL** is provided.                                                                                                                                                                                                                                                                                                                                      |
    | **Button Action URL**       | ConditionalNo | This is the destination HTTPS URL that the user will be redirected to when they tap the button. Required if **Button Caption** is provided.                                                                                                                                                                                                                                                                                                                     |

    Example **Video Content Details** JSON:

    ```json theme={null}
    {
      "filesize": 200000,
      "duration": 15,
      "thumbnail": "https://example.com/thumb.jpg"
    }
    ```
  </Tab>

  <Tab title="File Message">
    If you select **File**, enter the following fields:

    | Field                       | Required | Description                                                                                                                                 |
    | --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Recipient Mobile Number** | Yes      | Enter the recipient's mobile number in the E.164 international format. The number must include the country code (for example, 14155552671). |
    | **Message Text**            | No       | Leave this blank (not applicable for File message).                                                                                         |
    | **Media URL**               | Yes      | This is the public HTTPS URL for the file. This field is required if the **Content Type** is set to **File**.                               |
    | **Video Content Details**   | No       | Leave this blank (not applicable for File message).                                                                                         |
    | **Button Caption**          | No       | Leave this blank (Button is not supported for File message on this platform).                                                               |
    | **Button Action URL**       | No       | Leave this blank (Button is not supported for File message on this platform).                                                               |
  </Tab>
</Tabs>

### **Message Combinations**

The connector intelligently handles different combinations of content:

* **Text + Button**: Sends a text message with a CTA button.
* **Image + Button**: Sends a message containing an image and a CTA button.
* **Video + Button**: Sends a video or file message that also includes a CTA button.
* **Media Only**: To send a message with only an **Image**, **Video**, or **File**, select the **Content Type** and provide the **Media URL** (and Video Content Details, if applicable).

### **Analytics and Delivery Tracking**

The 8x8 Connector automatically tracks the delivery status of your campaigns. The following MoEngage events are created based on the API response from 8x8:

* **Connected App Campaign Sent**: This event is triggered when the 8x8 API successfully accepts the message request (receives a 200 OK response).
* **Connected App Campaign Failed**: This event is triggered if the 8x8 API returns any error (a response code other than 200), indicating the message could not be sent.

You can use these events to build analytics dashboards, track campaign performance, and set up follow-up actions.

# **Send a Viber Message to the Channel or Groups**

1. Create a new user in MoEngage to message a channel or group. Ensure the Viber ID here is your Channel or group ID.
2. Select the user by creating a segment for it. Ensure only one user is included in the segment. When multiple users are selected for the campaign, the message gets sent to the channel or group many times.
3. In Step 2 of Create Campaign, enter the Viber ID of your channel or group. You can also use personalization here.

# **Campaign Analytics**

MoEngage campaigns provide powerful analytics that allow you to analyze your campaign performances. Each channel in MoEngage provides in-depth metrics that help you quantify your campaign goals. For more information on the MoEngage Analytics functionalities, refer to [Campaign Analytics](/user-guide/campaigns-and-channels/connected-apps/analyze/connected-apps-campaign-analytics).

By default, we provide the following metrics for Viber campaigns:

* **Attempted**: After removing the users who breached the frequency capping (FC), *Attempted* is calculated as the number of users who qualified for the Viber campaigns and to whom we attempted to send messages.
* **Failed:** Number of users for whom Viber did not send any message or the users for whom we failed to find any value against the user or event attributes used in the campaign.
* **Successfully sent**: The campaign is marked as successful when Viber APIs accept the request to send the message to users/groups/rooms (with a 200 status code). For more information on Viber Message API responses, refer to their help documentation.
