Adding Templates for Viber

To send broadcasts via Viber, you can use both custom and free templates (as well as free messages).

You do not have to register templates with Viber if you do not plan to create custom ones based on them and use them in broadcasts, so you can use free templates instead. However, if you have operator templates and custom ones based on them, sending messages using them will save you a lot of time, especially if you use the templates for service and informational messages.

Creating an Operator Template

An operator template is a text template for an operator (service provider) that includes the required syntax and regular expressions. You must first create an operator template and register it with the operator (Viber), and then you can use it to create custom templates to use for your broadcasts.

To add an operator template for broadcasts via Viber:

  1. On the Settings > Templates page, click Add template > Viber.
  2. In the Sender(s) field, select the sender’s name(s): this will be the name(s) that the clients will receive the messages from. The names reflected in this list are the names you specify for a Viber channel in the Name in English field. You can only select the sender name(s) of active channels.

  3. Ignore the Template ID field: this is a system field, it will fill in automatically upon saving the template.
  4. In the Template name field, enter the name of the new template.
  5. Select the Operator radio button. After you gave at least one operator template, you can create custom ones based on it.
  6. Specify the template category and language in the Select a category and Select a language fields, respectively. These fields are mandatory.

  7. In the Enter the template text and regular expressions (regexp) box, enter the text that you want to use for your broadcasts and add regular expressions, if necessary.
    In Viber, operator templates (and, consequently, custom templates based on the operator ones) can only contain text (no buttons, images, and files). However, Viber allows using regular expressions in its operator templates. A regular expression is a string of characters instead of which you can use any value, which makes your templates more flexible.
    A regular expression can be both a text and a variable used in edna. With variables, when the system sends the message based on this template, it fills in with a client’s name, their hobby, their pet’s name, or any other client’s information based on what you have as a variable and what you want to send in this message.
  8. To add a regular expression to a template, click the [] RegExp button and select the required element.



    For more information on how and what to use, expand the Regular Expressions and Rules for using symbols in the template sections of the Create Viber template page. You can also see examples in the Template Examples section.
  9. In the Enter the text of the sample message box, enter the text of the message based on what you entered in the Enter message text and regexp box. If you used regular expressions there, make sure the sample text exactly matches the template that you entered.
  10. If necessary, click Validate template to validate the template text in the Enter message text and regexp box.
For easier validation, we recommend that you use regular expressions based on the following instructions:

1. In your text in the he Enter message text and regexp box, do not use the following symbols: /! № # % . , : ; ? / ( ) + — “ ”― _ ‘ » ` & ^ ? { } [ ] < > / | ! @ # $ % ^ ( ) + = ~ *
2. Replace line breaks with spaces
3. Replace several consecutive spaces with one space

For registration, a Viber operator template must have no special symbols. However, if you create a custom template based on this one and use it to create messages, you can use these special symbols there.

For more details, refer to this document.

Take a look at the following screenshot for an example of the text with regular expressions and a sample based on it:

  1. Add a comment, if necessary.
  2. Review how the message looks in the message preview box. If everything is correct, click Sumbit to send it to Viber for verification and registration.
  3. If necessary, review the template status in the Status column on the Templates page. The template gets the Registration status first, then moves to the Active status once it’s registered with Viber. Once it has the Active status, you can start creating a custom template based on it or using it in your broadcasts.
You cannot use an operator template for broadcasts: for that, you need to create a custom template based on the operator one.

Creating a Custom Template

Once you have an Active operator template, you need to make a custom one based on it to be able to later use it for broadcasts. This might be useful if you used regular expressions in the operator template: you can replace them with actual text or variables, which will make your messages based on this template more flexible and personalized. With variables, templates will fill in with a client’s name, their hobby, their pet’s name, or any other client’s information you set up.

To create a custom template:

  1. On the Settings > Templates page, click Add template > Viber.
  2. In the Sender(s) field, select the sender’s name(s): this will be the name(s) that the clients will receive the messages from. The names reflected in this list are the names you specify for a Viber channel in the Name in English field. You can only select the sender name(s) of active channels.

  3. Ignore the Template ID field: this is a system field, it will fill in automatically upon saving the template.
  4. In the Template name field, enter the name of the new template.
  5. Select the Custom radio button.
  6. From the drop-down under the Custom radio button, select an operator template you want to use as the basis for your new template.



    The Registered template text box fills in with the text of the selected operator template.
  7. In the Enter text based on the template box, enter the text you want the message to contain. If there are regular expressions, you can either replace them with your own text, digits, punctuation marks, etc., or enter a variable by putting your cursor where you want the variable to be and clicking the { } button. The {{Select a variable}} element appears: click it and select the variable you need from the drop-down that opens, as shown in the following screenshot.



    This way, when you send a broadcast based on this template, your clients will receive personalized messages as the system will replace the variable with each of the clients’ names.
  8. Before moving further, make sure the text in the Enter text based on the template box matches the template given in the Registered template box.
  9. Add a comment, if necessary.
  10. Review how the message looks in the message preview box. If everything is correct, click Save (you don’t need to register a custom template).
  11. If necessary, review the template status in the Status column on the Templates page. As no registration is required for a custom template, the template immediately moves to the Active status, and you can start using it in your broadcasts.

Creating a Free Template

To save time while setting up broadcasts, you can also create a free template for Viber. A free template can have any content (including advertisement), as it does not have any requirements and you don’t need to register it with Viber.

To create a free template:

  1. On the Settings > Templates page, click Add template > Viber.
  2. In the Sender(s) field, select the sender’s name(s): this will be the name(s) that the clients will receive the messages from. The names reflected in this list are the names you specify for a Viber channel in the Name in English field. You can only select the sender name(s) of active channels.

  3. Leave the Template ID field: this is a system field, it will fill in automatically upon saving the template.
  4. In the Template name field, enter the name of the new template.
  5. Select the Free radio button.
  6. From the Select content type drop-down, select the type of content you want this template to contain and specify all the required details for this content in the corresponding fields that appear:
    • Text: Enter anything in text format. Like custom operators, free operators can use strings of characters as well that you can add using the { } button. If you want to use a variable as a string of characters, click the {{Select a variable}} element and select the variable you need from the drop-down that opens.
    • Image: Add a JPG, JPEG or PNG image by either uploading it from your workstation or inserting its link. The maximum image size is 25 MB.
    • Message with button: Embed a button into your message. Here you can also enter text with strings of characters and add a button to it. To do it:
      1. Enter the required text and select the variables in the Enter template text and variables box.
      2. In the Button name field, enter the name of the button.
      3. In the Insert link field, enter the link which will open when clicking/tapping the button.
        Optionally, add an image here as well.
    • File: Add a file by either uploading it from your workstation or inserting its link.

  7. Add a comment, if necessary.
  8. Review how the message looks in the message preview box. If everything is correct, click Save (you don’t need to register a free template).
  9. If necessary, review the template status in the Status column on the Templates page. The template immediately moves to the Active status, and you can start using it in your broadcasts.