Ir para o conteúdo

Use custom values in transformations in Jitterbit Integration Studio

Introduction

You can add hard-coded values, expressions, or transformation logic directly to target fields in transformations.

Custom values include the following:

  • Hard-coded text or numbers
  • Expressions that calculate values
  • Transformation functions
  • Any valid script logic

Add custom values to unmapped fields

You can add custom values to fields without existing mappings.

Follow these steps to add custom values to unmapped fields:

  1. Hover over the target field.
  2. Click Add custom value.
  3. Enter your value in the text box that appears:

    Add custom value

The following examples show valid custom values:

  • Text value: "Active"
  • Number: 100
  • Expression: "Order-" + $OrderNumber

Add custom values to mapped fields

To add custom values to fields with existing mappings, edit the script directly.

Follow these steps to add custom values to mapped fields:

  1. Double-click the field name, or hover over the field and click Expand.
  2. Add your custom value or logic in the script editor.

    Custom value in script

Combine custom values with other mappings

You can combine custom values with source fields and variables.

The following examples show how to combine custom values:

  • Concatenate a prefix with a source field: "CUST-" + json$item.customerId$
  • Use conditional logic: If(json$item.status$ == "new", "PENDING", "PROCESSED")
  • Simple string concatenation: firstName + " " + lastName

Edit custom values

To edit a custom value, click Expand to reopen the editor:

hover on target field