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:
- Hover over the target field.
- Click Add custom value.
-
Enter your value in the text box that appears:
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:
- Double-click the field name, or hover over the field and click Expand.
-
Add your custom value or logic in the script editor.
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: