The source stock column mixes integers, values such as 10+ and >10, and text markers such as out of stock and preorder. The target column must contain a number only for explicitly supported formats.
Map the exact text markers first, leave the final value blank for every unsupported format, keep the digits, and add 1 only when the original source value has the >N form.
How to Do It in Eofferix
Add or open the target
stockcolumn and selectstock_rawas its source. Both names are examples used only in this walkthrough.Add the first three rules: Any → Trim spaces at edges; Equals with
out of stock→ Replace with →0; Equals withpreorder→ Replace with →0.
Exact markers are handled first, unsupported formats leave the final stock value empty, and a value greater than 10 becomes 11. Add a whole-value guard: Not a regular expression with
^(?:\d+\s*\+?|>\s*\d+)$→ Do not export field; then Regular expression with\d+→ Remove everything except; finally test the original source column with^\s*>\s*\d+\s*$and apply Add with1.Apply the rules and inspect every supported and unsupported value in the preview. Then run a small test export and open the downloaded file. Continue only if an unknown phrase containing a number leaves the final value blank in both the preview and the file.
stock_raw, stock, out of stock, and preorder are examples. Use the actual column names and exact supplier codes in your data. The preorder → 0 mapping is only a numeric-stock policy and does not preserve the preorder status.Expected Result
| Source value | Result | Why |
|---|---|---|
10+ | 10 | The example treats this as a lower bound, not an exact quantity. |
>10 | 11 | For integer stock, 11 is the smallest value greater than 10. |
42 | 42 | A supported integer remains unchanged. |
out of stock | 0 | This is an exact known no-stock marker. |
preorder | 0 | This is the explicit numeric-stock policy used by the example. |
available in 3 days | blank | Unknown text must not become a false stock quantity of 3. |
Checks Before Export
- Keep all six rules in the documented order because Eofferix evaluates them from top to bottom.
- Use Equals for
out of stockandpreorder, not substring matching. - Confirm that
>10becomes11, not10. - Confirm that unknown text, a negative number, and arbitrary text containing digits all become blank.
Limits of This Example
N+and>Nexpose a conservative lower bound, not the physical quantity in the warehouse.- If the destination distinguishes preorder from out of stock, build a separate status column; the numeric zero cannot retain that distinction.
- This rule chain accepts non-negative integers only. Add another format only after the supplier has documented its meaning.