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

Miva Developer Docs

The Feed Fields tab sets the output format and the list of fields. Each field becomes a CSV column, a JSON property or an XML element.

Format settings#

Setting Choices Notes
Output Format CSV, JSON, XML CSV has a column line, JSON is an array of objects, XML is one <item> element per row. See Output formats.
Delimiter Comma, Tab, Pipe CSV only. Use Tab for Google’s and Microsoft’s tab-delimited .txt format.
Line Ending LF, CRLF, CR CSV and XML only. LF suits most channels. Use CRLF if an importer expects Windows line endings.

Fields#

Each field card has:

  • a ☰ handle to drag it up or down
  • a source: where the value comes from
  • an output name: the column heading, JSON property or XML element name. Required.
  • a transform: how the value is changed before it’s written
  • Remove

Click + Add field to add one.

Sources#

The source list has three special entries at the top, then every field the source offers.

Source Value
(Constant value) The same text on every row, for example new for a channel’s condition column. Enter it in the constant box.
(Main Image) The product’s image of one image type, as a full URL. Product source only.
(Additional Images) The product’s images of the chosen image types, as full URLs. Product source only.

After those come the product or category fields, custom fields and variant attributes. See Field sources for the full list and how each value is worked out.

If a saved source no longer exists, for example a deleted custom field, it shows as “(no longer listed)”.

Main Image#

Choose an Image type. The feed writes the product’s image of that type. A variant uses its own image of that type, or its master product’s when it has none.

Additional Images#

Choose up to 10 image types to include. “Images with no image type” covers images that were added without one. The feed writes the product’s images of those types in the product’s image order, at most 10 per row (Google’s limit):

  • CSV: one cell with the URLs separated by commas
  • JSON: an array of URLs
  • XML: one element per image

A variant uses its own images when it has any, or its master product’s.

Image URLs use the domain’s graphics root (Settings > Domain Settings, Root Directory for Graphics), so a store whose graphics root isn’t /mm5/ still gets working links.

Transforms#

Transform What it does
none Writes the value as is
strip HTML Removes HTML tags and puts the text on one line
full image URL Turns an image path into a full URL
embed as raw JSON (no escaping) JSON output only: writes the value as JSON, not as a quoted string
Use Value as Feed Writes a Data Builder field’s stored row as the whole row. Only works when it’s the only field.

Details are in Transforms and conditions.

Conditional output#

Tick Use conditional output to change a field’s value based on rules. Rules are checked top to bottom, and the first match sets the output.

  • An empty output leaves the field out of the row. Use this to drop a column that has no value, such as a sale price.
  • Otherwise output is used when no rule matches. Leave it blank to keep the normal value.

Example: write in_stock or out_of_stock in place of the module’s “in stock” / “out of stock”:

Field Operator Value Output
Availability equals in stock in_stock

Otherwise output: out_of_stock

See Transforms and conditions for more examples.

Required values#

Saving is refused when:

  • a field has no output name or no source
  • a constant has no constant value
  • a condition has no field, or no value for an operator other than is empty / is not empty

Default fields#

A new feed starts with id, title, description, link, image_link, additional_image_link and price. Availability and condition are left out because each channel spells them differently.