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
| Part | Purpose |
|---|---|
| Name and description | Identifies the rule in the list. Use something specific, such as “Billing — invoice paid”. |
| Event category | Groups related WHMCS events, for example Invoice or Ticket. |
| Events | One or more triggers within the category. Ctrl+Click selects several. |
| Conditions | Optional restrictions such as client group, order total, department, priority or subject text. |
| Provider | Select Stoat. |
| Provider settings | Format, colour, attributes, silent flag and an optional channel override. |
Common events
| Category | Useful events | Typical channel |
|---|---|---|
| Invoice | Invoice Created, Invoice Paid, Invoice Payment Reminder, Invoice Refunded, Invoice Cancelled | Billing |
| Order | Order Placed, Order Accepted, Order Pending, Order Fraud, Order Cancelled | Sales / Operations |
| Service | Service Created, Service Suspended, Service Unsuspended, Service Terminated, Service Upgrade | Operations |
| Domain | Domain Registered, Domain Renewed, Domain Transfer, Domain Expiring | Operations |
| Ticket | Ticket Opened, Ticket Replied, Ticket Closed, Ticket Department Change | Support |
| Client | Client Signup, Client Login, Client Password Change | Security / Audit |
| API | Custom API Trigger — for events raised by your own code | Anything |
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
#billingchannel.
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
#supportchannel.
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:
| Rule | Webhook | Colour |
|---|---|---|
| Invoices and orders | #billing override | #2ecc71 |
| Tickets | #support override | #e67e22 |
| Services and domains | provider default | #5865f2 |
| Login audit | #audit override | none, 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
- Save the provider once: the connection test posts a message using the configured webhook and sender identity.
- Trigger a real event covered by the rule — for example, mark a test invoice paid.
- Check the channel for the message.
- 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.