Working with field mappings


This page provides guidance on using the map shape to configure field mappings between two connections.

Configuring a new map shape

Step 1 Click the source endpoint option:

...source and target selection fields are displayed:

Step 2 Use source and target selection fields to choose the required connector instance and associated endpoints to be mapped - for example:

Step 3 Click the generate automatic mapping button:

...when prompted to confirm this operation, click generate mapping:

As we're configuring a new map shape, there's no danger that we would overwrite existing mappings. However, always use this option with caution if you're working with an existing map shape - any existing mapping rules are overwritten when you choose to generate automatic mappings.

If you need to access the generate automatic option for an existing mapping shape, you need to click into the source and target details first.

Step 4 Patchworks attempts to apply mappings between your given source and target automatically, based on standardised field tags. A mapping rule is added for each source data field and, where possible, a matched target field - for example:

From here you can refine mappings as needed. You can:

Step 5 Toggle the wrap payload on, if required.

This setting handles cases where your destination system is expecting a payload to be wrapped in an array, but your payload contains a series of 'unwrapped' objects. Typically payload wrapping is defined in the 'pull' connector step but there may be occasions where this option is needed later in the flow, from the map step.

Setting payload wrapping to wrapped will wrap the entire payload as an array object. So, {customer_1},{customer_2}{customer_3} is pushed as [{customer_1},{customer_2}{customer_3}] .

Step 6 Save changes.

Adding a new mapping rule

You can add as many new mapping rules as required to map data between source and target connections.

Specifying a mapping field manually

There may be times where you don't want to (or can't) use the payload fields dropdown select a field from your source/target data schema. In this case, you simply select the manual input field and enter the full schema path for the required field.

Changing display names or fields in an existing rule

You can change the display name and/or the field associated with the source or target for any mapping rule.

Adding a target mapping for a partial mapping rule

If you've used the automatically generate map option to generate an initial set of mappings, you may find that some source fields could not be auto-mapped. In these cases, a mapping rule is added for each un-mapped source field, so you can either add the required destination or delete the rule.

Mapping a source field to multiple targets

If required, you can map a source field to multiple target fields - for example, you might need to send a customer order number into two (or more) target fields.

Mapping multiple source fields to a single target

Sometimes it can be useful to map multiple source fields to a single target field. For example, you might have a target connection which expects a single field for 'full name', but a source connection with one field for 'first name' and another field for 'surname'.

In this case, you would define mappings for the required source and target fields, then add a transform function to concatenate the two source fields.

Deleting a mapping rule

When you choose to delete a mapping rule, it's removed from the list immediately. However, the deletion is not permanent until you choose to save the mapping shape.

Last updated