CopyHero
Technical referenceTask input data

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.
decimalRoundinginteger arrayYes in editor outputAllowed final decimal endings, each from 0 through 99.
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 rounding when source and destination currencies match.
overrideExchangeRatesbooleanYes in editor outputUse exchange-rate rows configured in the editor instead of the normal rate source.
customExchangeRatesobject arrayEditor-managedCustom exchange-rate rows. Their programmatic JSON contract is not stable; configure and validate them through Currency Conversion in the UI.
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.

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.
  • Configure custom exchange-rate rows through the UI. Do not copy their serialized shape into generated configuration or infer it from job history.
  • 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.