# Setting unique IDs for  NetSuite product syncs (services)

## Introduction

When synching products from a source system into NetSuite, every item must have a unique identifier which Patchworks can use for record matching. Typically, this identifier is known as the **ExternalID**.

{% hint style="info" %}
Less commonly - depending on integration requirements - NetSuite's **Internal ID** may be used for this purpose.
{% endhint %}

When synching products to NetSuite, some preparation is required to ensure that this unique identifier has been configured. Before products can be synced to NetSuite:

* [The items must exist in NetSuite, with unique identifiers](#choosing-which-netsuite-field-to-use-as-the-externalid)
* [NetSuite must be configured so it knows which item field should be used as the ExternalID for record matching](#configuring-the-externalid-in-netsuite) &#x20;

With this setup in place, the [ExternalId can be specified in Patchworks field mappings](#mapping-the-externalid-in-patchworks) for any required services.

## Choosing which NetSuite field to use as the ExternalId

Often, SKUs used on the associated eCommerce site are designated as **ExternalIDs** but any unique, common reference can be used.

In NetSuite, the **item name/number** field is an obvious choice to store the **ExternalID** for an item however, it doesn't matter which NetSuite field is used, provided that the same field is used consistently.

## Configuring the ExternalID in NetSuite

NetSuite must be configured so it knows which item field must be used as the **ExternalID** for syncing products/items.&#x20;

This task should be completed by a NetSuite administrator, as part of the onboarding process for Patchworks.&#x20;

## Mapping the ExternalID in Patchworks

In Patchworks, [field mappings](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/field-mappings-services) are used to define which source data field  correlates to the **ExternalID** in NetSuite - for example:

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