CopyHero

Conversion task input_data

Configure the conversion job_type with safe pricing, rounding, bracket, and destination-currency input_data rules.

Purpose

A Conversion task converts variant prices to the destination currency and can apply pricing, compare-at, minimum-price, bracket, and rounding rules. Set job_type to conversion.

Valid JSON example

{
  "enableCurrencyConversion": true,
  "pricingRulesEnabled": true,
  "priceMultiplicator": 1.3,
  "changeCompareAtPrice": false,
  "compareAtPriceMultiplicator": 2,
  "tensRounding": [4, 9],
  "decimalRounding": [90, 95],
  "compareAtTensRounding": [4, 9],
  "compareAtDecimalRounding": [90, 95],
  "skipRoundingOnSameCurrency": false,
  "overrideExchangeRates": false,
  "customExchangeRates": [],
  "useBrackets": false,
  "priceBrackets": [],
  "minimumPrice": 0
}

JSON fields

FieldTypeRequiredValues and meaning
enableCurrencyConversionbooleanYes in editor outputConvert from the source currency to the destination store currency.
pricingRulesEnabledbooleanYes in editor outputEnable the top-level pricing controls.
priceMultiplicatornumberYes in editor outputPositive multiplier applied by the pricing rule.
changeCompareAtPricebooleanYes in editor outputWhether to calculate a compare-at price.
compareAtPriceMultiplicatornumberConditionalRequired when changeCompareAtPrice is true. Zero is allowed; negative values are not.
tensRoundinginteger arrayYes in editor outputAllowed final whole-number endings, each from 0 through 9. The whole number rounds up to the closest allowed ending; one that already ends in an allowed digit stays.
decimalRoundinginteger arrayYes in editor outputAllowed final decimal endings, each from 0 through 99. The cents move to the nearest allowed ending, up or down: with tens [4, 9] and decimals [90, 95], 34.96 becomes 34.95 and 35.00 becomes 39.90.
compareAtTensRoundinginteger arrayYes in editor outputWhole-number endings for compare-at prices, each from 0 through 9.
compareAtDecimalRoundinginteger arrayYes in editor outputDecimal endings for compare-at prices, each from 0 through 99.
skipRoundingOnSameCurrencybooleanYes in editor outputSkip all tens and decimal rounding (sale, compare-at, bracket, and volume tier) when the source currency matches the destination currency. Works only with enableCurrencyConversion. Multipliers and minimumPrice still apply.
overrideExchangeRatesbooleanYes in editor outputUse exchange-rate rows configured in the editor instead of the normal rate source.
customExchangeRatesobject arrayEditor-managedExchange-rate rows applied when overrideExchangeRates is true. See Custom exchange-rate fields.
useBracketsbooleanYes in editor outputApply per-range pricing rules from priceBrackets.
priceBracketsobject arrayConditionalRequired and non-empty when useBrackets is true; maximum 10.
minimumPricenumber or omittedNoNon-negative floor for the final price.

The editor does not persist a manually selected targetCurrency in this input_data shape. CopyHero resolves the target currency from the destination store when the workflow runs. Configure the store currency instead of adding a guessed currency field.

Price bracket fields

Each bracket supports:

FieldTypeValues and constraints
minPricenumberNon-negative lower boundary. Must be lower than maxPrice.
maxPricenumberPositive upper boundary.
priceModestringmultiplier or fixed.
priceMultiplicatornumberPositive; used by multiplier mode.
fixedPricenumberMust be greater than zero when priceMode is fixed.
changeCompareAtPricebooleanEnables the bracket's compare-at rule.
compareAtPriceMultiplicatornumberRequired when the bracket changes compare-at price. Zero is allowed.
tensRoundinginteger arrayValues from 0 through 9.
decimalRoundinginteger arrayValues from 0 through 99.
compareAtTensRoundinginteger arrayValues from 0 through 9.
compareAtDecimalRoundinginteger arrayValues from 0 through 99.

Custom exchange-rate fields

A row states a rate in one of two shapes. Write the pair shape; the anchored shape is documented because rows saved before the pair shape existed still run.

ShapeFieldsMeaning
Pairfrom, to, rate1 unit of from buys rate units of to.
Anchoredcurrency, rate1 US dollar buys rate units of currency.
"customExchangeRates": [{ "from": "EUR", "to": "GBP", "rate": 0.85 }]

Use the pair shape unless you are reading an old blueprint. The anchored shape cannot state a rate between two currencies when neither is the US dollar, and it moves every rate computed through the currency it names, not just the one conversion you had in mind.

from, to, and currency take ISO 4217 codes. rate is a positive number.

Validation and run-time behavior

  • When brackets are enabled, ranges must be contiguous: the next minPrice must equal the previous maxPrice. Gaps and overlaps are rejected.
  • Every bracket must satisfy minPrice < maxPrice.
  • A bracket set can mix multiplier and fixed modes.
  • Both top-level and bracket compare-at rules require compareAtPriceMultiplicator when enabled. Zero is valid and means the value can be reset to zero.
  • Use at most 10 brackets.
  • Every custom exchange-rate row is validated when you save the task, not when it runs. A row missing to, or naming a code that is not ISO 4217, fails the save with a 422.
  • A pair row applies only to the exact direction it names. CopyHero does not invert it: a EUR to GBP row leaves a GBP to EUR conversion on the default rate.
  • Destination currency resolution happens at run time and requires usable store context. A queued run has not yet confirmed successful conversion.

UI guide

Use Create a Conversion task for the corresponding Currency Conversion and Rounding controls in Tasks.