Understanding Rules

Rules in Xada allow you to automate changes across your product catalogue. Instead of manually updating products one by one, you can define conditions and actions that apply changes at scale.

Rules are commonly used for:

  • Assigning custom fields
  • Activating or deactivating products
  • Marking up options and additions
  • Updating product data
  • Cleaning up catalogue inconsistencies

How Rules Work

Every rule in Xada is made up of two main components:

1. Conditions (What products to target)

Conditions define which products the rule applies to.

For example:

  • Supplier = Trends
  • Category = Apparel / Headwear / Sunhats
  • Product Status = Active

Only products that match your conditions will be affected.

2. Actions (What to do to those products)

Actions define what happens to the matched products.

Examples include:

  • Assign a custom field
  • Deactivate products
  • Update product attributes

Using Operands (AND / OR)

Operands determine how multiple conditions are combined. They control how broad or narrow your product selection is.

AND

The AND operand requires all conditions to be true.

Example:

  • Supplier = Trends

    AND

  • Category = Sunhats

Only products that meet both conditions will be selected. This is the most precise and commonly used operand.

OR

The OR operand requires at least one condition to be true.

Example:

  • Category = Sunhats

    OR

  • Category = Caps

Products in either category will be selected. This is useful when targeting multiple groups of products at once.

Practical Example

A common use of operands can be seen in rules like:

Deactivate Discontinued Products & Products With No Categories

This type of rule may:

  • Use OR to capture multiple unwanted scenarios
  • Use AND to ensure only specific suppliers or product types are affected

When Rules Run

Rules are executed automatically:

  • After every product import
    • Supplier data feeds
    • CSV imports

This ensures your catalogue stays consistent without manual intervention.

Running Rules Manually

You can also run rules at any time:

  1. Go to the Rules page
  2. Click Run Rules to run all active rules; or
  3. Find a specific rule in the list, and click the "Run Rule" in the Manage column, to run that specific rule.

Rule Reversal (Undo Behaviour)

Rules in Xada are not permanent changes.

If a rule is:

  • Deleted, or
  • Modified so products no longer match its conditions

The changes previously applied by that rule will be automatically reverted.

Best Practices

  • Use AND for precise targeting
  • Use OR for broader selection across multiple groups
  • Always review Products Matched before running a rule
  • Start with smaller, controlled rules before scaling up
  • Use clear, descriptive rule names for easier management

Important Information

  • Rules operate on original data

Rules are evaluated against the original data provided by your supplier feeds or the initial product data created in Xada.

This means you cannot base rule logic on values that have been manually modified.

  • Example:

If a supplier feed sets Price 1 to $20 and you later update it to $50 via CSV or via the UI, the rule will still reference the original $20. Any markup applied by the rule will be based on $20, not the manually updated $50.

  • Rules do not run automatically upon creation

After creating or updating a rule, you must click Update & Run to apply it.

Once applied, the rule will then run automatically after future product imports.

  • Check for Manual Values Overriding Rules

Values entered manually or imported via CSV take precedence over values generated by rules.

If a field has been manually overridden, you'll see an orange badge next to it. This indicates that the rule's value is currently being overridden by a manual value.

If you want the rule to take effect again, click the orange badge to remove the manual override. If a rule applies to that field, its calculated value will be revealed and used instead.

  • Duplicating rules

You can duplicate an existing rule using the Duplicate button next to the edit option.

This creates a copy that you can modify without affecting the original rule.

Running a rule only once

If you want a rule to run a single time:

  • Run the rule manually
  • Disable the rule

Important:

Disabled rules should not be deleted, as deleting them will undo any changes previously applied to products.