> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/field-mappings-services.md).

# Field mappings (services)

## Introduction

This page contains information that may be useful when you're adding or updating field mappings for a service.

## Accessing field mappings for a service

**Step 1**\
Access the [services list](/product-documentation/patchworks-services/working-with-services/accessing-services.md) and select the required service to view options and information:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/pZaFbYegEBTKki3EcMcb/select%20service%20cropped.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Please see [accessing services](/product-documentation/patchworks-services/working-with-services/accessing-services.md) if you're not sure how to get to this point.
{% endhint %}

**Step 2**\
Select the **mapping** tab:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/XT0HHUH9ZWiIiRYkaAlN/select%20mapping%20tab.png" alt=""><figcaption></figcaption></figure>

**Step 3**\
The **field mapping** page is displayed with mappings organised in logical categories, based on the **destination** connector:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/504IWmhWpQNe5CfVAEFL/field%20mapping%20page.png" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If no mappings are displayed when you access this page, don't panic! Please see [How to handle an empty mapping](/product-documentation/patchworks-services/troubleshooting/how-to-handle-an-empty-mapping-page.md) page for guidance on what to do in this situation.
{% endhint %}

## Working with field mappings

### **Viewing details for a field mapping**

To view details for a mapping entry, click anywhere in a row to expand details:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/rXNHKIBEx8OOkDteZAza/view%20field%20mapping%20details.png" alt=""><figcaption></figcaption></figure>

### **Editing a field mapping**

To edit mapping details for an entry, click the **edit** button in detail view:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/S3eZMvxwoo1YWlATkksv/edit%20mapping%20option.png" alt=""><figcaption></figcaption></figure>

...the mapping is opened in edit mode and you can make changes as required:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/aYgGFUGT894Bv1FOywqG/edit%20field%20mapping%202.png" alt=""><figcaption></figcaption></figure>

...click the **done** button to confirm changes:\
\
![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/M6gxNL2HSqFskeLT6PC2/mapping%20edit%20done.png)

{% hint style="info" %}
If a mapping row is marked with a red star, it means that at least one-half of the mapping is locked for editing because the values are expected by Patchworks.
{% endhint %}

### **Mapping custom fields**

When a service is added, a set of default mappings is created which, as noted [above](#editing-a-field-mapping), can be edited if required. Clicking the **source** or **destination** for an existing mapping lists all standard fields from the system schema - for example:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/QUvO8PftA2vZgSB9b1VC/mapping%20fields%201.png" alt=""><figcaption></figcaption></figure>

If needed, you can use the **enter custom field** button to map a non-standard field. This is particularly useful if you've created custom fields in a system (for example, Netsuite) which need to be synced. &#x20;

When you click this button, the field becomes active and you can enter the required value - click anywhere outside the field to confirm your change.&#x20;

It's important to note that custom field values must adhere to the **top-level schema path** for the associated system - typically this will be `orders.0`, `products.0`, `customers.0,` etc. For example:

![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/aAcOPMvxPHJH2P4WYOR7/mapping%20fields%203.png)

{% hint style="info" %}
To check the expected top-level path, click in the **source** or **destination** field to see the list of standard fields, as shown in our example above (where the top-level path is `customers.0`). For example:

![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/UbGAOdoXd7JllJ6okNrJ/mapping%20fields%204.png)\
\
In this example, the top-level path for a custom field would be `products.0`.
{% endhint %}

{% hint style="warning" %}
Ensure that the full path for a custom field is specified correctly. Patchworks checks and validates the top-level path, but subsequent nesting cannot be validated. &#x20;
{% endhint %}

{% hint style="info" %}
If you are working with Netsuite custom fields, please see our [Working with Netsuite custom fields](/product-documentation/patchworks-services/service-systems/supported-service-systems/netsuite-service-connector/working-with-netsuite-custom-fields-services.md) page for specific guidance.
{% endhint %}

### **Mapping the same field multiple times**

If you need to map the same source field to multiple destinations, there are two options:

* If you have the **advanced editor** [user role](broken://pages/sNrlmpgLbYhnny02igKi), use the **advanced editor** to define required mappings.
* Contact [Patchworks support](/product-documentation/patchworks-services/support/raising-a-support-ticket.md) to complete the required mappings on your behalf.

{% hint style="info" %}
When syncing data with Patchworks [services](broken://pages/2m0XggAwLUq0vHystyPC), the same field cannot be mapped twice via the self-serve UI.
{% endhint %}

### **Removing a mapping**

To remove a mapping entry, click the **trash** icon in detail view:

<figure><img src="https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/SwG0kGNCR9UjRaDtwF6O/remove%20mapping.png" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
This option is not available for mapping entries marked with a red star (i.e. entries which are required by Patchworks).
{% endhint %}

### **Saving the mapping file**

Having made all required updates, click the **save changes** button at the bottom of the page.&#x20;

## Further information

For more information please see:

* [Field transformations](/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/field-transformations-services.md)
* [Transform mapping/lookup tables](/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/transform-mapping-lookup-tables-services.md)
* [Custom scripting](broken://pages/oZoHN71i3KN7FMkgdP1x)
