Mapping Arrays in Visual Data Mapper

Arrays or collections require a couple of extra steps compared to direct field mappings. Before we can map fields within an array, that array must itself be mapped, as outlined below.

Step 1: Open the Visual Data Map

Visual Data Mapper is opened from within Workflow Designer.

See our step-by-step walkthrough: Opening a Visual Data Map.

Step 2: Map the array between target and source

To do this, we must first select the arrays that will be paired together, then update, then configure child field mappings.

Examples of when to map arrays include:

  • Mapping between document_lines on different document types within SAP Business One (B1).
  • Mapping between Shopify OrderFulfillment lines to B1 Delivery document_lines.

To map arrays:

  1. Select the desired target array (marker 1).

  2. Drag the desired source array from the source onto the target. This tells Visual Data Mapper that when there’s a source array, it’s associated with that target array, and will allow child fields within both target and source arrays to be mapped together.

    In the screenshot below, drag the source array (markers 2, 3) to the target (marker 4)

  3. Update array settings, if desired. Child JSON Path selects a subset of the source array, based on the specified details. By default, leave this set to select all content at the source node: *

  4. Save or apply child field mappings. At this point, child fields of the target array may be mapped as outlined below.

Step 3: Map fields within the target array

  1. Select the desired target field within the array.
    • Note that the source array child fields are highlighted and may be mapped.
    • Fields outside of the array may also be mapped (for example, you may include a header property like currency code in the map).
  2. Map fields from the source, as described in Visual Data Mapper - Step 6: Apply Mapping Settings, or follow one of these tutorials:
  3. Update settings before selecting another field.

Step 4: Save updates

Save update to apply any configured field mappings. At this point, the map will be used when running the workflow.

Technical Reference

See Array Mapping Reference for technical details.