Importing a customer's feed

Explains: D-LIFE-02, D-DIST-09, D-DIST-17, D-LIFE-25, specs/002-xml-feed-import#req-001, specs/002-xml-feed-import#req-002, specs/002-xml-feed-import#req-003, specs/002-xml-feed-import#req-004, specs/002-xml-feed-import#req-006, specs/002-xml-feed-import#req-009, specs/002-xml-feed-import#req-016, specs/002-xml-feed-import#req-019, specs/002-xml-feed-import#req-020, specs/002-xml-feed-import#req-021, specs/002-xml-feed-import#req-022, specs/002-xml-feed-import#req-023, specs/005-multi-feed-inventory#req-001, specs/017-job-expiry#req-001, specs/017-job-expiry#req-002, specs/017-job-expiry#req-005, specs/017-job-expiry#req-006, specs/017-job-expiry#req-007, specs/019-feed-workers-and-distribution-clock#req-014

A customer sends you its jobs as an XML feed, and a customer can have several, each named and each with its own jobs (specs/005 REQ-001). Add one from the customer's Feeds screen, either by uploading or pasting the XML or by giving its public URL.

Mapping: telling ClickFactor which field is which

Before anything is imported, ClickFactor reads the feed and shows its fields with up to five sample jobs (specs/002 REQ-001), and proposes which field is the title, the link, the price and so on (specs/002 REQ-002). Each one is either From feed, a field in every job, or Fixed value, one value you type for every job. You check it and press Confirm map and import; nothing is imported until a mapping is confirmed (specs/002 REQ-003).

A job needs its own reference (the customer's id for it) and a title, or that one row fails (specs/002 REQ-004). A job's reference is read exactly as written, so 00123 and 123 are two different jobs (specs/002 REQ-006). A later import updates each job by its reference.

What an import tells you

Each run reports how many jobs it processed, created, updated and failed, and how many it marked invalid, counted apart from the failed rows (specs/002 REQ-009):

  • failed rows were not imported. A value longer than ClickFactor keeps fails only its own row, and the other listings import (specs/002 REQ-016);
  • invalid jobs were imported and kept, but are never matched to a campaign or sent to a publisher until the customer fixes them. Why a job is invalid explains each reason and what to tell the customer.

The customer's latest feed always wins, even when it is wrong: a blank link in a later import replaces the last good one and marks the job invalid (D-DIST-17).

Size limits a customer's feed can meet (specs/002 REQ-023, specs/019 REQ-014):

  • a listing longer than 1 MiB is not imported and counts as a failed row of its own, and the listings around it import;
  • a listing whose fields, each named by its whole path, would hold more than twice the listing's own text is not imported and counts as a failed row of its own, and the listings around it import;
  • a listing, or a tag outside a listing, still open after 8 MiB fails the whole run, with a reason that names the limit;
  • a tag outside a listing whose name is longer than 1,024 characters fails the whole run (D-IMP-11);
  • a feed longer than 1 GiB of text fails the run.

When a run fails this way, the jobs it had already saved stay saved, and the run expires no job. A run still reading the feed an hour after it started is stopped (specs/017 REQ-005).

Refresh

Press Refresh on the feed's row to queue a fresh import. A feed added by its URL can also refresh on its own: its Refreshes cell offers By hand, or every hour up to every 24 hours, and shows the Next refresh (specs/002 REQ-019, REQ-020). Every import, by hand or on a schedule, waits its turn: your shop runs one at a time. An uploaded feed refreshes by hand only, because an uploaded file has nothing new to fetch. A feed whose XML was pasted can be given new XML under Replace file on its record: the new file is imported with the mapping you confirmed, and a job it no longer lists stops being sent to publishers (specs/017 REQ-008). While the customer is disabled, a scheduled feed's Next refresh reads "Paused with the customer", and no refresh is queued until the customer is enabled (specs/002 REQ-021). Archiving a feed keeps its schedule and stops it; unarchiving starts it again (specs/002 REQ-022).

A job that leaves the customer's feed

When a clean import no longer finds a job, it is taken out of distribution, and it comes back if a later import lists it again (specs/017 REQ-001). An import in which any row failed expires no job, so a broken run never expires your jobs (specs/017 REQ-002). When a job goes away explains what happens to its clicks.

A feed's status

active

While the customer is active and the feed's mapping is confirmed, the feed can be refreshed, and its valid jobs can be matched by the customer's campaigns.

archived

The feed is withdrawn: nothing is imported into it, an import already running stops, and its jobs leave every publisher's feed (D-DIST-09, D-LIFE-02, specs/017 REQ-006). It is hidden from the list unless you tick Show archived feeds, and its jobs are kept (specs/005 REQ-001).

Unarchive brings it back active. Its old jobs stay out of distribution until an import sees them again (specs/017 REQ-007, D-LIFE-25). When the customer is active and the feed's mapping is confirmed, unarchiving queues that import for you; when the customer is disabled, the feed says why it did not, and you refresh it once the customer is enabled.