Edits change the value that a rule's mapping type made. For example, you can remove HTML from a description, add the currency to a price, or shorten a title. Click Edit values on a rule to open the edits, and click Add edit to add one.
Feedsmith runs a rule's edits from top to bottom, and each edit works on the result of the one above it. Use the arrows to change the order. The order can change the result. For example, Recalculate and then Add suffix NZD gives 90.85 NZD, but Add suffix first and then Recalculate loses the NZD.
If an edit can't run, e.g. because a linked Google Sheet can't be reached or a regular expression has a mistake, Feedsmith skips that edit and leaves the value as it was.
Click Only apply if… on an edit to give it conditions. The edit then runs only for products that match, and the other edits still run as normal. Conditions work the same way as on rules. See Conditions.
For example, the edit Add suffix - Clearance with Only if tags includes clearance changes Merino Crew Tee to Merino Crew Tee - Clearance, but only on clearance products.
These boxes can include field values written as {{field}}:
Other boxes, e.g. Find and the lists and tables, are used exactly as typed. See Using field values in text.
Overwrite replaces the value with your text, whatever the value was.
Merino Crew Tee with the value {{vendor}} {{title}} gives Kiwi Outdoor Co Merino Crew Tee.Replace single value finds some text and replaces every place it appears.
$1 or \1 puts back the text matched by the first group in brackets, $2 the second, and so on. Upper and lower case don't matter, and . also matches line breaks.| Value | Find | Replace with | Regular expression | Result |
|---|---|---|---|---|
Merino Crew TEE | tee | T-Shirt | no | Merino Crew T-Shirt |
Shampoo 250ml | (\d+)ml | $1 ml | yes | Shampoo 250 ml |
Colour: Navy | ^colour: | (empty) | yes | Navy |
Replace multiple values runs a list of replacements, one after another.
old => new or old,new.Example with this table:
Gray => Grey Color => Colour
| Value | Result |
|---|---|
Color: Gray | Colour: Grey |
Graystone Beanie | Greystone Beanie |
Because old text also matches inside words, a short pair such as L => Large would also change Lime to Largeime. Use Replace single value with a regular expression such as \bL\b when you need to match whole words only.
Remove single value deletes every place some text appears, then tidies up double spaces and spaces at the ends.
| Value | Remove | Regular expression | Result |
|---|---|---|---|
Merino Crew Tee SALE | sale | no | Merino Crew Tee |
Merino Crew Tee (2024 range) | \(.*?\) | yes | Merino Crew Tee |
Remove multiple values deletes every value in a list, one after another.
| Value | List | Result |
|---|---|---|
NEW! Merino Crew Tee SALE | NEW! and SALE | Merino Crew Tee |
Remove duplicates removes repeated words and keeps the first one. Words are separated by spaces, and Feedsmith ignores upper and lower case and a , . ; or : at the end of a word when it compares them. It has no settings.
| Value | Result |
|---|---|
Merino Merino Crew Tee merino | Merino Crew Tee |
Kiwi Outdoor Co Kiwi Rain Jacket | Kiwi Outdoor Co Rain Jacket |
Add prefix puts text at the start of the value. If the value is empty, nothing is added, so you don't get a value that's only the prefix.
Merino Crew Tee with {{vendor}} gives Kiwi Outdoor Co Merino Crew Tee.Add suffix puts text at the end of the value. If the value is empty, nothing is added.
79.00 with {{currency}} gives 79.00 NZD.Recalculate does a sum with the number in the value.
1.15.79.00 NZD is read as 79. Commas are treated as thousands separators, so 1,299.00 is read as 1299. Use a full stop for decimals. The result has at least 2 and at most 4 decimal places. If the value has no number, or you divide by 0, the value stays as it was.| Value | Operation | Result |
|---|---|---|
79.00 NZD | Multiply by 1.15 | 90.85 |
19.99 | Multiply by 1.15 | 22.9885 |
100 | Subtract 10 | 90.00 |
The result has no currency, and channels such as Google need prices with at most 2 decimal places. So follow Recalculate with Round (2 decimals) and Add suffix NZD.
Recapitalize changes words in capitals or lower case to start with a capital letter and continue in lower case. Short words, e.g. "GPS" or "for", are left alone.
| Value | Setting | Result |
|---|---|---|
GPS TRACKER FOR DOGS | 3 | GPS Tracker FOR Dogs |
merino crew tee | 3 | Merino Crew tee |
merino crew tee | 2 | Merino Crew Tee |
Round rounds the number in the value. Halves round up.
| Value | Decimals | Result |
|---|---|---|
22.9885 | 2 | 22.99 |
22.5 | 0 | 23 |
79 NZD | 2 | 79.00 |
Strip HTML removes HTML tags, e.g. from a Shopify description.
& back into &, and joins everything into one line. When ticked, Feedsmith keeps the tags p, br, div, span, strong, b, em, i, u, ul, ol, li, sub and sup (without their attributes), removes all other tags, including headings and links, and keeps line breaks. This matches what DataFeedWatch does.| Value | Keep basic formatting | Result |
|---|---|---|
<p>Soft & <strong>warm</strong></p><ul><li>Merino</li></ul> | no | Soft & warm Merino |
<p>Soft <strong>warm</strong> merino</p> | yes | <p>Soft <strong>warm</strong> merino</p> |
Shorten cuts a value that is longer than a number of characters.
| left at the end.| Value | Max length | Word boundary | Result |
|---|---|---|---|
Merino Crew Tee - Navy - Medium | 20 | yes | Merino Crew Tee |
Merino Crew Tee - Navy - Medium | 20 | no | Merino Crew Tee - Na |
Merino Crew Tee | 20 | either | Merino Crew Tee |
UPPERCASE changes every letter to a capital. Merino Crew Tee gives MERINO CREW TEE.
lowercase changes every letter to lower case. In Stock gives in stock.
Trim whitespace removes spaces at the start and end, and changes any run of spaces, tabs or line breaks inside the value to one space. Merino Crew Tee gives Merino Crew Tee.