# Additional setup notes for NetSuite (services)

## Introduction

This page includes additional information and resources that may be useful when configuring NetSuite in Patchworks:

* [NetSuite documentation](#netsuite-documentation)
* [Patchworks filters](#patchworks-filters)
* [Special options when pulling data from NetSuite](#special-options-when-pulling-data-from-netsuite)
* [Special options when pushing data to NetSuite](#special-options-when-pushing-data-to-netsuite)
* [API endpoints](#api-endpoints)

## Netsuite documentation

The following links to NetSuite's own documentation may be useful if you need to dig deeper into NetSuites fields (for example, to configure advanced mappings):

* [Sales order fields](https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2022_2/schema/record/salesorder.html)
* [Customer fields](https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2022_2/schema/record/customer.html)
* [Credit memo fields](https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2022_2/schema/record/creditmemo.html)

## Patchworks filters

When you are pulling data from NetSuite, filters can be used to refine the data that is pulled. Available filter options vary, depending on which **entity type** is being synced (for example: orders, products, customers, etc.).

{% hint style="info" %}
For general information about working with filters in Patchworks, please see our [service filters](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/the-anatomy-of-a-service/service-filters) page.
{% endhint %}

### Time period filters

A common scenario for filters is to process records created/modified in the last x minutes/hours/days, or within a given timeframe. For NetSuite, these filter fields are:

* Date created
* Date modified

In this scenario, we're dealing with events that have occurred in the past, so Patchworks filters are defined to work back from 'now'.

<details>

<summary>Example</summary>

Let's say that we only want to process all orders which were modified in the last 2 hours. In the Patchworks dashboard, our filters would look as follows:

![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/pOPgu1iJXYfoMzV30XW3/NetSuite%20-%20filter%20-%20in%20last%202%20hours%20-%20pw.png)

We can visualise this as below:

![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/GH3ta6rb6PU6yzm7WKRq/netsuite%20last%20modified%20before.png)

</details>

{% hint style="warning" %}
Currently, it's not possible to add the same filter field twice, therefore you cannot define a start and end timeframe.
{% endhint %}

NetSuite also includes a range of time period filters that deal with events that may occur in the future - for example: due date, ship date, expected close date, next bill date, etc. In this scenario, filters are defined to work forwards from 'now'.

<details>

<summary>Example</summary>

Let's say that we only want to process all orders where the **next bill date** is 7 days or more ahead. In the Patchworks dashboard, our filters would look as follows:

![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/HxXLNlRwanv62qCpCfDd/netsuite%20later%20pw.png)

We can visualise this as below:

![](https://content.gitbook.com/content/5mpqoXPMbUuPa8JpCLWe/blobs/aJSBvUe4JgrgGEq61lpd/netsuite%20later.png)

</details>

{% hint style="warning" %}
Currently, it's not possible to add the same filter field twice, therefore you cannot define a start and end timeframe.
{% endhint %}

## Special options when pulling data from NetSuite

When you choose to add NetSuite as a data **source**, you're prompted to provide details for a set of [standard options which are common to all source connectors](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/the-anatomy-of-a-service/service-source), irrespective of the system being used.&#x20;

In addition, depending on the entity being synced, some NetSuite-specific **source** options may be required. These options are summarised below:

| Entity synced | Field | Field summary |
| ------------- | ----- | ------------- |
| -             | -     | -             |

## Special options when pushing data to NetSuite

When you choose to add NetSuite as a data **destination**, you're prompted to provide details for a set of [standard options which are common to all destination connectors](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/the-anatomy-of-a-service/service-destination), irrespective of the system being used.&#x20;

In addition, depending on the system you're pulling data from and the entity being synced, some NetSuite-specific **destination** options may be required. These options are summarised below.

{% tabs %}
{% tab title="From Shopify" %}

| Entity synced         | Field                              | Field summary                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| --------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Customers             | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| Fulfilments           | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| Orders(Orders)        | async, threaded, concurrency limit | These options utilise NetSuite's concurrency feature. Please see our [NetSuite concurrency](https://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/netsuite-service-connector/netsuite-concurrency-services) page for details.                                                                                                                                                      |
| Orders(Orders)        | Send customer deposit              | Enables the creation of 'customer deposit' records linked to the sales order in NetSuite. You should only enable this setting if you are sending order payments to NetSuite.                                                                                                                                                                                                                                                                     |
| OrdersRebound(Orders) | async, threaded, concurrency limit | These options utilise NetSuite's concurrency feature. Please see our [NetSuite concurrency](https://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/netsuite-service-connector/netsuite-concurrency-services) page for details.                                                                                                                                                      |
| OrdersRebound(Orders) | Send customer deposit              | Enables the creation of 'customer deposit' records linked to the sales order in NetSuite. You should only enable this setting if you are sending order payments to NetSuite.                                                                                                                                                                                                                                                                     |
| Products(Products)    | record type                        | There are many kinds of 'product' records in NetSuite - this value tells Patchworks what type of records to create. **InventoryItems** is the most typical product type used. If you use anything different, make sure that your [field mappings](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/field-mappings-services) are adjusted accordingly. |
| Products(Products)    | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| Stocklevels(Stock)    | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| Inventory Levels      | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| Webhook Orders        | async, threaded, concurrency limit | These options utilise NetSuite's concurrency feature. Please see our [NetSuite concurrency](https://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/netsuite-service-connector/netsuite-concurrency-services) page for details.                                                                                                                                                      |
| Webhook Orders        | Send customer deposit              | Enables the creation of 'customer deposit' records linked to the sales order in NetSuite. You should only enable this setting if you are sending order payments to NetSuite.                                                                                                                                                                                                                                                                     |
| {% endtab %}          |                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

{% tab title="From BigCommerce" %}

| Entity synced      | Field                              | Field summary                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Orders (Orders)    | async, threaded, concurrency limit | These options utilise NetSuite's concurrency feature. Please see our [NetSuite concurrency](https://doc.wearepatchworks.com/product-documentation/patchworks-services/service-systems/supported-service-systems/netsuite-service-connector/netsuite-concurrency-services) page for details.                                                                                                                                                      |
| Orders (Orders)    | Send customer deposit              | Enables the creation of 'customer deposit' records linked to the sales order in NetSuite. You should only enable this setting if you are sending order payments to NetSuite.                                                                                                                                                                                                                                                                     |
| Products(Products) | record type                        | There are many kinds of 'product' records in NetSuite - this value tells Patchworks what type of records to create. **InventoryItems** is the most typical product type used. If you use anything different, make sure that your [field mappings](https://doc.wearepatchworks.com/product-documentation/patchworks-services/working-with-services/field-mappings-and-transformations-services/field-mappings-services) are adjusted accordingly. |
| Products(Products) | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| Customers          | async                              | Not currently used. This is a placeholder setting for a future concurrency feature.                                                                                                                                                                                                                                                                                                                                                              |
| {% endtab %}       |                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| {% endtabs %}      |                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

## API endpoints

If you're an advanced Patchworks user and ever need to work with NetSuite API endpoints, be aware that they are case sensitive.
