Supplier web shop

Many suppliers of a small shop publish no price list at all — only their web shop. The Supplier web shop connector reads that shop the way the shop itself publishes it. The prices, stock and addresses it reads go through the same import as any price list: the same matching, the same report, the same price log and cost. A price that the next run does not find is kept and dated, never deleted.

Back office → Commerce → Purchasing → Suppliers → the supplier → Connect a price list → connector Supplier web shop.

How a shop is read

Reading method For What it reads
The page's structured data most shops the product data a page publishes for search engines (schema.org Product): price, currency, availability, SKU, EAN
WooCommerce shops on WordPress + WooCommerce the shop's public product listing, 100 products a page
Shopify Shopify shops the public products.json listing; each variant is one row. Set the shop currency: the listing does not name it
Magento Magento 2 shops (e.g. Makerfabs) the public catalogue query the storefront itself uses: final price, currency, stock status
The page opened in a browser shops that draw the price with scripts the page opened in a headless browser in its own small container, then read like the structured data — or by the page selectors the connection names

And where the product addresses come from:

Product addresses from Meaning
Only the items we already map the items whose supplier price already knows its address in the shop — the safest start
The shop's sitemap every address in the sitemaps the shop's robots file names (or /sitemap.xml), kept to those containing Product address contains (e.g. /products/)
The shop's product listing WooCommerce, Shopify and Magento only: the whole listing
The shop's price list page one page that lists every article with its prices (e.g. Olimex /prices): one request reads the whole range, each quantity column (10+ pcs, 50 - 10000 pcs) becomes a quantity price. Give its address in Price list page. Stock is not on such a page — the live lookup reads it from the item's own page

A product found in the shop but not sold by the firm lands under Not matched to an item in the import report. Match it once and the supplier's code is remembered.

New items become draft products

The supplier's page lists New items of this supplier: everything its latest runs carried that the firm does not sell, one row per supplier code with all its quantity prices. Draft product (choose the product type) creates the product unpublished, with:

  • the supplier's name for it and its code (the product's part number and the variation's manufacturer code);
  • the next item number when the firm numbers its items, otherwise the supplier's code;
  • a first selling price — the supplier's price in the firm's currency with the firm's markup — for a person to correct;
  • the supplier's prices and the address of its page, so the next run matches the item by itself.

Pictures, texts, categories and publishing stay a person's work.

When the firm already describes the item — a product with the same name but nothing to buy yet (no variation) — the row shows Our product and Add to this product instead: the supplier's item becomes that product's variation (code, cost, supplier prices), with no second product. It is offered at once only when the product is already published and the firm sets its selling prices from cost by a markup; otherwise a person prices it.

Politeness

The connector reads a shop the way a good guest would:

  • Robots rules. A page the shop's robots file refuses is never read. The file is read the way search engines read it: * and $ count, so Disallow: /*? refuses every address with a query.
  • One request at a time. Two requests to the same shop are at least Seconds between requests apart (2 s unless set).
  • A refusal is final. When the shop says no (401, 403, 429), the run stops and the report says so. There is no retry loop.
  • A name. Every request says who reads: fabrikaERP-supplier-prices/1.0 with the firm's web address and e-mail, so the supplier can tell us apart and write to us.
  • Public addresses only. The connector never reads a private or internal address.
  • Credentials for a reseller login (user:password, a header or a token) are stored encrypted and never shown again.

Read only what the supplier lets resellers use: its terms decide, not what a page happens to show.

Confirmed prices

Every supplier price read successfully by a run or a live lookup is stamped confirmed. The supplier's page shows it beside each price:

  • confirmed: read within twice the connection's schedule (48 h for a daily run);
  • not confirmed since …: the last good read is older — the shop changed, refused us or no longer carries the item;
  • —: never read by a connection (typed by hand, or an old price list).

in the shop opens the item's page at the supplier.

A run that finds the same price adds nothing to the price log. A changed price adds one line, and a jump beyond the firm's threshold is flagged, as for any price list.

Live lookup

The connector also answers a live lookup for given items: each is read now from its own page (Magento: one catalogue query for all). The lookup goes through the same import path but withdraws nothing — the items it did not ask about are not its to judge. The order-time check builds on it.

Setting it up

  1. Open the supplier and choose Supplier web shop under Connector.
  2. Fill in the Shop address, the Reading method and Product addresses from. Start with Only the items we already map when the shop is large.
  3. Test the connection. The answer names the method, the robots verdict and the first product with its price.
  4. Set the schedule (every 24 h is usual) and run the first import. Check the report, then match the products the firm sells.

For the assistant

supplier_web_probe finds how a shop can be read — the robots verdict, the method, where the addresses come from and a sample of items — and writes nothing. The assistant shows the proposal; on approval it saves the connection with purchasing_connection_save (connector supplier_web, the proposal's settings) and runs it with purchasing_import_run.

purchasing_candidates lists a supplier's new items and purchasing_candidate_draft turns one into an unpublished draft product.

Etichete
erppurchasingsuppliersconnectors