# Conversion task input_data


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


Canonical URL: https://www.copyhero.app/help/technical-reference/task-input-data/conversion

## Purpose [#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 [#valid-json-example]

```json
{
  "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 [#json-fields]

| Field | Type | Required | Values and meaning |
| --- | --- | --- | --- |
| `enableCurrencyConversion` | boolean | Yes in editor output | Convert from the source currency to the destination store currency. |
| `pricingRulesEnabled` | boolean | Yes in editor output | Enable the top-level pricing controls. |
| `priceMultiplicator` | number | Yes in editor output | Positive multiplier applied by the pricing rule. |
| `changeCompareAtPrice` | boolean | Yes in editor output | Whether to calculate a compare-at price. |
| `compareAtPriceMultiplicator` | number | Conditional | Required when `changeCompareAtPrice` is true. Zero is allowed; negative values are not. |
| `tensRounding` | integer array | Yes in editor output | Allowed 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. |
| `decimalRounding` | integer array | Yes in editor output | Allowed 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. |
| `compareAtTensRounding` | integer array | Yes in editor output | Whole-number endings for compare-at prices, each from 0 through 9. |
| `compareAtDecimalRounding` | integer array | Yes in editor output | Decimal endings for compare-at prices, each from 0 through 99. |
| `skipRoundingOnSameCurrency` | boolean | Yes in editor output | Skip 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. |
| `overrideExchangeRates` | boolean | Yes in editor output | Use exchange-rate rows configured in the editor instead of the normal rate source. |
| `customExchangeRates` | object array | Editor-managed | Exchange-rate rows applied when `overrideExchangeRates` is true. See [Custom exchange-rate fields](#custom-exchange-rate-fields). |
| `useBrackets` | boolean | Yes in editor output | Apply per-range pricing rules from `priceBrackets`. |
| `priceBrackets` | object array | Conditional | Required and non-empty when `useBrackets` is true; maximum 10. |
| `minimumPrice` | number or omitted | No | Non-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 [#price-bracket-fields]

Each bracket supports:

| Field | Type | Values and constraints |
| --- | --- | --- |
| `minPrice` | number | Non-negative lower boundary. Must be lower than `maxPrice`. |
| `maxPrice` | number | Positive upper boundary. |
| `priceMode` | string | `multiplier` or `fixed`. |
| `priceMultiplicator` | number | Positive; used by `multiplier` mode. |
| `fixedPrice` | number | Must be greater than zero when `priceMode` is `fixed`. |
| `changeCompareAtPrice` | boolean | Enables the bracket's compare-at rule. |
| `compareAtPriceMultiplicator` | number | Required when the bracket changes compare-at price. Zero is allowed. |
| `tensRounding` | integer array | Values from 0 through 9. |
| `decimalRounding` | integer array | Values from 0 through 99. |
| `compareAtTensRounding` | integer array | Values from 0 through 9. |
| `compareAtDecimalRounding` | integer array | Values from 0 through 99. |

## Custom exchange-rate fields [#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.

| Shape | Fields | Meaning |
| --- | --- | --- |
| Pair | `from`, `to`, `rate` | 1 unit of `from` buys `rate` units of `to`. |
| Anchored | `currency`, `rate` | 1 US dollar buys `rate` units of `currency`. |

```json
"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 [#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 [#ui-guide]

Use [Create a Conversion task](/help/tasks/conversion-task) for the corresponding
**Currency Conversion** and **Rounding** controls in **Tasks**.