Map shape
Introduction
Mappings are at the heart of Patchworks.
When we pull data from one system and push it into another, it’s unlikely that the two will have a like-for-like data structure. By creating mappings between source and target data fields, the Patchworks engine knows how to transform incoming data as needed to update the target system.
The illustration below helps to visualise this:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FUXaPd9hfVKHjFcFuwlXS%252Fmapping%2520analogy.png%3Falt%3Dmedia%26token%3Da28127c9-328e-46d0-bfec-6ae2514dbe58&width=768&dpr=4&quality=100&sign=5fa8afda&sv=1)
In process flows, the map shape is used to define how data fields pulled from one connector correlate with data fields in another connector, and whether any data transformations are required to achieve this.
If your organisation has in-house development expertise and complex transformation requirements, you can use our custom scripts feature to code your own scripts for use with field mappings.
Accessing map shape settings
The map shape includes everything that you need to map data fields between two connections in a process flow. When you start to create mappings, there are two approaches to consider:
Having added a map shape to a process flow, click the associated 'cog' icon to access settings:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FtzXdCpYG33MjZqacvwnS%252Fmap%2520shape%25201.png%3Falt%3Dmedia%26token%3D3da30e21-2160-4a85-9a0c-6dc3fddf0229&width=768&dpr=4&quality=100&sign=8029216&sv=1)
For more information about working with these settings, please see our Working with field mappings page.
Auto-generating mappings between connections
The generate automatic mapping option is used to auto-generate mappings between your selected source and target connections.
All Patchworks prebuilt connectors (i.e. connectors installed from the Patchworks marketplace) adopt a standardised taxonomy for tagging common fields found in data schemas for a range of entity types (customers, orders, refunds, products, fulfillments, etc.). So, if your process flow includes connections to sync data between two prebuilt connectors, it's highly likely that auto-generating mappings will complete a lot of the work for you.
Once auto-generation is complete, mapping rows are added for all fields found in the source data - for example:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FrWbAW7tnZLYd7Bv3VTfG%252Fauto%2520map%2520example.png%3Falt%3Dmedia%26token%3D13d7b804-0c97-45c3-804e-a0fb1e0fdea4&width=768&dpr=4&quality=100&sign=e04ae21f&sv=1)
Where matching tags are found, the mapping rows will include both source and target fields (you can adjust these manually and/or apply transformations, as needed).
Any fields found in the source data which could not be matched by tag are displayed in partial mapping rows, ready for you to add a target manually.
For more information about using the generate automatic mapping feature, please see our Working with field mappings page.
Auto-generating mappings for custom connections
If your process flow includes custom connections (i.e. connectors that have been built by your organisation, using the Patchworks connector builder), you can still use the generate automatic mapping option. The success of this will depend on whether field tagging was applied to your connector during the build:
If yes, your custom connector will behave like any of our prebuilt connectors when it comes to auto-generated mappings, adding fully mapped rows for all matched tags.
If no, Patchworks won't be able to match any source fields to a target automatically - partial mapping rows are added for all source fields found, ready for you to add a target manually.
Adding mappings manually
It's very easy to add individual mapping rows manually, using the add mapping rule option:
![](https://doc.wearepatchworks.com/~gitbook/image?url=https%3A%2F%2F2440044887-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FLYNcUBVQwSkOMG6KjZfz%252Fuploads%252FPy0dH1XpwAR2DI25iNdX%252Fadd%2520mapping%2520rule%2520button.png%3Falt%3Dmedia%26token%3D8ae6662b-094d-4de0-8c16-454ec3586d1e&width=768&dpr=4&quality=100&sign=dba08651&sv=1)
We recommend that you always try the automatic mapping option first and then manually add any extra rows if needed. However, there's no reason that you couldn't add all of your mappings manually if preferred.
For more information about adding mappings manually, please see our Working with field mappings page.
Last updated