Docs

Testing Rules with Order Daemon Pro

Learn how to test your automation rules instantly with Order Daemon Pro’s built-in testing tools, saving time and ensuring rules work correctly before going live.

Overview

Order Daemon Pro includes a Rule Tester that lets you test rules against existing orders without placing new test orders or waiting for real transactions. This helps you:

  • Verify rules work as expected before activating them
  • Debug why a rule didn’t trigger on a specific order
  • Fine-tune rule conditions to match exactly the right orders
  • Save time during rule development and troubleshooting

Getting Started

Prerequisites

  • Order Daemon Pro installed and activated with a valid license
  • At least one existing order in your store to test against
  • User account with WooCommerce management permissions

Finding the Rule Tester

  1. Go to Order Daemon → All Order Rules in your WordPress admin
  2. Create a new rule or edit an existing one
  3. Look for the “Test This Rule” panel in the right sidebar
  4. The panel shows a PRO badge to indicate it’s a premium feature

Note: If you don’t see the Test This Rule panel, verify that Order Daemon Pro is active and your license is valid.

How to Test a Rule

Step 1: Select an Order

In the “Select Order to Test” field, you can search for orders by:

  • Order ID: Type the exact order number (e.g., “12345”)
  • Customer Name: Type part of the customer’s name (e.g., “John” or “Smith”)
  • Order Total: Type an amount to find orders with that total (e.g., “150”)

The search will show recent orders with:

  • Order ID and status badge
  • Customer name and email
  • Order total (formatted in your store currency)
  • Order date

Use the arrow keys to navigate search results, or click to select an order.

Step 2: Run the Test

  1. Once you’ve selected an order, the “Test Rule Against Order” button becomes available
  2. Click the button to run the test
  3. The test runs instantly using your current rule configuration
  4. Results appear immediately below the button

Step 3: Review Results

The test results show:

Overall Status:

  • “Would trigger” – The rule matches this order and would run
  • “Would NOT trigger” – The rule doesn’t match, with details why

Component Details:

  • Each condition is listed with pass/fail status
  • Failed conditions show specific reasons (e.g., “Order total $75.00 is less than $100.00”)
  • You’ll see exactly which part of your rule prevented it from matching

Visual Feedback:

  • Failed conditions will briefly flash red in the main rule editor
  • This helps you quickly identify which settings need adjustment

Suggestions:

  • The system provides helpful suggestions for improving your rule
  • Examples: “Consider adding a product category condition to be more specific”
  • Use these suggestions to refine your rule for better targeting

Common Testing Scenarios

Testing a New Rule

When building a rule from scratch:

  1. Start with a broad rule – Add just a trigger and one simple condition
  2. Test against multiple orders – Try orders that should and shouldn’t match
  3. Gradually add conditions – Test after each addition to ensure it still works
  4. Fine-tune thresholds – Adjust amounts, quantities, or selections based on results

Debugging an Existing Rule

When a rule isn’t working as expected:

  1. Find a specific order that should have triggered the rule but didn’t
  2. Test the rule against that order to see exactly what failed
  3. Check each condition to identify the problem area
  4. Adjust the rule settings and test again to confirm the fix

Validating Rule Changes

Before activating a modified rule:

  1. Test against recent orders that the rule should have matched
  2. Test against orders it should ignore to prevent over-triggering
  3. Verify edge cases like minimum/maximum amounts or special product types

Understanding Test Results

Test Result Status

“Would trigger”

  • All conditions passed successfully
  • The rule would run and complete the order automatically
  • Safe to activate the rule on live orders

“Would NOT trigger”

  • At least one condition failed
  • Review the failed conditions to understand why
  • Adjust your rule settings before activating

Condition Results

Each condition in your rule shows:

  • Pass ✅: The condition matched the order
  • Fail ❌: The condition didn’t match, with specific details
  • Skip ⏭️: The condition wasn’t evaluated (usually if trigger failed)

Reading Failure Messages

Failure messages are specific and actionable:

  • “Order total $75.00 is less than $100.00” → Increase the minimum amount or lower your threshold
  • “No products match the selected categories” → Check if you selected the right categories or if the order contains different products
  • “Customer role ‘customer’ is not in allowed roles” → Add ‘customer’ to your allowed roles or check if the customer has a different role

Best Practices

Choice of Test Orders

  • Use recent, real orders from your store for the most accurate testing
  • Test with various order types (different products, amounts, customers)
  • Include edge cases like very small or very large orders
  • Test failed orders occasionally to ensure rules don’t trigger inappropriately

Testing Workflow

  1. Test frequently during rule development, not just at the end
  2. Document test results for complex rules (which orders worked/failed)
  3. Test rule interactions if you have multiple rules that might conflict
  4. Re-test after changes even small adjustments can have unexpected effects

Avoiding Common Mistakes

  • Don’t test only perfect scenarios – include orders that should fail
  • Check your trigger conditions – make sure the trigger itself would fire
  • Review order status – some conditions only work with specific order statuses
  • Consider timing – remember when during the order process yor rule would actually run

Troubleshooting

“Rule data not found” Error

  • Save your rule first before testing
  • The test needs the current rule configuration to be saved
  • Click “Save Draft” or “Update” then try testing again

No Orders Appear in Search

  • Check that you have orders in your store
  • Try broader search terms or search by order ID
  • Verify permissions. Ensure you can manage WooCommerce orders

Test Results Don’t Match Expectations

  • Verify order status: some conditions depend on specific order statuses
  • Review condition logic: “All conditions must pass” vs “Any condition can pass” vs “No conditions can pass”
  • Check product data: ensure categories, types, and other product data is correctly set

Flash Animation Not Working

  • Clear browser cache and reload the page
  • Disable browser extensions that might interfere with page features
  • Check for JavaScript errors in browser console (F12)

What’s Next

  • Activate your rule once testing confirms it works correctly
  • Monitor real results in Order Daemon → Insight Dashboard
  • Iterate and improve based on live order data and timeline entries
  • Build more complex rules using the confidence gained from thorough testing

Was this article helpful?

  • Loading...
Table of Contents
  • Loading...