CLient Login
Feb 24 2016

Data Feed Optimizations, Tuning, and General Maintenance using VersaFeed Feed Modifications

Feed modifications are a fundamental subsystem within VersaFeed. These "feed mods" allow clients, agencies, and VersaFeed account managers to use advanced logic to manipulate product data feeds in almost any conceivable fashion.

Below are some example feed mods for common tasks:

Set

Set the value of a field to any number of constants and/or field values. Will completely overwrite the previous value of the field. Primarily used for appending values and setting default values for empty fields.
  • Prepend Brand to beginning of Title
  • Set Title Brand Title
  • Append Size and Color to end Title
  • Set Title Title Size Color

Set Multi-value

For setting fields with multiple values. Only applicable to certain fields which accept multiple values and still works when the field does not yet have a value.
  • Add "electronics" AdWords Label
  • Set Multi-value AdWords Labels electronics
  • Add Gender value AdWords Label
  • Set Multi-value AdWords Labels Gender

Unset

Remove the value of a field in the feed, leaving it blank or out of the feed (when applicable).
  • Unset the MPN field
  • Unset MPN
  • Unset the Shipping Cost field
  • Unset Shipping Cost

Find & Replace

Within a given field, find a constant or field value and replace with another constant or field value.
  • Replace "violet" with "purple" in titles
  • Find & Replace Title Violet Purple
  • Remove "Free Shipping" from descriptions
  • Find & Replace Description Free Shipping (empty)

Find & Replace (Regex)

Find & Replace functionality, but with the addition of regexes and capturing groups.
  • Find various "red" colors and replace all with Red. The (?i) means case-insensitive. The | (pipe) char acts as an "or".
  • Find & Replace (Regex) Title (?i)scarlet|ruby|crimson Red
  • Remove everything but the last leaf node of the Internal Category (AKA Product Type). \2 is the captured (.+) value which is the last leaf.
  • Find & Replace (Regex) Internal Category (.* > )(.+)$ \2

Change Case

Change the case of a field to: Sentence case, Title Case, UPPER CASE, or lower case.
  • Capitalize first letter of sentences in description
  • Change Case Description Sentence Case
  • Set MPN to all caps
  • Change Case MPN Upper Case

Change Case (Smart Title)

An enhanced version of Title Case with lots of extra options. Ideal for fixing entirely upper case source feed titles.
  • Capitalize first letter of sentences in description
  • Change Case (Smart Title) Title Skip Under: 3 chars Force Titlecase: Ax, Go Preserve Case: USA, DMZ, WWW Articles: an, the, of, to, as, and, for, from
  • Skip Under: Words under this length will remain in their original case.
  • Force Titlecase: Force title case on words that would otherwise be skipped because of the Skip Under.
  • Preserve Case: Do not title case these words that would otherwise be title cased.
  • Articles: List of common article-type words to force lower case, unless at the beginning of the field.

Dedupe (Specific)

Remove duplicates of a given word or phrase. Choose which duplicate to keep, first or last. Duplicates do not need to be adjacent to be removed (e.g., "Nike Air Nike Shoes" would become just "Nike Air Shoes").
  • Remove duplicates of the word "Nike" from the Title
  • Dedupe (Specific) Title Nike Keep: First
  • Remove duplicates of Brand field value from the Title
  • Dedupe (Specific) Title Brand Keep: First

Dedupe (All)

Remove duplicates of all words. Choose which duplicate to keep, first or last. Optionally, provide words to ignore and leave as duplicates.
  • Remove all duplicate words from the Title
  • Dedupe (All) Title Ignore Words: (empty) Keep: First
  • Remove all duplicate words from the Title except the words: A, Tom, Paper
  • Dedupe (All) Title Ignore Words: A, Tom, Paper Keep: First

Normalize Spacing

Clean up all of the spaces in a given field, leaving just one space between each word. Helpful when appending fields and values to other fields.
  • Remove extra spaces from Title
  • Normalize Spacing Title

Append Querystring

Append a querystring (?abc=123&...) to the end of a URL. Preserves any existing querystring. The beginning ? should not be included. Assumes entire querystring has already been encoded.
  • Add tracking parameters to AdWords Redirect URL's
  • Append Querystring AdWords Redirect URL source=Google&campaign=2014Q3
  • Set mode of an image URL
  • Append Querystring Image URL size=large

Append Querystring (Encoded)

Same as Append Querystring except it assumes field values are unencoded. Constant values must still be manually encoded. In the first example, since Titles usually have spaces, we will encode the spaces with +'s. The {bracketed} values are inserted using the Advanced "string substitution" (%s) edit option (see below).
  • Add tracking parameters to URL
  • Append Querystring (Encoded) URL keyword={Title}&sku={Unique ID}
  • Example with encoded constants
  • Append Querystring (Encoded) URL campaign=October+2014&cat=sports%2Foutdoors

Calculate

Set a field value to the result of a mathematical calculation of field and/or constant values. Use the Advanced "string substitution" syntax (%s) for accessing field values.
  • Set Shipping Cost to 10% of price
  • Calculate Shipping Price %s * %s Price 0.10
  • Temporarily reduce prices by 15%
  • Calculate Price %s * %s Price 0.85