Supplier feed import
Automation template · Catalog ·View source
Takes a supplier's price and stock feed sent to a webhook, matches each row to your products, proposes the price and stock updates for approval and reports what changed.
How it works
- Trigger
- The supplier's system, or your integration, posts the feed to a webhook
- Matches
- Each row to a product by SKU or the supplier's item code
- Updates
- Stock and cost, and optionally the selling price, only where they changed
- Asks you
- To approve the updates, with unusual changes called out
- Reports
- What changed, what was skipped and which rows did not match
What it needs
From your data. The agent finds the matching fields in your schema and confirms them with you.
- The product's SKU, to match feed rows
- The quantity on hand, updated from the feed (optional)
- What the product costs the store, updated from the supplier's price (optional)
- The selling price, updated only when price updates are on (optional)
- The supplier's own item code, when it differs from the store's SKU (optional)
- The supplier the product is bought from, so rows only update that supplier's products (optional)
You'll choose
- SupplierThe supplier this feed comes from; leave empty when one feed covers every product
- Match rows by · default SKUWhich field of the feed identifies the product
- Update selling prices · default offWhen off, only stock and cost are updated; the selling price stays as you set it
- Call out cost or price changes above (%) · default 15Changes bigger than this are listed first in the approval and the report
- Slack channelOptional; where the import report is posted
Works best with
The agent offers to set these skills up too, or to use ones you already have.
Example output
Slack, #purchasing
Atlas Textiles feed: 214 rows, 38 products to update, 171 unchanged, 4 unmatched, 1 skipped
Called out (waiting for approval): Linen Shirt, Sand, M (LS-SND-M): cost €18.40 → €23.10 (+26%) Linen Shirt, Sand, L (LS-SND-L): cost €18.40 → €23.10 (+26%) Linen Overshirt, Ink (LO-INK-M): cost €41.00 → €52.00 (+27%), now above its selling price (€49.00)
Unmatched: AT-77812, AT-77813, AT-90021, AT-90022 Skipped: KC-0042 belongs to Kiln & Co.
The 38 updates (stock and cost) are waiting for approval in Flexkit.
Show the instructions
Supplier feed import
A supplier feed just arrived at this automation’s webhook. Match each row to a product, propose the stock, cost and (if enabled) price updates for approval, and report what changed. Never create or delete products.
1. Read the feed
The rows are in the webhook payload. They may arrive as a JSON list, or as CSV text in one field. For each row, read the item identifier, quantity, the supplier’s price and, if present, a suggested retail price.
- If the payload has no rows, or none of them has an identifier, flag the run (“The feed had no readable rows”) with the first 300 characters of the payload, and stop.
- If a supplier is set ({{supplierName}}; empty means every product), only that supplier’s products may be updated.
- Ignore rows that are exact duplicates. When two rows have the same identifier with different values, use the last one and mention it.
2. Match rows to products
Match each row to one product by {{matchBy}}, comparing case-insensitively and ignoring spaces and leading zeros. If a data entry conventions skill is loaded, use its SKU format to normalise both sides.
- A row with no matching product is unmatched: list it, do not create a product.
- A row that matches a product of another supplier is skipped: list it.
- Look products up in batches, not one query per row.
3. Work out the changes
For each matched product, compare the feed with the record:
- Stock: the feed’s quantity. Treat negative quantities as 0.
- Cost: the supplier’s price.
- Selling price: only when price updates are on ({{updatePrices}}) and the feed has a suggested retail price. When off, never touch the selling price.
Keep only values that differ from the record. A product whose values all match needs no change. If no product needs a change, end the run with a report and no proposal.
Call out any cost or price that changes by more than {{maxChangePercent}}%, and any new cost that is at or above the current selling price: those are the rows a person should look at.
4. Propose the updates
Propose all updates in one bulk change for approval, called-out rows listed first, each with old → new values. Write only stock, cost and selling price. Never change a product’s name, status, description or supplier.
5. Report
Stage a short report (and post it to {{channel}} when a channel is set; skip Slack when it is empty):
- First line: rows received, products to update, unchanged, unmatched, skipped.
- The called-out changes, one line each: name (SKU), the field, old → new, the change in %.
- Up to 10 unmatched identifiers, then how many more.
Flag the run when there are called-out changes or more than 10% of rows are unmatched.