Datahub

How the Rules Engine works

The Rules Engine applies conditional transformations to your product data before it reaches any destination. Understand how rules, conditions, and actions work together, and when to use filter rules versus transform rules.

Last verified 29 Jun 2026

No results found

Try different keywords or browse all help articles.

    The Rules Engine lets you define exactly how your product data should look before Vendably sends it anywhere. You write rules that say "if this product matches these conditions, apply these changes", and Vendably runs them automatically on every import and every export. The data in your source is never altered; rules operate on a working copy used for distribution.

    Two types of rule

    Every rule is either a transform rule or a filter rule.

    Transform rules modify field values. When a product matches a transform rule's conditions, Vendably applies the rule's actions to that product's data. The product continues to be included in all feeds and destinations.

    Filter rules control which products are included. When a product matches a filter rule's conditions, Vendably excludes it from exports. Filter rules do not modify data; they gate what gets distributed. A product excluded by a filter rule still exists in your catalogue and can still appear in reports.

    Conditions: deciding which products a rule applies to

    Every rule has zero or more conditions. A rule with no conditions applies to every product.

    A condition evaluates a single field against a value using an operator. For example: brand equals "Acme", or price is less than 10, or description is empty.

    Operators

    Category Operators
    Text Contains, Does Not Contain, Equals, Does Not Equal, Starts With, Ends With
    Text (multi-value) Contains Any Of, Does Not Contain Any Of, Equals Any Of, Does Not Equal Any Of
    Numeric Greater Than, Greater Than or Equal, Less Than, Less Than or Equal, Between
    Presence Is Empty, Is Not Empty
    Pattern Regex Match
    Date Date Before, Date After
    Field length Field Length Greater Than, Field Length Less Than

    Multi-value operators accept a pipe-separated list (red|blue|green), letting you match against a set of values without writing multiple conditions.

    Combining conditions with AND / OR

    When a rule has more than one condition, each condition specifies how it joins with the result so far: AND (both must be true) or OR (either is sufficient). You can also negate any individual condition with NOT, which inverts that condition's result before it is joined.

    This lets you express precise targeting. For example: brand equals "Acme" AND category contains "footwear" AND description is empty. Or: title length less than 20 OR description is empty.

    Actions: what to do when conditions match

    Transform rules have one or more actions. Actions run in the order you define them, so the output of one action feeds into the next.

    Text actions

    Action What it does
    Set Value Replaces the field with a fixed value
    Append Adds text to the end of the field
    Prepend Adds text to the start of the field
    Replace Entire Value Replaces the field with a value that can include {{ field }} placeholders
    Find & Replace Replaces a specific substring within the field
    To Uppercase / Lowercase / Title Case Changes capitalisation
    Strip Whitespace Removes leading and trailing whitespace
    Truncate Cuts the field to a maximum character length
    If Empty, Set Value Sets a value only when the field is currently blank

    Numeric actions

    Action What it does
    Add / Subtract / Multiply / Divide Arithmetic on numeric fields
    Percentage Calculates a percentage of the field value
    Round Number Rounds to a specified number of decimal places

    Field combination actions

    Action What it does
    Concatenate Fields Joins multiple fields together with a separator into one field
    Merge Fields Combines fields using a template with {{ field }} placeholders
    Split Field Splits a field on a delimiter and writes the parts to named target fields

    Data mapping actions

    Action What it does
    Map Values Replaces specific values with alternatives using an inline mapping
    Lookup Table Maps values against a saved lookup table for larger value sets
    Extract via Regex Extracts a capture group from the field using a regular expression
    Set Custom Label Sets a custom label field (used for Google Ads custom labels 0-4)
    Exclude Product Marks the product as excluded in a transform rule; equivalent to a filter rule when you need the exclusion logic alongside other transforms

    Field placeholders

    Most value fields in actions support {{ field_name }} placeholders. Vendably resolves these from the product's current data at the point the action runs. For example, an Append action with value - {{ brand }} appends the product's brand to whatever field you are targeting. If the referenced field is empty or does not exist, the placeholder resolves to an empty string.

    Lookup tables

    A lookup table is a key-value map saved separately from any individual rule. Use a lookup table when you need to map many values, such as remapping your internal category codes to Google product categories, or replacing short brand abbreviations with full brand names.

    Rules using the Lookup Table action reference a saved lookup table by name. When the engine evaluates the action, it looks up the current field value in the table and replaces it with the mapped value. If the value is not found in the table, the field is left unchanged.

    Rule priority and execution order

    Rules run in priority order (lower number = earlier). When a product matches multiple rules, all of them apply in sequence. Actions from an earlier rule feed into later rules: if rule 1 sets title to a new value, rule 2 sees that new value when evaluating conditions or applying actions to title.

    You can organise rules into groups for readability; groups do not affect execution order.

    Rule scope: global or per source

    A rule can apply to all sources (global) or be scoped to a specific source. Scoping to a source is useful when different product sources need different transformations, for example if one supplier uses a different title format than another.

    When rules run

    Rules run at two points in the pipeline:

    1. After import: when a source syncs, Vendably runs all active transform rules against the imported products and stores the transformed data. This means the Rules Engine result is immediately visible in the product hub.
    2. At export: when generating a feed for a destination, Vendably re-runs the transform rules and filter rules on the latest product data so the destination always receives the most current transformed version.

    Testing rules before activating them

    Before activating a rule, use the built-in preview and test tools:

    • Single rule test: run the rule against a specific product to see the before and after state for each field the rule would affect.
    • Batch preview: run the rule across your full catalogue to see how many products would match and a sample of the changes.
    • Adhoc test: paste raw product data and test a condition or action inline without saving a rule.
    • Match count: see how many products in your catalogue currently match a rule's conditions.

    Rule libraries

    Vendably ships two pre-built rule libraries you can deploy to your account with one click:

    • Data normalisation library: a set of rules that standardise common data quality issues, such as stripping HTML from titles, fixing capitalisation, and removing duplicate whitespace.
    • General best-practice library: rules aligned to Google Shopping and other channel requirements, such as prepending brand to titles and ensuring condition is set correctly.

    Deployed rules are full copies you own and can edit. Updates to the library do not automatically update your deployed rules.

    See also