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

Miva Developer Docs

A Feed Builder feed runs and delivers like any Miva feed. The module builds the content; Miva decides where it goes.

Ways to run a feed#

How Notes
Process Now Marketing > Feeds, select the feed, Process Now
A scheduled task Miva’s standard feed operation (stdschtasks, operation feed) with this feed selected
URI access Turn on URI access on the feed. Each request builds the feed live.

Delivery#

Set delivery on the feed record.

Delivery What happens
File The feed is written to the file name you enter. With location script, the path is relative to the store’s web root, so /google-merchant-center.xml is served at https://www.your-domain.com/google-merchant-center.xml. A folder in the path, such as /feeds/, must already exist.
Email The feed is sent as configured on the feed.
URI The feed is built on each request. Large feeds can take minutes, so channels that fetch from a URL are better served by a saved file.

Rebuild after changes#

The module listens for changes that affect feeds:

  • products added, edited, copied or deleted
  • category assignments
  • stock counts and inventory settings, including stock changes from orders and imports
  • variants
  • product images
  • categories (only for category feeds, and product feeds that use Category Path)

After a change, the module marks each affected feed as waiting and fires the feed’s Trigger. Only feeds that save a file or send an email are marked; URI feeds are always current. Store-wide inventory settings are ignored because they would rebuild everything. Price group changes and attribute edits don’t trigger a rebuild; the next scheduled run picks them up.

Each trigger fires once per request, so an import that changes 200 products rebuilds each feed once.

Give the feed its own scheduled task and use the same name in both places:

  1. Create a scheduled task that processes the feed (stdschtasks, operation feed), for example nightly at 2:00.
  2. Give the task a Trigger name, for example my_feed_trig. Set a trigger delay, for example 300 seconds, so several changes in a row cause one rebuild.
  3. Enter the same name in the feed’s Trigger field.

The ready-made channel files set this up.

Or use the shared task#

Feed Builder installs a task named “Regenerate Queued Feed Builder Feeds” (operation “Rebuild Feed Builder Feeds With Changes”). It’s disabled and has no trigger. When it runs, it rebuilds every Feed Builder feed marked as waiting that saves a file or sends an email.

To use it, enable it, give it a Trigger name, and enter that name in each feed’s Trigger field. You can also run it on a schedule to rebuild only the feeds that changed.

Feeds that use Data Builder#

A feed that writes Data Builder rows should rebuild after the rows are updated. The ready-made -data-builder.xml files set the feed task’s trigger delay to 300 seconds for this reason. After a whole-store refresh of a Data Builder field, run the feed again (Process Now) once the field’s tasks have finished.

Skin export#

Feed Builder supports skin export. Exporting a skin includes, for each Feed Builder feed:

  • a Feed_Add with its delivery settings and Trigger
  • a Category_Add for each category named in the Products setting, and an AvailabilityGroup_Add for each availability group
  • a Page_Update with every builder setting, in the same form as Provisioning XML

Price groups aren’t exported. Create them on the target store before importing a feed that reads In Price Group.