The supplier stores its backorder policy in backorder_policy, for example deny, allowed, or preorder. WooCommerce's built-in CSV importer needs Backorders allowed? to contain 0, 1, or notify.
Trim the value, convert it to lowercase, map only the exact example codes, and clear anything that is not 0, 1, or notify after the transformations.
How to Do It in Eofferix
Add or open the target
Backorders allowed?column and selectbackorder_policyas its source.backorder_policyand its values are examples; use the actual source column, node, or path.
Open the output column whose exact CSV header is Backorders allowed?. Under Transformations, add Any → Trim spaces at edges, followed by Any → Lowercase. These rules remove surrounding spaces and convert the current value to lowercase.
Add exact Equals rules:
deny→ Replace with →0;allowed→ Replace with →1;preorder→ Replace with →notify. Do not use substring matching.
Three exact example values become 0, 1, and notify, while the final guard clears unknown input. Finish with Not a regular expression using
^(?:0|1|notify)$→ Do not export field. Apply the settings and inspect all five example rows, includingnot_allowedandunknown.
backorder_policy, deny, allowed, and preorder are only an example supplier dictionary, not standard WooCommerce source codes. The preorder → notify mapping is correct only when the business intends to allow the order and show a customer notice. The Do not export field action clears the cell but does not remove the product row.Expected Result
backorder_policy | Backorders allowed? | Why |
|---|---|---|
DENY | 0 | Spaces and case are normalized before the exact match. |
allowed | 1 | The example policy allows backorders without a separate notice. |
preorder | notify | The example policy allows the order and notifies the customer. |
not_allowed | blank | It is not equal to allowed; the false substring match is prevented. |
unknown | blank | An unknown policy is not silently converted to 0. |
Checks Before Importing the CSV
- Keep all six rules in the documented order and apply them to the current value.
- Use Equals for all three exact dictionary rules, not Contains substring.
- The result contains only
0,1, ornotify; both negative rows are blank. - Stock management is enabled at the product or variation level where the backorder policy must apply.
Requirements and Limits
- In the built-in WooCommerce CSV schema,
0denies backorders,1allows them, andnotifyallows them while enabling a customer notice. - Backorder behavior applies when stock management is enabled; the available modes are described in the official product editor documentation.
- Use a separate dictionary for the REST API: its writable
backordersfield acceptsno,yes, ornotify, whilebackorders_allowedis read-only. See the WooCommerce Products REST API. - Do not export field leaves the output cell blank and does not remove the row. Do not treat an unknown value as a denial unless the business explicitly adopts that policy; resolve it or exclude the row separately.