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
| Tab | Goes to | Count |
|---|---|---|
| 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.
{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 4567is fine to type. - Maximum 255 characters for the whole field.
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
| Template | Sends when | Variables |
|---|---|---|
AcceptOrder | A client's order is accepted. | {firstname},{lastname},{orderid} |
AfterModuleChangePackage | A service's package is changed. | {firstname},{lastname},{domain} |
AfterModuleChangePassword | A service's password is changed. | {firstname}, {lastname}, {domain}, {username}, {password} |
AfterModuleCreate | A service is created and active. | {firstname}, {lastname}, {domain}, {username}, {password} |
AfterModuleSuspend | A service is suspended. | {firstname},{lastname},{domain} |
AfterModuleUnsuspend | A service is unsuspended. | {firstname},{lastname},{domain} |
AfterRegistrarRegistration | A domain is registered. | {firstname},{lastname},{domain} |
AfterRegistrarRegistrationFailed | A domain registration fails. | {firstname},{lastname},{domain} |
AfterRegistrarRenewal | A domain is renewed. | {firstname},{lastname},{domain} |
ClientAdd | A client account is created. | {firstname},{lastname},{email},{password} |
ClientChangePassword | A client changes their password. | {firstname},{lastname} |
DomainRenewalNotice | A domain is Days Before days from expiry (daily cron). | {firstname}, {lastname}, {domain},{expirydate},{x} |
InvoiceCreated | An invoice is created. | {firstname}, {lastname}, {duedate}, {total}, {invoiceid} |
InvoicePaid | An invoice is paid. | {firstname}, {lastname}, {duedate},{invoiceid} |
InvoicePaymentReminder | WHMCS sends its before-due invoice reminder. | {firstname}, {lastname}, {duedate} |
InvoicePaymentReminderFirst | WHMCS sends its first overdue notice. | {firstname}, {lastname}, {duedate} |
InvoicePaymentReminderSecond | WHMCS sends its second overdue notice. | {firstname}, {lastname}, {duedate} |
InvoicePaymentReminderThird | WHMCS sends its third overdue notice. | {firstname}, {lastname}, {duedate} |
TicketAdminReply | An admin replies to a ticket. | {firstname}, {lastname}, {ticketsubject} |
TicketClose | A ticket is closed. | {firstname}, {lastname}, {ticketno} |
Admin Templates
| Template | Sends when | Variables |
|---|---|---|
AdminLogin | An admin signs in to WHMCS. | {username} |
AfterRegistrarRegistrationAdmin | A domain is registered. | {domain} |
AfterRegistrarRegistrationFailedAdmin | A domain registration fails. | {domain} |
AfterRegistrarRenewalAdmin | A domain is renewed. | {domain} |
AfterRegistrarRenewalFailedAdmin | A domain renewal fails. | {domain} |
TicketOpenAdmin | A ticket is opened by an admin — for example, on a client's behalf. | {subject} |
TicketUserReplyAdmin | A client replies to a ticket. | {subject} |
UserLogin | A 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.
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.
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.