541.201.9965 Support_Email
Home > Tools > DotFeed Rules

DotFeed Rules

Using Mapping Rules

Mapping rules allow DotFeed users to manage product attributes in bulk by applying attributes to filtered sets of products.

A single rule allows you to define a set of products for which a particular attribute applies. A rule consists of Criteria and a Result.

Note that italicized words can be found in the glossary at the end of this page.

Jump to a topic;

Anatomy of a Rule
Filters – Comparing an attribute to an operand
The “Matches” Operand
Filter Groups and Logical Operators
Result Modifiers

Anatomy of a Rule

At its most basic, a rule consists of Criteria and a Result. The criteria defines a product set on which you want to apply the result.

A rule result consists of a destination feed attribute and the value to associate with that attribute.

A rule’s criteria consists of a top-level filter group and nested filter groups. Each Group contains individual filters.

Filters – Comparing an attribute to an operand

A filter allows you to specify products based on a source attribute, an attribute operator, and an operand. Each filterwill resolve as either true or false. Note that the operands drop down (for example ‘matches’, ‘is equal to’, and ‘is greater than’) will change based on the data type of the source attribute that is selected for that filter.

Filter Example:

In the example above, “Product Name” is the source attribute, “Matches” is the attribute operator, and “*My Product*” is the operand.

Use the  button to add a new filter.

Use the  button to delete a filter.

Use the  grab button to move the current filter group up or down. Note that the rule filters apply top down, but thefilter groups apply from the bottom up.

The “Matches” Operand

Filters operating on strings will offer the operands “matches” and “does not match”. These operands are similar to ‘equals’ but they enable you to use tokens such as wildcard characters “*” (to match any set of characters) and “?” to match the single characters. For example, to find “bicycles” in an attribute you would match on “*bicycles*”. “bicycles*” would mean the attribute needs to start with “bicycles” but end with any string of characters. Note that the "*" wildcard special character also matches nothing. To match on any non-empty string, use “?*” (one character followed by any number of characters).

Filter Groups and Logical Operators

Filter groups allow you to apply either “AND” or “OR” operators to the children of that group (filters and sub filter groups). By creating nested filter groups you can easily apply OR logic to two AND groups. For example:

If a given product is in category “Mens Shoes” AND has the color “Black” OR is in category “Womens Shoes” and has the color “Black” then set its title to “Black Shoes”. Note that the order of operations is made clear by the filter groupsand that, in the above example, the AND operations will take place before the OR operation.

Use the  button to demote filters into a nested filter group.

Use the  button to promote filters up one level of filter groups.

You can use these in sequences to move the filters up and down as well within the filter group.

Result Modifiers

Result modifiers let you make rules that apply math operations to the final output of the price and sale price fields.

The allowed operations are add (+), subtract (-), multiply (*), and divide (/). To modify a product's existing price, you would enter {current} or {original}, the operator you want to apply, and a decimal value. For example, the rule pictured below would add $2.00 to the price of product 17:


Keep in mind that if you're using the {original} token, your first criteria in the rule must be price or sale price, as those are the only fields that can be properly modified this way. Also, please remember that currency is always formatted as ####.## through DotFeed. Customers whose sites use commas instead of periods as the decimal delimiter will need to remember to enter prices in the format above instead of as ####,##.


Source Attribute – An attribute from the data in your source feed.

Attribute Operator – The attribute operator defines how to compare a source attribute to an operand. E.g. “equals” or “is less than”.

Operand – The input field to which the attribute operator applies. Depending on the source attribute, this field may require a certain format (such as integer, decimal, or date).

Filter – Filters consist of a source attribute, an attribute operator, and an operand to determine if a product qualifies for the given rule.

Data Type – Data types include string, integer, decimal, date, and boolean. Each source attribute has a data type. The data type of the selected attribute determines what attribute operators to offer and how to validate the operand.

Filter Group – A logical grouping that holds filters and sub filter groups. Each group has a logical operator, “AND” or “OR”, to apply to its children. Filter groups can be nested up to 5 levels deep.

Tokens - There are 4 tokens you can use to represent data in your rules:

  • * means zero or more characters (this is known as a wildcard character)
  • ? means exactly one character (this is known as a wildcard character)
  • {original} means the value of the first source attribute in the current rule.
  • {current} means the cumulative value of the attribute in that result field.

See also

Was this information helpful?YesNo