Help Center How to create Viber templates

How to create Viber templates

A Viber template is a pre-approved message text for one Viber business account, for example an order confirmation or a one-time code. The text contains parameters in double curly braces, such as {{order}} or {{pin}}, which are replaced with real values when a message is sent. The template is checked before it becomes Active, so prepare it in advance.

In SMSBAT Omni you create Transactional templates. Old Regex templates remain visible for reference but can no longer be changed.

Before you start

You need a Viber business account in your organization. Each template belongs to one account; if you send from several accounts, create the template for each of them.

Where to find the templates

In the left menu of omni.smsbat.com open Channels → Viber → Templates. The page Templates opens with the template list.

The yellow notice Regex templates are blocked says: “All actions for regex templates except viewing are now blocked. Please use other template types.” Regex templates are shown in the list with a different background and cannot be selected, edited or deleted.

Filters and buttons

Press Filters to show or hide the filter bar and Clear filter to reset it.

Filter or buttonWhat it does
SearchFinds templates by text.
OrganizationShows templates of one organization.
StatusShows templates in the selected status.
Template typeRegex or Transactional.
CategoryAppears when Template type is Transactional.
Generation TypeAuto generated or Created manually (applies to regex templates).
Regex TypeAI Regex or Created manually (applies to regex templates).
DateA date range.
ExportDownloads the filtered list as a CSV file.
Add TemplateOpens the form for a new template.

The list keeps your filters when you open a template and come back.

Table columns

ColumnWhat it shows
Template IDThe identifier of the template.
TemplateThe template text (the start of it; hover to see the whole text).
AccountThe Viber business account. Click the name or logo to open the account.
Business IDThe BM ID of the account.
Template typeRegex or Transactional.
CategoryShown when the list is filtered by Transactional.
StatusThe template status, see Statuses below.
Created byAI Regex or Auto generated for regex templates.
Created onThe creation date.
ActionsThe bin icon deletes a transactional template, see Delete a template below.

Click a row to open the template page.

How to create a template

Step 1. Open the form

On the Templates page press Add Template.

Step 2. Choose the account, category and language

FieldWhat to choose
AccountThe Viber business account the template is for.
CategoryOTP for one-time codes or Transactional for service messages. Banking, Delivery and Booking are marked Coming soon and cannot be selected yet.
LanguageThe language of the template text, from the full list of languages, for example “Ukrainian (uk)”.

All three fields are required; an empty field shows Field is required.

For the Transactional category the form checks how many templates the account already has. If the limit is reached, you see “Transactional template limit reached for this Viber account: N of M. Delete one of the templates to add a new one.” and Add Template stays inactive. If the check fails, press Try again next to the message.

Step 3. Write the template text

Type the message in Template text (up to 1000 characters; the counter is under the field). Mark every changing part with a parameter in double curly braces, without spaces inside: {{order_number}}.

The text must follow these rules:

RuleMessage if broken
Parameters are written as {{name}} with no spaces inside the braces.”Use a placeholder with double curly braces and no spaces inside; the variable name must be tightly wrapped by the braces”
The text starts with ordinary text, not a parameter. For Transactional it also ends with ordinary text.”Message must start and end with static text, not a variable”
There is a space before the first parameter.”Add space before first variable”
For Transactional: after the last parameter there is a space and at least one more character.”Text cannot end with a variable, add a space and at least one character after it”

An OTP template may end with the code parameter.

Example of a transactional template:

Your order {{order_number}} has been shipped. Track it in the app.

Example of an OTP template:

Your login code is {{pin}}

Step 4. Add the parameters

In the Parameters block press Add parameter for every parameter used in the text. Up to 8 parameters are allowed; the counter shows how many you have.

FieldWhat to enter
Parameter nameExactly the name used in the text, without braces. Latin letters, numbers and underscores only, up to 50 characters, every name unique.
Example valueA realistic example, up to 125 characters, for example 48213. It is required. Website links are not allowed (“Website links are not allowed”).

Tip: drag a parameter card with a valid name into the Template text field to insert {{name}} where you drop it.

For the OTP category the form adds the parameter pin automatically. Its name cannot be changed and it cannot be removed; fill in only its Example value.

Every parameter must appear in the text, and every parameter in the text must be in the list. Otherwise you see “All parameters must be used in the message, and every placeholder in the message must exist in the parameter list”. Use the bin icon to remove an extra parameter.

Step 5. Save the template

Press Add Template. If the account already has a template with the same text, you see “This template already exists. Are you sure you want to continue?”: press Confirm to create it anyway or Cancel to go back. When the template is created, the message Template added appears and the template list opens.

Need help? under the button opens the Viber template builder on developers.smsbat.com, where you can draft the text.

Statuses

StatusMeaning
Pending ApprovalThe template is waiting for review.
ModerationThe template is being moderated.
Sent to AIThe template was sent for an AI check.
Sent to ViberThe template was sent to Viber.
ActiveThe template is approved and can be used.
InactiveThe template is switched off.
HoldThe template is on hold.
DeclinedThe template was declined.
ClosedThe template is closed.
ArchivedThe template is in the archive.
DeletingThe deletion is in progress.
DeletedThe template was deleted.

The blue info icon next to the status means “Template will be live within 48 hours from submission date”.

Statuses are changed by the SMSBAT team. The buttons Send to AI, Send to Viber, Remove and the Activity Form block on the template page are available to SMSBAT administrators only.

Edit a template

  1. Click the template in the list. The template page opens; its title is the account name followed by “template”. The Template ID field at the top shows the template identifier.
  2. Change the fields and press Update Details. The message Template updated appears.

What you can change depends on the status:

StatusWhat can be edited
ActiveNothing. Update Details is inactive.
Pending ApprovalOnly the Example value of the parameters.
Any other statusEverything: category, language, text and parameters.

If the new text matches another template of the same account, you see the same “This template already exists…” question as when creating.

Delete a template

A transactional template that has a Template ID can be deleted:

  • in the list, with the bin icon in the Actions column;
  • on the template page, with Delete.

Confirm with Confirm in the window “Are you sure you want to remove?”. The message Successfully was deleted appears, and the template shows the status Deleting or Deleted. A template in these statuses can no longer be edited.

Using a template

An Active template can be used to send messages from its Viber account. Your developers pass the Template ID, the language and the parameter values through the API, see SMSBAT Core REST API. To send messages to a list of customers from the dashboard, use broadcasts.

Common questions

Why is Add Template inactive? The Transactional limit for this account is reached, or the limit check is still running or failed. Delete an unused template or press Try again.

I can’t choose Banking, Delivery or Booking. These categories are marked Coming soon. Use Transactional or OTP.

The form says the parameters don’t match the text. Check that each {{name}} in the text has a parameter with exactly the same name, and that there are no extra parameters. Names are case-sensitive.

Why can’t I edit my template? An Active template cannot be edited, and in Pending Approval only example values can be changed. Regex templates cannot be edited at all.

Can I use a link as an example value? No. Values starting with http://, https:// or www. are rejected with “Website links are not allowed”.

How long does approval take? The info icon next to the status says the template will be live within 48 hours from the submission date.