TrustLens Pro Automation Rules: A Practical Playbook With Five Rules to Build First
Plugin Guides · TrustLens Pro
Five Automation Rules to Build First
You’ve seen the Automation Rules menu in TrustLens Pro. Then you opened it, saw a blank canvas, and closed it again. Here are five rule configurations — drawn from the fraud patterns that actually cost WooCommerce stores money — with the exact trigger, conditions, action, and cooldown for each.
There’s a gap that quietly costs stores money: the gap between seeing a risk and acting on it in time. TrustLens free is built to close the first half — it scores every customer from 0 to 100, sorts them into six segments, and shows you exactly which behaviors moved each score. But seeing a customer slide into the Risk segment at 11pm doesn’t help if nobody’s looking at the dashboard until Monday, and the fraudulent order has already shipped.
Automation Rules (a Pro feature) close the second half. They watch for the events you’d otherwise have to catch by hand — an order placed, a dispute recorded, a card-testing attack, a set of linked accounts surfacing — and take the action you’d have taken yourself, immediately, every time, without you being awake for it.
But here’s the catch nobody tells you: automation rules do nothing until you design them. The feature ships as an empty canvas. That’s correct behavior — TrustLens free deliberately never auto-blocks anyone behind your back, and Pro keeps that promise by never inventing rules for you. But it means the first time you open the Automation Rules page, you’re staring at a blank screen with no idea what a good rule looks like.
This playbook fixes that. Five rules, drawn from the fraud patterns that show up again and again in real WooCommerce stores. For each one you’ll get the exact trigger, the condition fields to set, the action, and a cooldown recommendation. Build these five and you’ll have a working automation layer in an afternoon — then you can adapt them to your own store from a known-good starting point instead of a blank one.
Why automation rules matter
Manual review works right up until it doesn’t. A store doing 30 orders a day can eyeball flagged customers. A store doing 300 can’t — and the orders that matter most (high-value, high-risk) tend to arrive at the worst times: overnight, during a flash sale, in the middle of a card-testing burst when your attention is already split.
The cost of the gap isn’t abstract. A serial returner who slips through for another month. A second chargeback that pushes your ratio closer to a Visa or Mastercard monitoring program. A stolen-card order that ships before you wake up. None of these are failures of detection — TrustLens saw all of them. They’re failures of timing. Automation rules are how you make the response as fast as the detection.
A note on who makes this plugin
TrustLens is built by Webstepper, who publishes this blog. This is a feature guide for a paid feature, so treat it as exactly that. The five rules below are genuinely the ones we’d build first — but you should configure them deliberately, test them against your own order history, and never enable a blocking or cancelling rule you haven’t watched run in inspector first.
The anatomy of a rule
Every TrustLens automation rule is three parts plus a guardrail. The short version is below; for every field and option, the TrustLens docs keep the full triggers reference, conditions reference, and actions reference.
- Trigger — the event that wakes the rule up. The rule editor offers fifteen, in four groups: trust signals such as Score Updated and Segment Changed; order events (Order Placed, Order Completed, Refund Processed, Dispute Recorded); fraud signals such as Linked Accounts Detected and Card Testing Attack; and customer status changes such as Customer Blocked.
- Conditions — the tests the customer or order has to pass before the rule acts. There are more than 40 condition fields, covering the customer’s history (trust score, segment, refunds, disputes, linked accounts, customer age), the order in front of you (order total, coupon total, payment method, countries, country mismatch) and, on Refund Processed only, the refund itself. Number fields take the usual comparisons; text and yes/no fields take only equals or not equals.
- Action — what the rule does when every condition passes. There are eleven. Eight work with any trigger: Send Email Notification, Add Admin Note, Add Tag, Remove Tag, Block Customer, Allowlist Customer, Flag for Review, and Send Webhook. Three act on the order itself, so they only pair with an order event: Hold Order, Cancel Order, and Require Verification.
- Cooldown — the guardrail. Once a rule has acted on a customer, the same rule won’t act on that customer again for an hour, so a burst of events doesn’t send you ten identical alerts. When a rule skips because of it, the inspector says so explicitly.
That’s the whole model. Trigger, conditions, action, cooldown. Every rule below is just a specific filling-in of those four slots.
How a rule is evaluated
When an event fires, TrustLens checks every enabled rule attached to that trigger, each on its own — rules sharing a trigger don’t override one another, and every one whose conditions pass will act. Conditions combine with AND only and are checked in order; the first one that fails ends the evaluation and becomes the reason the inspector records. There is no OR, so to act when either A or B is true, build two rules with the same action. When every condition passes, the action runs: order actions on the order that arrived with the event, customer actions on the customer’s record after a cooldown check. Ran, skipped, or failed, every evaluation leaves a row in the log.
Three details catch most first-time builders:
- There are two switches, not one. Each rule has its own “Rule is active” toggle, but nothing fires until the engine itself is on — the “Engine running” toggle at the top of the Automation screen, which starts switched off.
- Values must match exactly. Segment values are the lowercase keys (
vip,trusted,normal,caution,risk,critical), soSegment = Criticalsaves but never matches. Yes/no fields take1for yes and0for no. - Lifetime is not this order.
Total Order Valueis everything the customer has ever spent with you; the size of the order in front of you isOrder Total, which, like every order field, the editor only accepts on the four order events.
The cooldown window, and how to work with it
The cooldown is keyed to one rule and one customer: when a rule acts on a customer, that rule is suppressed for that customer for one hour, while other customers can still trigger it and other rules can still act on the same customer. It matters most on chatty triggers — Score Updated fires on every recalculation of a customer’s score.
- It only throttles customer actions. Hold Order, Cancel Order, and Require Verification act on an order and are never held back, so every qualifying order is handled. Order Placed fires once per order (a retried payment doesn’t fire it again), so the same order isn’t processed twice.
- The editor has no cooldown field. One hour is the default for every rule. A developer can change it with the
trustlens/automation/rule_cooldownfilter, which receives the rule being evaluated, so different rules can get different windows; returning 0 switches it off. - For one-shot actions, add a state condition. A rule that blocks or allowlists would otherwise match again once the hour is up. Adding
Is Blocked = 0(orIs Allowlisted = 0) makes it stop matching the moment the job is done — Rules 1 and 5 below do exactly this. And when you’re testing, a “Cooldown active” skip just means you need to wait out the hour or use a different customer.
Rule 1 — Block after a second lost dispute
The pattern: a customer files a chargeback, you lose it, and then it happens again. One lost dispute can be a genuine grievance or a confused buyer. A second lost dispute from the same customer is a different signal — it’s the strongest leading indicator of someone you should not be selling to, and every additional dispute drags your store-wide ratio toward a card-network monitoring program.
| Trigger | Score Updated |
| Conditions | Disputes Lost is greater than or equal to 2 and Is Blocked equals 0 |
| Action | Block Customer |
| Cooldown | The default hour applies, but Is Blocked = 0 does the real work: once the customer is blocked, the rule stops matching. |
Why not Dispute Recorded? That trigger fires when a dispute is opened, before you know the outcome, and Total Disputes counts every dispute filed. A loss is recorded later, and TrustLens then recalculates the customer’s score — which fires Score Updated, so this rule acts on the second loss itself. To act sooner, on a second dispute being opened, use Dispute Recorded with Total Disputes ≥ 2 instead, knowing some of those may still go your way.
This is one place where TrustLens Pro also offers a dedicated, non-rule path: the Advanced Chargeback Monitor includes an auto-block after lost disputes setting (off by default) that blocks a customer once they reach the number of lost disputes you choose, without you building a rule at all. Use whichever fits your mental model — the automation rule gives you more control over the conditions; the built-in setting is a single number. If you want the background on where dispute data comes from in the first place, TrustLens ingests chargebacks from Stripe and WooPayments automatically, which is what keeps the dispute counts — and this rule — current without manual entry.
Blocking a customer who already disputed
Blocking stops future orders from that email — it does not retroactively resolve the dispute you’re currently fighting. The order is what it is. This rule is about preventing the third and fourth disputes, not the second. Check one switch first: any block, automated or manual, only stops checkout while Enable Blocking is on in TrustLens Settings, and it starts off. Also worth a thought: a genuinely good customer can lose a dispute through no fault of their own (a confusing billing descriptor, a family member’s purchase). If your store has that risk, raise the threshold or add a trust-score condition (Trust Score below 30 covers the Risk and Critical segments under the default thresholds) so it only blocks customers who are also low-trust.
Rule 2 — Hold large orders from Caution-and-below customers
The pattern: a customer whose behavior has already pushed them into the Caution, Risk, or Critical segment places an unusually large order. The order value is what makes this worth a manual look — a $20 order from a shaky customer isn’t worth your time; a $400 one is. Holding (rather than blocking or cancelling) is the right reflex here: you’re not accusing anyone, you’re just buying yourself the chance to glance at the order before it fulfills.
| Trigger | Order Placed |
| Conditions | Trust Score is less than 50 and Order Total is greater than 150 |
| Action | Hold Order (places it on hold for manual review rather than letting it proceed to fulfillment) |
| Cooldown | Not applicable — Hold Order acts on the order, so the cooldown never throttles it. Every qualifying order is held. |
Under the default segment thresholds, Caution, Risk, and Critical are exactly the scores below 50 — and since conditions can’t be OR-ed, one trust-score test does the job of three segment rules.
Tune the $150 threshold to your store. The right number is roughly your average order value plus a margin — high enough that normal orders sail through, low enough that the orders worth a second look get caught. If you find yourself releasing nearly every held order, the threshold is too low or the segment net is too wide. This is the graduated-response philosophy in a single rule: rather than blocking outright, you can hold high-risk orders without blocking good customers and keep the human in the loop for the borderline cases. Before relying on it, place a matching test order through your own payment gateway and confirm it’s still on hold once payment has gone through.
Rule 3 — Alert the moment a Critical customer orders
The pattern: you have a small number of customers who’ve earned their way into the Critical segment — the worst 0–9 band of the trust score. You’re not necessarily ready to auto-block them (maybe they have legitimate orders mixed in, maybe you want eyes on it first), but you absolutely want to know the instant one of them places an order, so you can decide in minutes instead of finding out days later.
| Trigger | Order Placed |
| Conditions | Segment equals critical (lowercase — that’s how segment values are stored) |
| Action | Send Email Notification (leave the recipient blank for your TrustLens notification address, or enter a team inbox) — or Send Webhook for chat tools, as below |
| Cooldown | The default hour applies: at most one alert per customer per hour, so a run of orders from the same customer doesn’t flood your inbox. |
Two accuracy notes worth being precise about. First, TrustLens automation rules deliver alerts through Send Email Notification (the email names the rule and customer, with their trust score, segment, and a profile link) and Send Webhook. Slack needs one extra hop: its incoming webhooks expect a message text field, while TrustLens posts structured JSON (rule, trigger, trust score, segment), so point Send Webhook at a tool such as Zapier or Make, or a small endpoint of your own, that turns the payload into a Slack message. (Outgoing webhooks are HMAC-SHA256 signed by default and delivered in the background with automatic retry, so a momentary network blip doesn’t lose the alert.) Second: alerting is non-destructive, which makes Rule 3 the safest of the five to turn on first. Nothing gets blocked, held, or cancelled — you’re simply wiring up a tripwire.
Start with the alert-only rules
If you’re nervous about automation taking actions you can’t see, build the alerting rules first (this one, plus an alert on Linked Accounts Detected or Card Testing Attack). Run them for a week. Watch what they catch and how often they fire. Once you trust what the triggers and conditions are actually selecting, graduate the same logic into holding and blocking rules with confidence. The inspector (covered below) makes this learning loop fast.
Rule 4 — Cancel country-mismatch orders below trust 40
The pattern: an order arrives where the billing country and the shipping country don’t match, and the customer’s trust score is already low. Country mismatch on its own is a weak signal — plenty of legitimate people ship gifts abroad or travel. But country mismatch combined with a sub-40 trust score is a much stronger one, and it’s a classic shape for stolen-card and reshipping fraud. This is the one rule in the playbook aggressive enough to cancel rather than hold — and only because the two conditions together are specific enough to justify it.
| Trigger | Order Placed |
| Conditions | Country Mismatch equals 1 and Trust Score is less than 40 |
| Action | Cancel Order |
| Cooldown | Not applicable — Cancel Order acts on the order, so the cooldown doesn’t throttle it. Order Placed fires once per order, so the same order isn’t handled twice. |
Country Mismatch is only true when the order has a shipping country that differs from billing; an order with no shipping country (a digital download, say) never counts.
Cancelling is the sharpest tool — earn your way up to it
Cancel is the one action that visibly affects a real customer’s order, so it’s the one to be most careful with. Our honest recommendation: run this rule as a hold first, not a cancel. Watch the inspector for a couple of weeks to confirm it’s only catching what you intend. If every held order turns out to be fraud, switch the action to cancel. If even one was a legitimate traveler, keep it on hold and let a human make the call. The two-condition design is deliberately strict precisely so that, once validated, cancelling is defensible — but validate it on your own data first.
Rule 5 — Allowlist your VIPs so rules never touch them
The pattern is the inverse of the others: protect your best customers from your own automation. Your highest-value, longest-tenured buyers occasionally do things that look superficially risky — a large order, a return, a shipment to a second address. You never want a fraud rule to hold or cancel an order from someone who’s spent thousands with you over three years. Allowlisting pins a customer’s score at 100 in the VIP segment and stops negative signals from moving it, so Rules 2, 3, and 4 can’t match them — and checkout enforcement skips allowlisted customers, so even a Rule 1 block wouldn’t stop them.
| Trigger | Score Updated (so the rule re-checks whenever a customer’s standing changes) |
| Conditions | Segment equals vip and Is Allowlisted equals 0 (VIP is the top segment TrustLens assigns to your most trusted customers) |
| Action | Allowlist Customer |
| Cooldown | The default hour applies, but Is Allowlisted = 0 is what stops repeats — allowlisted customers stay in VIP and would otherwise match on every score update. |
A word of caution on this one, because it’s the rule most worth thinking twice about. Allowlisting is a strong, semi-permanent grant of trust — an allowlisted customer’s score is pinned at 100 and stops responding to behavior, so if one of your VIPs ever does go bad, the system won’t catch it until you manually remove them from the allowlist. Many stores prefer to allowlist VIPs by hand, deliberately, rather than automate it across an entire segment. If you do automate it, keep the condition tight (VIP only, never Trusted) and review your allowlist periodically.
On targeting customers by tag
Rules can add and remove TrustLens customer tags, but the condition list has no tag field, so a rule can’t be keyed off a tag — “allowlist everyone tagged VIP” isn’t expressible. Use the segment-based approach above, or allowlist hand-picked customers yourself. Either way, the inspector will tell you immediately whether your condition matched, so you can verify the behavior on a test customer before trusting it in production.
The validator and the inspector — your two safety nets
Two features make building rules far less nerve-wracking than it sounds, and they’re the reason a playbook like this is safe to follow. Both are confirmed parts of TrustLens Pro’s automation system.
The save-time validator
When you save a rule, TrustLens checks it before it ever goes live and blocks rules that can never fire. It catches unsatisfiable conditions, schema violations, trigger-state contradictions, invalid operators for a field type, and incomplete actions — and it tells you the specific reason inline, right next to the rule, rather than letting you publish something that silently does nothing. In practice, it refuses rules like these:
- Impossible comparisons — “greater than” on
Segment, orTrust Scoreabove 100. - Conditions that cancel out —
Trust Scoreabove 80 and below 30, orIs Blocked = 0on the Customer Blocked trigger, which only fires once the customer is blocked. - A trigger that can’t supply what the rule needs — Hold Order or an
Order Totalcondition on a trigger that carries no order; refund fields outside Refund Processed. - An action missing its input — Send Webhook without a valid URL, a tag action without a tag name, or an email recipient that isn’t an address.
This matters more than it first appears. The most dangerous automation bug isn’t a rule that does the wrong thing — it’s a rule you believe is protecting you that is actually a no-op. A condition that contradicts its own trigger, a comparison that can never be true: the validator catches these at save time, so you never get the false confidence of a rule that looks active on the list but never actually runs.
What it can’t know is whether a legal-looking value will ever occur — Segment = Critical with a capital C is a valid comparison, so it saves, and then never matches. That’s the gap the inspector covers.
The inline rule inspector
The inspector answers the single most common question store owners ask about any automation system: “why didn’t my rule fire?” For each evaluation, it records whether the rule ran or skipped — and when it skipped, it gives the exact reason. You’ll see entries like Cooldown active or Condition not met: trust_score > 50, so instead of guessing, you can read precisely why a given order didn’t trigger the action you expected.
Each rule’s panel shows its fire, success, error, and skip counts plus its ten most recent runs, each badged OK, SKIP, ERR, or QUEUED, with the reason under any skip or error. QUEUED is specific to webhooks: every other action runs as soon as the rule matches, but a webhook is handed to Action Scheduler (WooCommerce’s own background queue), with identical deliveries in a burst collapsed into one. If the receiver doesn’t answer with a success code, TrustLens retries three times — after one, two, and four minutes — and the outcome lands as a separate OK or ERR run, with the HTTP status or connection error on failure.
In practice, the inspector is how you tune every rule in this playbook. Build the rule, let it run against real traffic, then read the inspector to see what it’s selecting and skipping. If Rule 2 is holding orders you’d rather let through, the inspector shows you which condition let them in. If Rule 4 never fires, the inspector tells you whether it’s the country-mismatch test or the trust-score test that’s filtering everything out. It turns rule-tuning from guesswork into reading a log.
The order to build them in
If we were setting up a store from scratch, we’d build them in this order: Rule 3 (alert on Critical) and Rule 5 (allowlist VIPs) first, because they’re non-destructive and teach you how triggers and conditions behave. Then Rule 2 (hold large risky orders), watching the inspector for a week. Then Rule 1 (block on second lost dispute), since the threshold is conservative. Then Rule 4 (cancel country-mismatch) last and as a hold until the data proves it deserves to cancel. Safest actions first, sharpest action last.
What’s free vs Pro
To be completely clear about the line, since this whole playbook lives on the Pro side:
| Capability | Free | Pro |
|---|---|---|
| Trust scoring, six segments, all 8 detection modules | Included | Included |
| Seeing risk — dashboards, signals, customer profiles, manual block/allowlist | Included | Included |
| Chargeback tracking + ratio threshold alert | Included | Included |
| Automation Rules (all five in this playbook) | Not in free | Pro |
| Save-time validator + inline inspector | Not in free | Pro |
| HMAC-signed webhooks with async retry | Not in free | Pro |
| Advanced Chargeback Monitor + Auto-Block After N Lost Disputes | Not in free | Pro |
The mental model TrustLens is built around: free surfaces the risk; Pro acts on it. If you’re still on free and doing manual review, that’s a legitimate place to operate from — plenty of smaller stores never need automation. The moment manual review starts losing the race against your order volume is the moment this playbook earns its keep.
Common questions
Will building these rules block legitimate customers?
Only if you configure them to, and only after you enable them. Rules 2, 3, and 5 (hold, alert, allowlist) take no destructive action at all, and neither does Rule 4 if you run it as a hold first. The two that can block or cancel (Rules 1 and 4) are deliberately conservative: a second lost dispute, or a country mismatch combined with a sub-40 trust score. The recommended path is to watch every rule in the inspector before trusting it, and to run the sharpest rules as holds until your own data proves they should escalate.
What’s the difference between hold, cancel, and block?
Hold pauses a single order for manual review — the customer is unaffected and you decide. Cancel cancels that one order outright. Block acts on the customer, not the order — with Enable Blocking switched on in Settings, it stops that email from adding to cart or checking out on future visits, until you unblock them. As a rule of thumb: hold when you want a human to look, cancel when the order itself is clearly bad, block when the customer is the problem.
How do I send alerts to Slack specifically?
Use the Send Webhook action with a go-between: Slack’s incoming webhooks expect a message text field that TrustLens’s structured JSON payload doesn’t carry, so send it to Zapier, Make, or a small endpoint of your own that formats the message for Slack. TrustLens signs, queues, and retries the delivery. (Note: the dedicated Slack/email alert dispatcher built into Card-Testing Defense Pro is a separate feature for card-testing attack events — for general automation-rule alerts, the webhook action is the path.)
Why did my rule not fire?
First check that the engine is running (the toggle at the top of the Automation screen) and the rule itself is active. Then open the inline inspector. It logs every evaluation and, for skipped ones, gives the exact reason — Cooldown active, or Condition not met: followed by the specific condition that failed. If the failing condition looks right, check the value’s spelling and case: segment values are lowercase (critical, not Critical), and yes/no fields take 1 or 0. If a rule won’t even save, the save-time validator will have told you why inline — usually an unsatisfiable condition or an incomplete action.
Do I need Pro to see risky customers at all?
No. All trust scoring, all six segments, all eight detection modules, the dashboards, the customer profiles, manual blocking and allowlisting, and chargeback tracking with a ratio threshold alert are in the free version. Pro adds the ability to act automatically on what free shows you — automation rules, the validator and inspector, signed webhooks, scheduled reports, the Advanced Chargeback Monitor, and Card-Testing Defense Pro. If you only want to see and decide manually, free is genuinely complete.
Key Takeaways
- Automation rules do nothing until you design them — the feature ships as a blank canvas on purpose. This playbook gives you five known-good starting points instead.
- Conditions are AND-only and match exactly; the cooldown throttles customer actions only — use lowercase segment values and
Order Totalfor the order in front of you, and add a state condition such asIs Blocked = 0so one-shot rules don’t repeat. - Build the non-destructive rules first — alert on Critical customers (Rule 3) and allowlist VIPs (Rule 5) take no risky action, so they’re the safe way to learn how triggers and conditions behave.
- Hold before you cancel or block — the graduated approach (hold large risky orders, Rule 2) keeps a human in the loop; reserve cancel (Rule 4) and block (Rule 1) for genuinely strong signals.
- The validator stops rules that can never fire — it catches unsatisfiable conditions and contradictions at save time, so you never get false confidence from a rule that’s secretly a no-op.
- The inspector answers “why didn’t my rule fire?” — every skipped evaluation logs an exact reason, turning rule-tuning from guesswork into reading a log.
- Automation Rules are Pro — trust scoring and manual review are free; Pro is what lets TrustLens act on the risk it surfaces, immediately and every time.
Turn Detection Into Action
TrustLens is free to install — all 8 detection modules, all six segments, no query limits. When manual review starts losing the race against your order volume, TrustLens Pro adds the automation rules in this playbook, the validator, the inspector, and the Advanced Chargeback Monitor.