Captive Portal

Message Templates

Message Templates define the content of automated messages sent to guests — welcome emails, SMS OTP codes, voucher delivery, account creation notifications, password resets, and expiry reminders. Each template is tied to a channel type and a trigger event.

'alt' => 'Dashboard overview', 'caption' => 'The default Kiwire dashboard layout', 'screenshot' => true, 'class' => '', ]) Drop images into: public/assets/img/docs/{page}/{filename} --}}
Image not uploaded yet public/assets/img/docs/message-template/overview.png
The Message Templates list — channel type badges, event labels, active status, and action buttons.

Template Types

Each template belongs to one of three delivery channels:

TypeConnector RequiredBody Format
emailSMTP ConnectorFull HTML (rich formatting via Quill editor)
smsSMS ConnectorPlain text (character counter shown)
whatsappWhatsApp ConnectorPlain text with WhatsApp formatting support (*bold*, _italic_)

A template is only active if its required connector is configured and enabled. If the SMTP connector is not set up, email templates exist but messages will not be sent when triggered.

Trigger Events

Each template is associated with a specific event that triggers it automatically. The system dispatches messages when these events occur:

EventWhen It FiresCommon Channels
welcomeImmediately after a new guest account is createdEmail, SMS, WhatsApp
otpWhen a guest requests an OTP code during SMS or WhatsApp loginSMS, WhatsApp
voucherWhen a voucher code is assigned or purchased by a guestEmail, SMS
topupWhen a top-up code is successfully redeemedEmail, SMS
reset_passwordWhen a guest requests a password reset from the portal login pageEmail
account_expirySent N days before the guest's account expiry date (configured in Settings)Email, SMS

Template Fields

FieldDescription
nameInternal label for this template. Not visible to guests.
typeDelivery channel: email, sms, or whatsapp.
eventThe trigger event this template handles. Only one active template per event per channel is used.
subjectEmail subject line. Email only — not applicable for SMS or WhatsApp.
bodyMessage content. HTML for email (Quill editor), plain text for SMS/WhatsApp.
is_activeEnable or disable this template. If disabled, no message is sent for this event on this channel.

Template Variables

Insert dynamic values into your template body or subject using double-brace variables. These are resolved at the time of sending and replaced with actual guest data.

VariableReplaced withAvailable in
{{username}}The guest's usernameAll events
{{fullname}}The guest's full nameAll events
{{email}}The guest's email addressAll events
{{password}}The generated or reset password (plain text)welcome, reset_password
{{otp}}The one-time password codeotp
{{code}}Voucher or top-up codevoucher, topup
{{expiry}}Account expiry date and timeAll events
{{tenant_name}}Your organisation's name (tenant display name)All events
{{reset_link}}The clickable password reset URLreset_password
{{profile_name}}The access profile name assigned to the guestwelcome, topup, voucher

Using a variable that is not available for the triggered event (e.g., {{otp}} in a welcome template) will result in an empty string being inserted. Always match variables to their appropriate events.

Email Editor (HTML)

Email templates use the Quill rich text editor. You can:

  • Apply headings, bold, italic, underline, and strikethrough formatting
  • Insert hyperlinks and images (images must be hosted URLs — inline base64 is not supported)
  • Create ordered and unordered lists
  • Set text colour and background colour
  • Switch to HTML source view to paste or write raw HTML directly

For best email deliverability and rendering across all email clients, keep your HTML simple. Avoid complex CSS, JavaScript, and multi-column grid layouts — use basic tables for multi-column structure if needed.

SMS & WhatsApp Editor (Plain Text)

SMS and WhatsApp templates use a plain-text editor with a live character counter displayed below the field. For SMS:

  • Standard GSM-7 encoding: 160 characters per single SMS segment
  • Messages longer than 160 characters are split into multi-part SMS (each segment billed separately)
  • Using non-GSM characters (e.g., emoji, certain accented characters) reduces the per-segment limit to 70 characters

WhatsApp templates support basic formatting: wrap text in *asterisks* for bold, _underscores_ for italic, and ~tildes~ for strikethrough.

Template Preview

Click Preview from the template action menu to render the template with sample data substituted for all variables. The preview opens in a modal and shows the email in a styled frame (for email type) or as plain text (for SMS/WhatsApp).

The preview uses placeholder values such as John Doe for {{fullname}} and 123456 for {{otp}} — this is for visual review only, no message is actually sent.

Multiple Templates per Event

You can create multiple templates for the same event and channel. Only the first active template for each event+channel combination is used. If you want to test a new template design, create it as inactive, then swap the active flags when ready.

Required Permissions

view-message-templates · create-message-templates · update-message-templates · delete-message-templates