Portal Community

When to Use

Configuration

SettingRequiredDescription
Source Optional An inline JSON string representing the source object. Use this for mapping static or test data. If provided, takes precedence over SourceOutput. Supports BizFirst expressions.
SourceOutput Optional The node key of a previous node whose output should be used as the source. Example: "httpRequestNode". The full output data of that node becomes the source object for mapping.
Mappings Required A JSON array of DataMappingRule objects. Each rule defines one field mapping. Must contain at least one rule. Order matters — rules execute top to bottom.

DataMappingRule fields

FieldRequiredDescription
SourceField Required Path to the field in the source object. Supports dot notation (user.address.city) and array indexing (items[0].price). Use the root path . to select the entire source object.
TargetField Required The field name in the output mapped_data object where the mapped (and optionally transformed) value is written. Simple identifier, no nesting supported in target.
Transform Optional Optional transform to apply to the source value before writing to the target. See the transforms table below.

Supported Transforms

TransformInput TypeOutput
uppercasestringConverts all characters to uppercase. "london""LONDON"
lowercasestringConverts all characters to lowercase. "SMITH""smith"
trimstringRemoves leading and trailing whitespace.
toStringanyConverts any value to its string representation.
toIntstring / numberParses to integer. "42.9"42
toDecimalstring / numberParses to decimal (double). "19.99"19.99
toBooleanstring / numberParses truthy values. "true", "1", "yes"true; others → false
toFloatstring / numberParses to floating-point number.
toDatestringParses a date string and returns ISO date (YYYY-MM-DD).
toDateTimestringParses a datetime string and returns full ISO 8601 datetime.
base64EncodestringEncodes the string as Base64.
base64DecodestringDecodes a Base64 string to plain text.
jsonStringifyobject / arraySerializes an object or array to a JSON string.
jsonParsestringDeserializes a JSON string to an object or array.
nullToEmptynull / undefinedConverts null or undefined to an empty string "".
emptyToNullstringConverts an empty string "" to null.

Source Resolution Order

The node resolves the source data in this order (first available wins):

  1. InputData["source"] — if the preceding node outputs a field named source, it is used as the source object.
  2. Settings.Source — the inline JSON string configured in settings.
  3. SourceOutput node lookup — the full output of the named upstream node.

Output Ports

PortWhen It Fires
successAll mapping rules executed without error. The mapped_data object is available downstream.
errorA mapping rule fails (e.g., type conversion error, invalid source path) or the Mappings array is empty. Error details include the failing rule index and the error reason.

Output Fields

FieldTypeDescription
mapped_dataobjectThe constructed target object containing all successfully mapped fields. Only explicitly mapped fields are present — no unmapped source fields are copied. Access individual mapped fields via {{ $output.dataMappingNode.mapped_data.fieldName }}.

Validation

The node validates on execution (not on save):

Sample Configuration

{
  "nodeType": "data-mapping",
  "settings": {
    "SourceOutput": "crmApiNode",
    "Mappings": [
      { "SourceField": "contact.full_name",          "TargetField": "customerName",    "Transform": "trim" },
      { "SourceField": "contact.email_address",      "TargetField": "email",           "Transform": "lowercase" },
      { "SourceField": "contact.address.city",       "TargetField": "city",            "Transform": "uppercase" },
      { "SourceField": "contact.created_at",         "TargetField": "createdDate",     "Transform": "toDate" },
      { "SourceField": "contact.annual_spend",       "TargetField": "annualSpend",     "Transform": "toDecimal" },
      { "SourceField": "contact.is_active",          "TargetField": "isActive",        "Transform": "toBoolean" },
      { "SourceField": "contact.external_id",        "TargetField": "externalId",      "Transform": "toString" }
    ]
  }
}

Sample Output

Success Port

{
  "mappedRecord": {
    "contact_id": "SF-00123456",
    "first_name": "Michael",
    "last_name": "Torres",
    "email_address": "m.torres@company.com",
    "phone_number": "+1-415-555-0182",
    "company_name": "Meridian Logistics",
    "job_title": "Supply Chain Manager",
    "lead_source": "Website",
    "created_date": "2025-03-15"
  },
  "_fieldsProcessed": 9,
  "_nullFieldsSkipped": 2,
  "_transformsApplied": ["concatenate", "format_date", "normalize_phone"]
}

Expression Reference

ExpressionValue
{{ $output.dataMappingNode.mapped_data.customerName }}The trimmed customer name from the mapped output.
{{ $output.dataMappingNode.mapped_data.city }}The uppercased city value.
{{ $output.dataMappingNode.mapped_data.annualSpend }}The annual spend as a decimal number.

Node Policies & GuardRails

PolicyRationale
Prefer DataMapping over CodeExecute for field renaming and type conversionDataMapping is declarative, auditable, and readable by non-developers. CodeExecute is appropriate for logic that cannot be expressed as per-field transforms — not for renaming fields.
Always handle the error portType conversion failures (e.g., applying toInt to a non-numeric API value) route to the error port silently if it is unconnected. Connect it to a notification or dead-letter queue node.
Use SourceOutput rather than Source (inline JSON) in productionInline JSON in the Source field is static — it does not change with incoming data. For live workflow data, always reference the output of an upstream node via SourceOutput.
Only explicitly mapped fields appear in mapped_dataDataMapping is non-passthrough. Fields not listed in Mappings are absent from the output. If you need to pass additional unmapped fields, add explicit mapping rules for each one or combine with a JsonTransform merge operation.

Pattern Examples

Pattern 1 — Normalize CRM API Response to Internal Order Schema

{
  "SourceOutput": "crmApiNode",
  "Mappings": [
    { "SourceField": "data.contact.id",            "TargetField": "customerId" },
    { "SourceField": "data.contact.name",          "TargetField": "customerName",  "Transform": "trim" },
    { "SourceField": "data.contact.email",         "TargetField": "email",         "Transform": "lowercase" },
    { "SourceField": "data.billing.address.city",  "TargetField": "billingCity",   "Transform": "uppercase" },
    { "SourceField": "data.billing.total",         "TargetField": "totalAmount",   "Transform": "toDecimal" },
    { "SourceField": "data.order.created_at",      "TargetField": "orderDate",     "Transform": "toDateTime" }
  ]
}

Pattern 2 — Flatten Nested API Response for Database Insert

An API returns a nested structure. The DataMapping node flattens it to individual columns ready for a DB insert node.

{
  "SourceOutput": "apiResponseNode",
  "Mappings": [
    { "SourceField": "payload.user.id",              "TargetField": "userId" },
    { "SourceField": "payload.user.profile.age",     "TargetField": "age",           "Transform": "toInt" },
    { "SourceField": "payload.user.profile.country", "TargetField": "country",       "Transform": "uppercase" },
    { "SourceField": "payload.subscription.plan",    "TargetField": "plan",          "Transform": "lowercase" },
    { "SourceField": "payload.subscription.expires", "TargetField": "expiryDate",    "Transform": "toDate" },
    { "SourceField": "payload.metadata",             "TargetField": "metaJson",      "Transform": "jsonStringify" }
  ]
}

Pattern 3 — Webhook Payload Validation and Normalization

Immediately after a WebhookTrigger, validate and normalize the inbound payload to ensure all downstream nodes receive clean, typed data.

{
  "SourceOutput": "webhookTriggerNode",
  "Mappings": [
    { "SourceField": "event",        "TargetField": "eventType",   "Transform": "lowercase" },
    { "SourceField": "data.orderId", "TargetField": "orderId",     "Transform": "toString" },
    { "SourceField": "data.amount",  "TargetField": "amountCents", "Transform": "toInt" },
    { "SourceField": "data.currency","TargetField": "currency",    "Transform": "uppercase" },
    { "SourceField": "timestamp",    "TargetField": "eventTime",   "Transform": "toDateTime" }
  ]
}