Cost Field
How to Map Cost Field
Import and update unit cost per item (Cost per Item) on Shopify using feed values, custom formulas, delimiter controls, and currency conversions during your feed syncs.
How to Set Up Cost Field
Go to App → Feed Settings → Step 2: Field Mapping

- Map Field: Select the Cost field in Stock Sync.
- Open Settings: Click on the Settings (gear icon) next to the mapped field.
- Configure Options: Set up condition rules, rounding formats, delimiters, or currency conversion based on your store's requirements.
Cost Field Smart Settings / Detailed Breakdown
1. Cost Conditions
Use cost conditions to automatically calculate and adjust product unit costs during your sync based on specific rules.
Valid Price Range Keywords:
price(Use when comparison values are text strings)price_f(Use when comparison values are numeric)col#_f(Use when comparison values are numeric or when parsing from Google Sheets)any(Applies to all products universally)current_price(Shopify store value only)cost(Shopify store value only)compare_at_price(Shopify store value only)
Supported Math & Logic Symbols:
Symbol | Details |
|---|---|
| Equal to |
| Less than or equal to |
| More than or equal to |
| More than |
| Less than |
| Only true when both statements are true |
| True when either statement is true |
Example Condition Formulas:
Condition (If) | Price / Formula (Then) | Result / Explanation |
|---|---|---|
|
| If current store cost is 0, multiply by 0 (makes no changes to the cost). |
|
| Multiplies all matched costs by 1.5 (applies a 50% markup). |
|
| Multiplies all matched costs by 0, then adds the |
|
| If the product is taxable (1 = taxable, 0 = untaxable), multiplies the cost by 1.5 (Shopify only). |
|
| Multiplies all matched costs by 0, then adds the |
|
| If column 5 is not empty (has any value), use the value from column 5 as the cost. |
|
| Adds an $80 delivery fee to the stock price, then applies a 50% markup. |
|
| Calculates a cost based on the current store price, discounted by the percentage value in column Option 2. |
|
| If the "Vendor" column contains "shoe", applies a 30% markup and adds the value from the "shipping" column. |
|
| Adds the value from the "InStock" column to the product cost (supported based on XML nodes). |
|
| If the "Description" column contains the text "pink", applies a 10% markup. Ideal for string values unsupported by a numerical index. |
|
| If the "qty" column contains the number "4", applies a 50% markup. Useful for numerical strings lacking a specific column index. |
|
| Sets an exact fixed cost of 12.5. Note: You must use |
|
| Applies a 20% markup if the numerical price is greater than 10 and less than or equal to 15. |
|
| Applies a 50% markup if the exact numerical price is 11. |
|
| Applies a 30% markup if column 5 specifically equals "shoe". Useful for collection-based markups. |
|
| If the numerical price is less than 1, retains the current store price (Shopify only). |
|
| If the price is greater than column 1's numerical value, sets the cost to the sum of column 1 and column 2. |
|
| Applies a 20% markup if the text price equals "high". Use |
|
| Multiplies all costs by 0.1 (effectively scaling it down to 10% of the original value / a 90% markdown). |
|
| Applies a 50% markup if the text price equals "discount". |
|
| If the product cost in Shopify is less than 40, applies a 20% markup. |
|
| If the compare-at price in Shopify is greater than 10, applies a 50% markup. |
|
| Divides all costs by 0.2. |
|
| If the "Vendor" column contains "CLIF", updates the cost by dividing the "Cost" column value by 12. |
|
| If the date in column 4 is in the future compared to |
|
| If the date in column 4 is past today's date ( |

2. Cost Delimiter
Select the delimiter format used in your feed file to ensure decimals and thousands are parsed correctly.

3. Mapping Cost from Repeating Price Elements
When an XML feed contains multiple <price> elements per product (each containing its own <unit_price>), Stock Sync does not automatically select the lowest or first/last value when element counts vary across items.
<unit_price>) you want to map. Automatic extraction of the lowest repeating price element is not supported.4. Cost Round
Standardize your store's product unit costs using rounding rules if numbers appear irregular or require standard formatting.

Rounding Rule | Result / Explanation |
|---|---|
| Rounds 12.57 to 12.00, or 12.573 to 12.000 |
| Rounds 12.57 to 12.50, or 12.573 to 12.500 |
| Rounds 12.57 to 12.57, or 12.573 to 12.570 |
| Retains exact decimals (no changes made, e.g., 12.573 remains 12.573) |
| Rounds 12.570 to 12.599 |
| Rounds 12.57 to 12.95 |
| Rounds 12.57 to 12.97 |
| Rounds 12.570 to 12.599 |
| Rounds 121.57 to 129.00 |
| Rounds 123.57 to 125.00 |
| Rounds 127.57 to 129.99 |
| Rounds 12,453.57 to 12,000.00 |
| Rounds 12,345.57 to 12,300.00 |
| Rounds 12,346.57 to 12,350.00 |
| Rounds 12,345.57 to 12,399.00 |
| Replaces the third digit with a 9, followed by 0s (e.g., 12.57 to 12.90; 145.67 to 149.00) |
| Rounds up to the nearest whole integer by adding 1 (e.g., 12.57 to 13.00; 135.33 to 136.00) |
5. Currency Converter
Use this if your supplier feed provides costs in a different currency than your Shopify store's default currency.
MYR and your store currency is USD, enable the Currency Converter and select the appropriate source and target currencies.
6. Don't Update Cost When...
Exclude specific products from having their cost values updated during syncs based on distinct metadata filters.
Vendor = Adibas ensures that the cost for any product mapped to vendor "Adibas" will not be modified during syncs.
Key Rules & Technical Details
- Priority Sequence: Conditions are executed sequentially from top to bottom. Order your highest-priority edge cases at the top of the list.
- Fixed Value Formula: If setting an exact numerical cost, use
*0 + [Value]instead of starting the formula with an=sign. - Shopify Cost per Item: Stock Sync updates Shopify's unit cost field (
cost_per_item), which feeds into store margin calculations and financial reporting.
Troubleshooting Steps
- Issue: Cost field shows invalid decimal formatting → Solution: Verify the Cost Delimiter setting and match it to your feed's numeric separator (Comma vs. Decimal Point).
- Issue: XML feed with multiple price tags imports unexpected cost values → Solution: Specify the exact node index for repeating
<unit_price>tags in your feed element settings.
Good Articles to Continue
- [How to Map Price Field] → Learn how to configure base selling price using identical markup logic.
- [How to Map Compare-at Price Field] → Configure original strikethrough prices for promotional items.
- [Field Mapping Overview] → Master field mapping options, column headers, and column indexes.
Updated on: 09/10/2026
Thank you!
