> ## Documentation Index
> Fetch the complete documentation index at: https://docs.luxima.io/llms.txt
> Use this file to discover all available pages before exploring further.

# NetSuite

> Bring items in from your NetSuite ERP.

If NetSuite is where your items are created and maintained, connecting it means your passports start from the same data your business runs on.

## Why connect NetSuite

* **No retyping.** Item names, codes, barcodes, sizes, colours and weights come straight from your ERP.
* **Material weights from bills of materials.** LUXIMA can read an item's BOM and turn it into the weight of each material.
* **Work orders at print stations.** With label printing, operators can find what to print by work order number.

## What you need

* The **Enterprise** plan.
* The Owner or Admin role in LUXIMA.
* A **NetSuite administrator** to do the NetSuite side.
* In NetSuite, these features switched on under Setup > Company > Enable Features > SuiteCloud: REST Web Services, OAuth 2.0, and Client Credentials (Machine to Machine) Grant.
* A NetSuite user and a view-only role that can read items. We recommend a dedicated integration user.

LUXIMA connects with a certificate, not a password, and only reads from NetSuite.

> [!TIP]
>
> In the NetSuite panel, click **Download setup guide (PDF)** for a version of these steps to send to your NetSuite administrator.

## Connect

**1. Generate a certificate in LUXIMA**

Go to **Integrations**. On the **NetSuite** card, click **Set up NetSuite**, then **Generate certificate**.

Click **Download PEM** (or **Copy certificate**) straight away. The public certificate is shown only once.

**2. Create an integration record in NetSuite**

In NetSuite, go to Setup > Integration > Manage Integrations > New.

* Set the state to Enabled.
* Tick **Client Credentials (Machine to Machine) Grant**.
* Untick Token-Based Authentication.

Save, and copy the **Client ID** (consumer key). NetSuite shows it only once.

**3. Upload the certificate in NetSuite**

Go to Setup > Integration > OAuth 2.0 Client Credentials (M2M) Setup > New.

Choose the user (entity), the role and the integration record you just created, and upload the PEM file. Save, and copy the **Certificate ID**.

**4. Enter the values in LUXIMA**

Back in LUXIMA, under **NetSuite setup values**, fill in:

| Field | Where to find it |
| - | - |
| **Account ID** | Setup > Company > Company Information. Sandbox accounts usually end in \_SB1. |
| **Client ID** | From the integration record. |
| **Certificate ID** | From the M2M setup. |
| **Entity / user** | The integration user you chose. |
| **Role name** | The role you chose. |

Click **Save setup**.

**5. Test the connection**

Click **Test connection**. LUXIMA requests access and reads one item. It never writes to NetSuite.

When you see "Read-only connection verified", NetSuite is ready.

> [!NOTE]
>
> NetSuite can be used in import workflows only after the test has passed.

## Import your NetSuite items

Click **Import** on the NetSuite row, then **Import with a workflow**. NetSuite is added as a source in an [import workflow](https://docs.luxima.io/import-export/import-overview.md).

### What NetSuite brings in

Item name and display name, item code, barcode (UPC), description, class, department, weight, and your account's custom item fields. A matrix item becomes one product, and its child items become the variants.

Left out to start with, though you can still tick them: services, charges, discounts, kits, non-inventory items, and components of other items.

### Check the field mapping

In the NetSuite step of the workflow, click **Check fields** to see which NetSuite field feeds which LUXIMA field. Change one if a value lands in the wrong place, then click **Use these fields**.

You can map NetSuite fields to: product name, SKU / item code, GTIN / barcode, size, colour, category, department, description, HS code, season, country of origin, weight and composition.

## Material weights from BOMs

After you have imported NetSuite items, open **Settings** on the NetSuite row and find **BOM material weights**.

**1. Fetch**

Click **Fetch BOM materials**. LUXIMA reads the bills of materials for your imported items, 25 products at a time.

**2. Review**

Check the counts: products checked, components, matched materials and those that need review.

**3. Import**

Click **Import material weights** to write the matched weights into the products' composition.

## Work orders

If you use label printing, LUXIMA copies your NetSuite work orders from the last 30 days automatically, so operators at a print station can search by work order number. There is nothing to set up.

## Renew the certificate

The certificate is valid for 365 days. The NetSuite row shows the date it expires.

**1. Rotate**

In the NetSuite panel, click **Rotate certificate** and download the new PEM.

**2. Update NetSuite**

Upload the new PEM in NetSuite's M2M setup and copy the new Certificate ID.

**3. Save and test**

Enter the new **Certificate ID** in LUXIMA, click **Save setup**, then **Test connection**.

> [!WARNING]
>
> Rotating replaces the stored key at once. Imports from NetSuite stop working until you finish the steps in NetSuite and the test passes again.

## Remove the connection

Click **Forget credentials** in the NetSuite panel. Products you already imported stay in your catalogue.

To remove the products an import created, find that import under **Recent imports** and click the bin icon. This deletes the products that import created. It does not touch NetSuite.

## Messages you might see

| Message | What to do |
| - | - |
| "NetSuite token request failed: invalid\_grant" | NetSuite rejected the certificate details. Check the Account ID, Client ID and Certificate ID, and that the certificate is mapped to the right user and role. |
| "Generate a NetSuite certificate before testing the connection" | Do step 1 first. |
| "NetSuite token is not authorised for SuiteQL item reads" | The role cannot read items. Give it view access to items in NetSuite. |
| "NetSuite is busy" | Your account's limit on simultaneous requests is in use, often by other integrations. Try again in a minute; reading carries on from where it stopped. |
| "Test the NetSuite connection on the Integrations page first" | Run **Test connection** until it passes. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.