Prepend Rule
How to prepend to a title in Merchant Center (Prepend rule)
Prepend is one of the most common operations: it adds specified content (usually an attribute, likebrand) to the very front of the target attribute’s existing value, keeping the original. Below: an intuitive example first, then when it “doesn’t fire”, then a live builder to test your own scenario.
What Prepend does
Assume the rule: when brand is not empty and title does not contain brand, Prepend {{brand}}.
| Original title (with brand) | Result |
|---|---|
| Nike / Air Max 270 | Nike Air Max 270 |
| Nike / Nike Air Max 95 | Nike Air Max 95 (condition intercept — unchanged) |
| Adidas / Ultraboost 24 | Adidas Ultraboost 24 |
When a Prepend rule doesn’t fire
- Source attribute empty. When the brand referenced by
{{brand}}is an empty string on that row, the template resolves to empty and Prepend results in no change. - Condition intercept. When “title does not contain brand” is false (the title already has the brand), the condition fails and the row is left untouched.
- Target empty. When the target attribute itself is an empty string, there’s nothing to prepend “in front of”, so the result is usually just the new value — probably not what you want.
- Chain overwrite. After Clearing that attribute, a later Prepend won’t act on it (Clear semantics).
Try it: prepend brand to title
The builder below is pre-filled with the prompt “Prepend the brand to the title only if it’s missing.” Click “Generate rule”, load sample data, click “Run simulation”, and you’ll see Before → After with per-row status.
Frequently asked questions
Prepend vs Set To?
Prepend inserts new content in front of the original value and keeps it ("Nike" + "Air Max" → "Nike Air Max"); Set To overwrites entirely and the original is lost. If your goal is “add something in front”, pick Prepend.
When does a Prepend rule not fire?
It only runs when every condition is met. Typical “doesn’t fire” cases: the referenced source attribute (e.g. brand) is empty, the target attribute itself is an empty string, or the condition logic (e.g. title already contains brand) doesn’t hold. RuleGen’s local simulation flags these no-op rows so you catch them early.
Which row does the {{brand}} in a Prepend value refer to?
It refers to the brand value on the BEFORE row — the product’s source brand. The simulator reads the template value from the BEFORE row, then applies it to the target attribute, avoiding cross-contamination between chained operations.