Product updates
Lesson 9 of 12 8 min read
Control how products are imported from WooCommerce and which product details Supply Lens is allowed to write back to the store.
Products can travel both ways between WooCommerce and Supply Lens. That's powerful, and it's also how a carefully written product description gets overwritten by a blank one. In this lesson you'll decide which system owns which product details and set the Products configuration to match.
Decision 1: which system owns which details?
Before touching any setting, agree a simple rule for each detail: names, descriptions, prices, weights, tax classes. Usually the inventory system owns codes, prices and weights, and the store owns the marketing copy. The settings below let you put that rule into practice.
Decision 2: when should product changes be picked up?
| setupDate | Only product updates on or after this date are processed. Set automatically when first configured. |
|---|---|
| lastImportDate | The time of the most recently imported product update. Managed by the system. |
| importDelay | How long to wait before importing a product update, so other systems or plugins can finish changing the product first, for example 00:05:00. |
Decision 3: how should variations be named?
| variationNameFormat | How a variation's name is built when products are imported, using numbered placeholders. When not set, a variation keeps the name WooCommerce gives it, or its parent's name if it has none. |
|---|
The placeholders are:
| Placeholder | Value |
|---|---|
{0} | The parent product's name |
{1} | The variation's own name, as WooCommerce returns it |
{2}, {3} | The first attribute's name and value, for example Size and Small |
{4}, {5} | The second attribute's name and value, and so on |
So {0} - {3} names the Small variation of Latex Gloves - 10 Box Case as
Latex Gloves - 10 Box Case - Small, and {0} ({2}: {3}, {4}: {5}) gives
Nail Polish (Colour: Red, Size: Large).
Things to know before you choose a format:
- Prefer
{0}and attribute values over{1}. What WooCommerce puts in a variation's own name differs between stores. - Attribute order is fixed for global attributes (ones set up under Products → Attributes in WooCommerce), so a placeholder names the same attribute on every product. Attributes typed on a single product come first, in name order.
- Only attributes the product varies by are included. Descriptive ones such as brand are not.
- A variation missing a placeholder keeps its unformatted name. And an attribute set to "Any" is left out, which moves later attributes up one pair.
- An invalid format, such as an unclosed
{, fails the import with an error. - Only variations imported from then on are renamed. A variation is read only when its
parent product changes. To rename the existing catalogue,
lastImportDatehas to be moved back once after setting the format: ask your Supply Lens contact to do this.
Decision 4: which prices go to the store?
| usePriceAsSalePrice | When true, the standard product price is written as the WooCommerce sale price instead of the regular price. Useful when you want the price shown as a promotion. |
|---|---|
| keyedPriceMetadataMap | Links named prices held in Supply Lens (keyed prices) to WooCommerce product metadata keys, to read or write those prices from metadata. |
| useKeyedPriceAsRegularPrice | Uses the price stored under this keyed price as the WooCommerce regular price, instead of the standard price. |
| useKeyedPriceAsSalePrice | Uses the price stored under this keyed price as the WooCommerce sale price. |
A keyed price is a price with a name, such as an RRP or a promotional price, kept alongside a Product's standard price.
Decision 5: what can Supply Lens create or overwrite?
| updateOnly | When true, only existing products are updated and no new products are created. Choose it when you want to keep prices or details in step without new items appearing in the store. |
|---|---|
| defaultStatus | The status given to products Supply Lens creates in WooCommerce. Default draft; publish is the other common value. Draft lets someone review a product before it goes on sale. |
| disabledFieldMappings | Fields that Supply Lens must not write to WooCommerce. A disabled field is left out entirely, so WooCommerce keeps what it already holds. Fields not listed are written. |
The fields you can protect with disabledFieldMappings are:
| name | The product name. |
|---|---|
| description | The product description. |
| regular_price | The regular price, including a value chosen by useKeyedPriceAsRegularPrice. |
| sale_price | The sale price from usePriceAsSalePrice and useKeyedPriceAsSalePrice. |
| weight | The product weight, converted to kilograms. |
| tax_class | The product tax class. |
| meta_data | Product metadata written by keyedPriceMetadataMap. |
The SKU can't be disabled, because it's how Supply Lens finds the existing product before updating it.
Decision 6: how fast?
| rateLimitPermitLimit | How many requests Supply Lens may make to WooCommerce within the rate limit window. |
|---|---|
| rateLimitWindow | The length of that window. Together they stop Supply Lens exceeding your store's API limits. |
Leave these at their defaults unless your host or Supply Lens contact advises otherwise.
Fernbrook protects its copy
Fernbrook's marketing team writes product names and descriptions in WooCommerce, and Unleashed owns prices and weights. Priya adds a Products configuration that sends to the store and sets:
"updateOnly": true,
"disabledFieldMappings": { "name": true, "description": true }
Prices and weights now flow from Unleashed, names and descriptions are left alone, and new Unleashed products don't appear in the store until marketing creates them.
Recap
- Agree which system owns each product detail before configuring anything.
variationNameFormatbuilds variation names from placeholders; prefer{0}and attribute values.- Price settings choose which price becomes the regular or sale price.
updateOnlystops new products being created;defaultStatusdefaults todraft.disabledFieldMappingsprotects fields maintained in WooCommerce; the SKU can't be disabled.
Quick guides for this topic
Your progress is saved in this browser. Create a free account to keep it everywhere, take quizzes and earn certificates.