Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

A Feed Builder feed writes a Data Builder field’s stored rows with the Use Value as Feed transform. Each run reads the stored rows instead of building them.

Set up the feed#

  1. Set up and fill the Data Builder field. See Set up a field.
  2. Create a Feed Builder feed.
  3. On the Source tab, set the Products setting and conditions you want. The field stores every active product; the feed decides which ones go out.
  4. If the field stores a value for each variant, turn on Include product variants as separate feed rows.
  5. On the Feed Fields tab:
    • Set Output Format and Delimiter to match the field.
    • Map exactly one field: the Data Builder field’s code as the source, any output name (the ready-made files use row), and the transform Use Value as Feed.
  6. On the Header tab, enter the column line for CSV, or the opening XML for XML. See below.

Rules for Use Value as Feed#

  • It only works when it’s the only field mapped. With other fields, the feed treats it like a normal field.
  • Products or variants with no stored value are skipped.
  • With variants on, each variant’s stored row is one line. If none of a product’s variants has a stored value, the product’s own row is written.

CSV feeds#

The feed can’t see the columns inside the stored rows, so it doesn’t write a column line. Put it in the Header text, in the same order as the field’s mapping, ending with {{newline}}:

id,title,description,link,image_link,price{{newline}}

For a tab-delimited feed, separate the names with {{tab}}:

id{{tab}}title{{tab}}description{{tab}}link{{tab}}image_link{{tab}}price{{newline}}

If you change the field’s mapping, change this line to match.

XML feeds#

Data Builder wraps each stored XML row in <record>, not the <item> element Google expects. For Google’s or Microsoft’s XML format, use Feed Builder alone, or the tab-delimited format with Data Builder. The ready-made Data Builder files for Google and Microsoft use the tab-delimited format.

JSON feeds#

Each stored row is one JSON object, and the feed writes them as an array.

Keeping the feed current#

The field updates its stored rows a few minutes after a change, and the feed must run after that. The ready-made files give the feed’s task a 300-second trigger delay so it runs after the field’s Queued task.

After a whole-store refresh of the field, run the feed (Process Now under Marketing > Feeds) once the field’s Queued task has stopped.

Example#

The ready-made ChatGPT Data Builder file sets up:

  • a Data Builder field chatgpt_product_feed_data: CSV, comma, a value for each variant, with the ChatGPT fields
  • two tasks for the field: Queued Products (enabled, triggered) and All Products (disabled)
  • a Feed Builder feed chatgpt_product_feed: Available products with a price above 0, variants on, one field mapped as Use Value as Feed, the column line in the Header text
  • a nightly task for the feed, triggered after changes with a 300-second delay