Compliance & RegulationsUpdated 6 min read

DLT Template Variables: Rules, Examples and Mistakes

Rohit Jadhav
Nexcomm Team

A DLT template variable is a placeholder, written as {#var#}, for the part of an SMS that changes from one recipient to the next, such as a name, an amount or a date. The regulation allows up to three variables in a template unless there is special justification, and each variable is limited to thirty characters. Keep the fixed text meaningful and put promotions in the fixed part, not in a variable.

By Rohit Jadhav. Last reviewed 25 October 2026. This is operational guidance, not legal advice. Portals apply the rules in their own way, so confirm details on your operator's portal.

A template is the exact wording of your SMS. Operators approve it once and then check every message you send against it. The only part allowed to change is the variable. Get the variables wrong and the template is rejected, or approved and later blocked when real messages do not match. This guide explains DLT template variables: what they are, the limits, how to write them and the mistakes to avoid. It is part of our main guide to DLT registration in India. For help with templates, Nexcomm's bulk SMS service includes template submission. More guides sit under Compliance & Regulations.

What is a template variable?

TRAI's regulation describes a content template as a combination of fixed content, which is common to all messages sent for the same purpose, and variable content, which may vary because it is specific to a particular transaction or recipient, or because it refers to a date, time, place or unique reference number. On the portals the placeholder is written as {#var#}. For example: "Hello {#var#}, your OTP is {#var#}". The words around the variables are fixed. The values go in the variables.

What are the rules on variables?

  • Up to three variables. A template may have more only on a request with reasons and proper justification, which the operator examines separately.
  • Each variable up to thirty characters. Where a value cannot fit in thirty characters, more than one contiguous variable of the same type may be allowed after examination.
  • Pre-tagging for special cases. If more than three variables are allowed, each variable is tagged for its purpose and may carry no other information.
  • At least thirty per cent fixed content in a template that has more than three variables.
  • One template, one header. A template is not linked to more than one header.

The first, second and last points are what you will meet in daily use. The regulation is long, so read the clauses on content templates or ask your provider which version the operator applies.

How do you write good variables?

  1. Put the purpose in the fixed text. "Your appointment at {#var#} is confirmed for {#var#}" tells the recipient what the message is, whatever the values.
  2. Use a variable only for what truly changes: a name, an amount, a date, a time, a reference number.
  3. Keep values short. A thirty-character limit rules out long product names or addresses.
  4. Do not hide a promotion in a variable. If you want to advertise, register a promotional template. See transactional vs promotional SMS.
  5. Do not put a link in a variable unless your portal allows it. Links are registered separately, as in URL whitelisting on DLT.
  6. Test with real values. A message that does not fit the template will be blocked.

What do good and bad templates look like?

TemplateProblem?
Dear {#var#}, your fee of Rs {#var#} is due on {#var#}.Fine: three variables, clear fixed text
{#var#} {#var#} {#var#} {#var#} {#var#}Too many variables, almost no fixed content
Hello {#var#}, {#var#}The second variable could carry anything, including a promotion
Your order {#var#} has shipped. Track it at {#var#}The link should be a registered, whitelisted link

What happens when messages do not match?

A message that does not fit its approved template is blocked at the check, and a block shows up as a delivery failure, not an error you can read. If a template keeps failing, compare a real message with the registered text character by character. We explain the other causes in DLT template rejected and what happens at the check in DLT scrubbing.

A worked example (hypothetical)

A school wants to send attendance alerts. This is an invented example. The first draft reads "{#var#} {#var#} {#var#} {#var#} {#var#}", with values filled in by software. It is rejected for having no meaningful fixed text. The school rewrites it as "Dear parent, {#var#} was marked absent on {#var#}. Please contact the school office." That is two variables and clear fixed text. It is approved, and real messages match it. Later the school wants to add an event invitation. It registers a separate template instead of squeezing the invitation into a variable.

Common mistakes with variables

  • Too many variables. More than three needs special justification.
  • Too little fixed text. The template says nothing without the values.
  • Hiding promotions in variables. It leads to rejection or blocking.
  • Long values. Thirty characters is the limit for each.
  • Sending values that do not fit the tag. Keep each variable to one kind of information.
  • One template for several purposes. Register one per purpose.

Frequently asked questions

What does {#var#} mean in a DLT template?

It marks a variable, the part of the SMS that changes for each recipient, such as a name, amount or date. Everything else in the template is fixed text that must match exactly.

How many variables can a DLT template have?

Up to three under the regulation. More is allowed only in special cases, with reasons and justification examined by the operator, and with each variable tagged for its purpose.

What is the character limit for a variable?

Thirty characters for each variable. Where a value cannot fit, more than one contiguous variable of the same type may be allowed after examination.

Links must be registered and whitelisted, as we explain in our guide on URL whitelisting. Ask your portal whether links in variables are accepted, and do not assume they are.

Why does my approved template still fail on real messages?

Because the real message does not match the template exactly. Compare the sent text with the registered text, including punctuation, and check that each value fits its variable.

Sources checked

All checked on 25 October 2026.

If you are drafting templates and want a second pair of eyes, you can reach our team through the contact page.

Tags
#DLT templates#SMS variables#TRAI#Bulk SMS#SMS compliance