Welcome to Zuora Product Documentation

Explore our rich library of product information

Field Mapping Transformations

Field Mapping Transformations allow you to apply data transformations using the Expression Wizard, including operations like Constants, Value Mapping, Conditional Mapping, String to Date, and Negate Decimal.

Use field mapping transformations to customize how a source value is converted before it is sent to the target system. Apply a transformation when a default mapping does not produce the value or format required by the target field.

Transformations are configured for individual mappings in the Expression Wizard. The Expression Wizard supports operations such as constants, value mapping, conditional mapping, date conversion, string manipulation, JEXL expressions, and decimal negation.

To configure a transformation, click the Settings icon between the source and target fields, select the required expression type, configure the expression, and click Submit.

If you need predefined source-to-target mappings for a supported business scenario, see Use Functionality-Specific Default Mappings.

Expression Wizard pop-up window

Constants

Constants are used when there is no available source field for a mapping. This transformation allows a fixed value to be sent to the target system.

After selecting the Constant operation, enter the desired value and click Submit.

Note:

Constants are sent to the target system as string values.

Date Constant

The Date Constant transformation assigns a fixed date value to the target field.

To use this transformation, select Date Constant, specify the required date, and click Submit.

Date Calculations

The Date Calculations transformation performs calculations on date fields from the source object. You can use it to:

  • Add or subtract a specified duration from a date.

  • Calculate the difference between two dates.

  • Add or subtract a duration from one date and then calculate the difference between another date.

To use this transformation:

  1. Select Date Calculations from the Expressions Wizard.

  2. Select the required date calculation type:

    1. Add or subtract from a date.

    2. Calculate the difference between two dates.

    3. Add or subtract from one date and calculate the difference between another date.

  3. Configure the required date fields and calculation parameters.

  4. Click Submit to save the transformation.

JEXL Expression

The JEXL Expression transformation enables you to create custom field transformations by using Apache Commons JEXL (Java Expression Language). You can define variables that map to source fields and reference those variables in a JEXL expression to generate the target value.

To use this transformation:

  1. Select JEXL Expression from the Expressions Wizard.

  2. Under Variables, add one or more variables.

  3. For each variable, enter a Variable name and select the corresponding Field path from the source object.

  4. Click Add Variable to define additional variables, if required.

  5. Enter the JEXL expression in the Expression field. Reference the variables that you defined to build the required transformation.

  6. Click Submit to save the transformation.

For example, if you define the variables name and billTo, you can use the following expression to return billTo when name is empty, otherwise concatenate the two values:

name == null ? billTo : name + "_" + billTo

Value Mapping

Value Mapping allows the target value to change depending on the value of a source field. After selecting Value Mapping, you must choose a source field and define a condition. Supported conditions include:

  • Is equal to

  • Is in

  • Is not equal to

  • Is not in

  • Is not null

If the source field meets the specified condition, the value defined in the THEN section is sent to the target system.

You must complete all required fields and click Submit to save the configuration.

Value mapping

Conditional Mapping

Conditional Mapping allows you to dynamically transform data during synchronization. First, select the source field. Then define the expected data type of the source value and the data type to send to the target system. You can then specify the evaluation condition and define the values to send when the condition is met or not met.

Example:

When Currency == EUR, send "EURO", otherwise send "INELIGIBLE CURRENCY CODE".
Conditional Mapping Expression

Conditional Value Mapping

The Conditional Value Mapping transformation compares the value of a source field against one or more conditions and returns the corresponding target value for the first matching condition. Conditions are evaluated in the order in which they are defined.

To use this transformation:

  1. Select Conditional Value Mapping from the Expressions Wizard.

  2. Select the Source Path that contains the value to evaluate.

  3. Define a condition by selecting an operator, such as Equals, and entering the comparison Value.

  4. Enter the Target Value to return when the condition is met.

  5. Click Add Condition to define additional conditions, if required. Conditions are evaluated sequentially.

  6. Click Submit to save the transformation.

For example, for a source field that contains an order status:

Condition

Value

Target Value

Equals

Active

A

Equals

Inactive

I

Starts with

Pend

PEND

If the source value is Pending, the transformation returns PEND because it matches the Starts with condition.

Split String

The Split String transformation splits a source string by using a specified delimiter and returns the value at the specified position.

  1. Select Split String from the Expressions Wizard.

  2. Select the Source Path that contains the string to split.

  3. Enter the Delimiter that separates the values in the source string.

  4. Enter the Position (one-based) of the value to return. The first value in the split string is at position1.

  5. Click Submit to save the transformation.

For example, if the source value:

John|Doe|Sales

Delimiter:

|

Position:

2

Result will be:

Doe

String to Date

The String to Date transformation converts a string field into a Date data type.

To use this transformation, select String to Date, choose the source field, and click Submit.

String to Date Pattern

The String to Date Pattern transformation converts a source date value to the specified output date format. To configure this transformation, select String to Date Pattern from the Expressions Wizard, choose the Source Path that contains the date value, enter the required Output Date Pattern (for example, yyyy-MM-dd), and then click Submit to save the transformation. For example, if the source value is 07/17/2026 and the output date pattern is yyyy-MM-dd, the resulting value is 2026-07-17.

String to Number

The String to Number transformation converts a string value to a numeric value.

To use this transformation, select String to Number, select the Source Path that contains the string value, choose the required Return Type (for example, Integer or Decimal), and then click Submit.

String Prepend/Append

The String Prepend/Append transformation adds a prefix, suffix, or both to a source string before mapping it to the target field.

To use this transformation, select String Prepend/Append, select the Source Path, enter the required prefix, suffix, or both, and then click Submit.

Negate Decimal

The Negate Decimal transformation reverses the sign of a decimal value. This is commonly used when the source system reports values differently from the format required by the target system.

Example: Zuora reports discount amounts as positive values, but SAP requires them to be submitted as negative values.

String Concatenation

The String Concatenation transformation concatenates multiple source fields and constant values into a single string. To use this transformation, select String Concatenation, select a Source Field or enter a Constant/Fallback Value, click Add Value To Concatenate to add additional fields or constants as needed, and then click Submit.

For example:

Concatenate the product name and charge type to generate the following output:

Sample Product (One-Time)