> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/netsuite.md).

# NetSuite

Create an integration record in NetSuite and enter its credentials in MESA to connect your account for ERP and order sync workflows.

<figure><img src="https://docs.getmesa.com/assets/netsuite-connect.png" alt="Screenshot of a NetSuite step in the MESA workflow builder, not yet connected. Spotlight the Account ID, Client ID and Client Secret fields and the Sign in with NetSuite button."><figcaption></figcaption></figure>

## Connection

When you're setting up your first workflow with NetSuite, you will need to create a [Connection](https://docs.getmesa.com/going-further/credentials/) in order to connect MESA with NetSuite.

MESA connects to your own NetSuite account through an integration record that you create once in NetSuite.

### Set up NetSuite

1. In NetSuite, go to Setup > Company > Enable Features.
2. On the SuiteCloud tab, turn on REST Web Services and OAuth 2.0, then click Save.
3. Go to Setup > Integration > Manage Integrations > New.
4. Name the record, for example MESA.
5. Under OAuth 2.0, turn on Authorization Code Grant.
6. Choose the REST Web Services scope.
7. Set the Redirect URI to `https://backend.composio.dev/api/v1/auth-apps/add`.
8. Click Save, then copy the Client ID and Client Secret.

:::caution
NetSuite shows the Client Secret only once. Save it somewhere safe before you leave the page.
:::

The NetSuite user who signs in needs a role with the REST Web Services and Log in using OAuth 2.0 Access Tokens permissions.

### Connect MESA

1. In your NetSuite step, enter your Account ID. You can find it in NetSuite under Setup > Company > Company Information, for example 1234567, or 1234567_SB1 for a sandbox.
2. Enter the Client ID and Client Secret.
3. Click Sign in with NetSuite.
4. In the NetSuite window that opens, approve MESA.

After that, choose the same connection in any NetSuite step.

## Configure

### Triggers

NetSuite triggers check your account on a schedule, every hour by default. You can change how often under Repeats. Each record type has two triggers: Created, and Created or Updated.

The record types are Customer, Vendor, Contact, Employee, Item, Sales Order, Invoice, Cash Sale, Estimate, Credit Memo, Return Authorization, Customer Payment, Item Fulfillment, Purchase Order, Item Receipt, Vendor Bill, Vendor Payment and Journal Entry.

### Actions

NetSuite steps create, get, update, list and delete customers, vendors, employees, items, sales orders, invoices, purchase orders, payments, fulfillments, receipts, bills and journal entries. For any other record type, use Create Record, List Records, Upsert Record By External ID or Transform Record.

Record fields are dropdowns that list what is in your NetSuite account. In steps with a Retrieve Fields button, click it to load the fields of that NetSuite record type from your account.

## Technical Notes

* NetSuite triggers check your account on the schedule you choose under Repeats, so a new or updated record shows up in MESA at the next check. Each check picks up everything that changed since the one before.
* NetSuite ends sign-ins after a while. When that happens, click Sign in with NetSuite in any NetSuite step to reconnect. Your Account ID, Client ID and Client Secret stay the same.
