Skip to main content
Contents

Docs › Platform admin

Vendor product photos

When a site turns on Fetch photos from vendor stores automatically, the app looks up that site's products that have a REF and no photos on the manufacturer's own store or catalog site: Boston Scientific, Cook Medical, Terumo, Medtronic and BD. Photos are saved per site, with a link back to where they came from. The list of vendor sites is built into the app. Addresses typed into a vendor's settings are never fetched.

What the page shows

  • By site. For each site: products with a REF, how many have any photo, and the lookup status: Pending (not looked up yet), Found, None (the vendor had nothing for that REF), Unsupported (no vendor store for the manufacturer) and Error (the lookup failed). Each site also shows whether images and fetching are on.
  • By vendor. The same counts per vendor store. Products whose manufacturer has no store are counted under No supported vendor.
  • Why pending isn't what the last run processed. Opens to show what the pending products are waiting for: some already have photos (a run marks them found without asking a vendor), some are from a vendor with no photo provider (marked unsupported), some are at sites with product images or automatic fetching off, and the rest are waiting for a run. It also counts products with a barcode but no REF, which only get photos another product already has.
  • Recent runs. The last 10 runs: when, what started it (After import, Scheduled, Platform admin or Site (manual) from a site's Vendor photos page), the site if it was for one site, products looked up, photos added, how many of those were copied from another product instead of fetched, not found, errors, and its status (running, done, stopped early, vendors paused). Details opens a row: why it stopped, per vendor how many products were queued, looked up, found, not found, failed, left because the vendor paused or refused the app, or not reached, and the problems it hit, grouped by kind.

Fetching and re-checking

  • Fetch images for all products, at the top of the page, starts a run straight away. It looks up every product with a REF or barcode and no photo yet. Pick the scope in Site:

    • All opted-in sites: every site that turned on automatic fetching, as the schedule does.
    • Any one site, whether or not it opted in. If its automatic fetching is off, the page says so and asks you to confirm a one-off run; the site's setting doesn't change. If its product images are off, there is nowhere to put the photos: the page says so and offers Turn on product images + vendor photos for this site, which turns both on (recorded in the Audit Log as a site settings change). Then fetch.

    A run goes on in the background until every product in scope has been looked at, however long that takes for a large catalog. While it runs, the page shows how many products it has done out of how many, a progress bar, photos added so far, per-vendor counts and a time estimate, and updates by itself every few seconds; you can leave the page and come back. Stop run under the progress stops it after the products it is looking up at that moment; the rest stay due for the next run (recorded in the Audit Log). Only platform admins see it, on this page. If a run is already going (from a schedule, an import, a site, or another admin), it says so and doesn't start another.

  • Re-check products picks products and queues them for the next run:

    • Scope: vendor, name or REF, and status (Never checked, Pending, Found, None, Unsupported, Error; none ticked means any), plus the site picked above (a single site needs product images on, not automatic fetching).
    • Find products lists what the filters match. Everything in scope is selected; untick products to choose, or use Select all in scope to go back to all of them.
    • Mode: Missing only (products with no photos), Add new photos (also products that have photos: adds vendor photos they don't have yet, up to 10), or Replace vendor photos (removes the product's vendor photos and fetches them again; photos people uploaded are never removed, and the old vendor photos stay if nothing new comes back).
    • The button asks you to confirm how many products and which mode, then queues them and starts a run unless one is going. Queued products wait for the next run otherwise (for a site with automatic fetching off, press Fetch images for all products once the current run ends).

Both are rate limited and recorded in the Audit Log, with the mode and counts.

How it behaves

  • Local copies first. Before asking a vendor, the app copies photos that another product already has for the same item: the same REF from the same manufacturer, or a shared barcode, at any site. Vendor photos are always copied, with their source. Photos people uploaded are copied only from sites that turned on Share our uploaded product photos with other sites; the copy says "Shared by another site" and never names that site. Copies are separate files, so deleting a photo at one site never affects another. The vendor is asked only when no copy was found, or in the Add and Replace modes, and a photo the product already has is never added twice. Recent runs shows how many photos were copied locally.
  • One at a time. Only one copy of the app runs a lookup at once, even with several copies running. A run started here or by the schedule has no time limit: it stops when every due product has been looked at, when a platform admin presses Stop run, when the server shuts down (the products it didn't reach wait for the next run), or when every vendor with products left has paused or refused it. A run started by an import only looks at that site. A run a site starts itself (its Vendor photos page, or after an import) also stops at the site time limit below.
  • Time limit for runs a site starts. Set on this page: Sites (default 30 minutes) and Demo site (default 5 minutes), from 1 minute to a day. It keeps one site's large catalog from holding the only fetcher for hours. A new limit applies to runs that start after you save; the change is recorded in the Audit Log.
  • Vendors side by side. Within a run each vendor store has its own queue, looked up at the same time as the others, so a slow vendor, or one that paused or refused the app, doesn't hold up the rest.
  • Slow on purpose. The app waits at least 10 seconds between two requests to the same vendor site, longer if the site's robots.txt asks for it, and doesn't fetch anything robots.txt disallows. A site with no robots.txt (or one that can't be read) is treated as allowing everything; a site that answers "too many requests" or "unavailable" is left alone for a while (10 minutes, or as long as it asks, up to an hour). The app names itself honestly to the vendor (road2ir-inventory/1.0 and the app's address). If a vendor refuses it, that vendor is skipped for the rest of the run. Only the product being looked up at that moment is marked Error; the vendor's other products stay due and are tried in the next run.
  • Spelling. For Boston Scientific, a REF the store doesn't know is tried again in uppercase, without spaces and without hyphens. The photo's source link points at the spelling that worked.
  • Retries. None and Error are tried again after 30 days, and Unsupported is matched against the vendor list again after the same time. Found is never looked up again unless you re-check it.
  • Audit Log. Each product that gets photos adds an entry, "Added product photos from a vendor store", by "Vendor photo fetch".

Settings on the server

These are set in the app's environment by whoever runs the installation:

SettingDefaultWhat it does
VENDOR_IMAGES_INTERVAL_HOURS1Hours between scheduled runs. 0 turns the schedule off; imports and the button still run. Scheduled runs only happen on the production server.
VENDOR_IMAGES_MIN_DELAY_MS10000Shortest gap between two requests to the same vendor site.
VENDOR_IMAGES_RECHECK_DAYS30Days before None, Unsupported and Error are tried again.
VENDOR_IMAGES_USER_AGENTroad2ir-inventory/1.0 (+app address)What the app calls itself to vendor sites.

Related: Products, Uploaded files.