# 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="/files/eXyCgt3foeqHPwf0erCc" 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="/files/pj8qClS11yoDKJONZAL7" 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="/files/04tXsKILjbaBautOz57I" 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="/files/hnAO8i9gMjVGuwPfRp7n" 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="/files/qOzeFIlj8lhM5iWSduSz" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/H2wisdARvnBbz6Mz1M3k" alt=""><figcaption></figcaption></figure>

...click the **done** button to confirm changes:\
\
![](/files/jDQZTXLXFBW23h5YprXh)

{% 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="/files/9XUkq2jkWdfFmAsstYAG" 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:

![](/files/RVJrAsYwOMvrNvEFrPub)

{% 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:

![](/files/fqVrXcW0TP9dxAyXn4ZF)\
\
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="/files/hpVCDGK9MN9xuTKY0n9F" 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/field-mappings-services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
