Stoat Notificationsfor WHMCS · Documentation
v1.0.0

Notification Rules

WHMCS decides when to notify. The module decides how it looks and where it goes.


Where rules live

Rules are managed at Configuration → System Settings → Notifications. They are a WHMCS feature, not a module feature: any provider — Email, Slack or Stoat — can be selected per rule.

Rule anatomy

PartPurpose
Name and descriptionIdentifies the rule in the list. Use something specific, such as “Billing — invoice paid”.
Event categoryGroups related WHMCS events, for example Invoice or Ticket.
EventsOne or more triggers within the category. Ctrl+Click selects several.
ConditionsOptional restrictions such as client group, order total, department, priority or subject text.
ProviderSelect Stoat.
Provider settingsFormat, colour, attributes, silent flag and an optional channel override.

Common events

CategoryUseful eventsTypical channel
InvoiceInvoice Created, Invoice Paid, Invoice Payment Reminder, Invoice Refunded, Invoice CancelledBilling
OrderOrder Placed, Order Accepted, Order Pending, Order Fraud, Order CancelledSales / Operations
ServiceService Created, Service Suspended, Service Unsuspended, Service Terminated, Service UpgradeOperations
DomainDomain Registered, Domain Renewed, Domain Transfer, Domain ExpiringOperations
TicketTicket Opened, Ticket Replied, Ticket Closed, Ticket Department ChangeSupport
ClientClient Signup, Client Login, Client Password ChangeSecurity / Audit
APICustom API Trigger — for events raised by your own codeAnything

Event names vary slightly between WHMCS versions; the list in your installation is authoritative.

Worked examples

Billing — invoice paid

  • Category Invoice, event Invoice Paid.
  • No conditions, or a condition restricting to a high-value client group.
  • Provider Stoat, format Message + Embed, colour #2ecc71.
  • Override the webhook with the #billing channel.

Support — new ticket in a priority department

  • Category Ticket, events Ticket Opened and Ticket Replied.
  • Condition: department equals Technical Support, or priority greater than Medium.
  • Format Message + Embed, colour #e67e22.
  • Override with the #support channel.

Operations — service suspended

  • Category Service, event Service Suspended.
  • Format Message only to keep the channel compact.
  • Attributes inline, colour unused.

Audit — client and admin logins

  • Category Client, event Client Login, or the API event for admin logins.
  • Format Message only, Silent Message ticked.
  • No embed permission needed; useful for a low-noise security log.

Routing to different channels

The provider webhook is the default destination. A rule’s Webhook Override sends that rule somewhere else, which lets a single Stoat server host several WHMCS feeds:

RuleWebhookColour
Invoices and orders#billing override#2ecc71
Tickets#support override#e67e22
Services and domainsprovider default#5865f2
Login audit#audit overridenone, silent

Every webhook is validated with the same rules as the provider webhook, including the self-hosted host setting.

Conditions worth using

  • Client group — send VIP or enterprise activity to a separate channel.
  • Order total — only notify on orders above a threshold.
  • Department or priority — keep routine tickets out of the urgent channel.
  • Subject contains — flag words such as outage, fraud or refund.
  • Payment method — watch a specific gateway.

Testing a rule

  1. Save the provider once: the connection test posts a message using the configured webhook and sender identity.
  2. Trigger a real event covered by the rule — for example, mark a test invoice paid.
  3. Check the channel for the message.
  4. Check Utilities → Logs → Module Log, filtered by Stoat, for the request and HTTP status.

If your WHMCS version offers a test action on the rule itself, it uses the same code path. Otherwise a real event is the reliable test.

Overlapping rules — two enabled rules matching the same event send two messages. Review the rule list before adding a broad rule. Disable rules instead of deleting them; deletion is permanent.