Using it

Message templates

Twenty-eight messages, one per event, all editable. They arrive already written and already enabled, so the addon starts messaging clients as soon as it can send — go through them before you point it at a live API key.

Two tabs

TabGoes toCount
Client Templates The client the event happened to, on the phone number stored on their WHMCS profile. 20
Admin Templates Phone numbers you type in yourself, per template. 8

They save separately. Save All Templates on the Client tab writes the twenty client templates and nothing else; the Admin tab is its own save. There is a save button at the top and at the bottom of the list — they do the same thing, so you do not have to scroll back after editing the first one.

What each template gives you

  • Message — the text that gets sent. Maximum 240 characters, enforced as you type.
  • Variables — listed under the box. These are the only ones this template can use.
  • Enable — untick and this event never sends. Everything you have written is kept.
  • Days Before — only on the domain renewal reminder. See below.
  • Admin Phone Numbers — only on the Admin tab. See below.

Variables

A variable is written in braces and is replaced with the real value when the message is sent: Hi {firstname}, invoice {invoiceid} is due {duedate}.

The list under each box is fixed. You can drop variables you do not want and reorder the ones you keep, but you cannot introduce one that is not listed — an unlisted {something} is not recognised and goes out to the client as those literal characters. If you need a value that is not offered, it is not available to that template.

Some templates list variables their default wording does not use — the service suspension notice offers {firstname} and {lastname} even though the shipped text only mentions the domain. Those are available to you; add them if you want the message personalised.

Dates and money

{duedate} and {expirydate} are written using the Date Format from the Settings tab. {total} is the invoice total as WHMCS stores it.

The 240-character limit

The message box stops you at 240 characters. If a longer value gets in anyway — pasted past the limit, or an old template — the save is refused outright with the template named and the count shown, and nothing on that tab is saved. Shorten it and save again.

Remember the variables expand. {firstname} {lastname} is 21 characters in the box and can be far more on the wire, so a template close to the limit may still produce a longer message than you expect — and a longer SMS may cost more than one message.

Enabling and disabling

Every template ships enabled. Untick Enable and that event stops sending immediately after you save; nothing else about the template changes, and re-ticking it later resumes with the same wording.

This is the switch to reach for when a particular notification is unwanted or too noisy. There is no global off switch — to stop everything, either remove the API key or deactivate the addon.

Days Before, on the domain renewal reminder

DomainRenewalNotice is the only template with a lead time, and the only one not triggered by a WHMCS event. It runs from the WHMCS daily cron: each day it looks at every active domain and messages the client if the domain expires in exactly that many days.

  • A whole number from 1 to 365. The default is 15.
  • It is exactly that many days, not “within”. At 15, a client gets one message 15 days out — not one a day for the last fortnight.
  • The same number fills the {x} variable in the message, so the text and the timing can never disagree.

A blank or out-of-range value is rejected rather than stored: the rest of the tab saves, and a warning names the template whose stored value was kept. That is deliberate — an empty value would both stop the reminder and remove the field from this page, leaving no way back.

Admin Phone Numbers

On the Admin tab, each template has its own recipients — there is no shared list. An admin template with this field empty never sends, however it is otherwise configured.

  • Comma separated: +639171234567,+447911123456
  • Full international format, including the country code. Spaces are stripped when you save, so +63 917 123 4567 is fine to type.
  • Maximum 255 characters for the whole field.
A national-format number will not work here. These numbers have no client and therefore no country to interpret them against, so a number without its own country code cannot be resolved and is refused. 09171234567 is rejected; +639171234567 is sent. The refusal is per number — the other recipients on the same template still get the message.

Emoji

Emoji are fine in a fresh install. On an install upgraded from 3.9, saving one can fail until the tables have been migrated — deactivating and reactivating the addon runs that migration. See an emoji will not save.

The 28 templates

Client Templates

TemplateSends whenVariables
AcceptOrderA client's order is accepted.{firstname},{lastname},{orderid}
AfterModuleChangePackageA service's package is changed.{firstname},{lastname},{domain}
AfterModuleChangePasswordA service's password is changed.{firstname}, {lastname}, {domain}, {username}, {password}
AfterModuleCreateA service is created and active.{firstname}, {lastname}, {domain}, {username}, {password}
AfterModuleSuspendA service is suspended.{firstname},{lastname},{domain}
AfterModuleUnsuspendA service is unsuspended.{firstname},{lastname},{domain}
AfterRegistrarRegistrationA domain is registered.{firstname},{lastname},{domain}
AfterRegistrarRegistrationFailedA domain registration fails.{firstname},{lastname},{domain}
AfterRegistrarRenewalA domain is renewed.{firstname},{lastname},{domain}
ClientAddA client account is created.{firstname},{lastname},{email},{password}
ClientChangePasswordA client changes their password.{firstname},{lastname}
DomainRenewalNoticeA domain is Days Before days from expiry (daily cron).{firstname}, {lastname}, {domain},{expirydate},{x}
InvoiceCreatedAn invoice is created.{firstname}, {lastname}, {duedate}, {total}, {invoiceid}
InvoicePaidAn invoice is paid.{firstname}, {lastname}, {duedate},{invoiceid}
InvoicePaymentReminderWHMCS sends its before-due invoice reminder.{firstname}, {lastname}, {duedate}
InvoicePaymentReminderFirstWHMCS sends its first overdue notice.{firstname}, {lastname}, {duedate}
InvoicePaymentReminderSecondWHMCS sends its second overdue notice.{firstname}, {lastname}, {duedate}
InvoicePaymentReminderThirdWHMCS sends its third overdue notice.{firstname}, {lastname}, {duedate}
TicketAdminReplyAn admin replies to a ticket.{firstname}, {lastname}, {ticketsubject}
TicketCloseA ticket is closed.{firstname}, {lastname}, {ticketno}
The four invoice reminders follow WHMCS, not this addon. They ride on WHMCS's own invoice reminder automation, so when each one goes out — how many days before due, how many days after — is set in WHMCS under Automation Settings, and none of them fires at all if those reminders are switched off there. Enabling the template here only decides whether a message accompanies the reminder WHMCS was already sending.

Admin Templates

TemplateSends whenVariables
AdminLoginAn admin signs in to WHMCS.{username}
AfterRegistrarRegistrationAdminA domain is registered.{domain}
AfterRegistrarRegistrationFailedAdminA domain registration fails.{domain}
AfterRegistrarRenewalAdminA domain is renewed.{domain}
AfterRegistrarRenewalFailedAdminA domain renewal fails.{domain}
TicketOpenAdminA ticket is opened by an admin — for example, on a client's behalf.{subject}
TicketUserReplyAdminA client replies to a ticket.{subject}
UserLoginA client signs in to the client area.{firstname},{lastname}
TicketOpenAdmin fires only for tickets an admin opens. WHMCS raises a different event for a ticket a client opens, and this addon does not listen for it — so enabling this template will not notify you when a client submits a ticket. Client-side ticket activity that is covered: TicketUserReplyAdmin, when a client replies.
Two of these are noisy by default and both are enabled. AdminLogin and UserLogin send on every sign-in. On a busy install that is a message per login, each one billable. Decide about those two before you save an API key.
Three templates can put a password in a text message — ClientAdd, AfterModuleCreate and AfterModuleChangePassword all offer {password}, and the shipped wording uses it. SMS is not a confidential channel and the message will sit in the recipient's handset indefinitely. If that is not acceptable where you operate, remove {password} from those three.