Adding Templates for SMS

To send broadcasts via SMS, 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 mobile operators that includes the required syntax and regular expressions. You must first create an operator template and register it with the corresponding operators, and then you can use it to create custom templates to use for your broadcasts.

To add an operator template for broadcasts via SMS messages:

  1. On the Settings > Templates page, click Add template > SMS.
  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 an SMS channel in the Sender name 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. In the Enter message text and regular expressions (regexp) box, enter the text that you want to use for your broadcasts and add regular expressions, if necessary.
    Along with simple text, you can use regular expressions in SMS 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.
  7. 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 Template examples sections of the Create SMS template page.
  1. 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.

  2. Click Check compliance to verify that the sample in the Enter the text of the sample message exactly matches the template text in the Enter message text and regular expressions (regexp) box.
  3. Add a comment, if necessary.
  4. Review how the message looks in the message preview box. If everything is correct, click Submit to send the template to the selected mobile operator for verification and registration.
  5. If necessary, review the template status in the Status column on the Templates page. The template gets the Registering status first, then moves to the Active status once it’s registered with the mobile operator(s). 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 based on what you have as a variable and what you want to send in the message.

To create a custom template:

  1. On the Settings > Templates page, click Add template > SMS.
  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 an SMS channel in the Sender name 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 whatever 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 of the sample message box matches the template given in the Registered template text 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. 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 create a free template for SMS messages. A free template can have any content (including advertisement) as it does not have any requirements, and you don’t have to register them with mobile operators.

To create a free template:

  1. On the Settings > Templates page, click Add template > SMS.
  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 an SMS channel in the Sender name 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 Free radio button.
  6. In the Enter template text and variables box, enter whatever text you want the message to contain. If necessary, you can enter variables by putting your cursor where you want a 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.

  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.