# Sync Order IDs

Before an order can be processed further, HotWax ensures successful creation in NetSuite by syncing order ID and order item IDs.

## Create Orders in NetSuite

### Export orders from HotWax

Schedule a job in the HotWax Commerce integration layer to create a file of orders in HotWax that have not yet been sent to Netsuite.

{% hint style="warning" %}

```
To change this job's frequency, connect with the integration team.
```

{% endhint %}

**SFTP Location for exported 'Created' orders with verified customers**

```
/home/{sftp-username}/netsuite/salesorder/export
```

### Import orders into NetSuite

Schedule the following SuiteScript in NetSuite to consume the file of new orders from HotWax.

```
HC_importSalesOrders
```

{% hint style="success" %}

```
Orders are now created in NetSuite
```

{% endhint %}

## Import Order IDs from NetSuite

Now that the order is created in NetSuite, the following jobs will sync their identifications back to HotWax for a full sync.

### Export order line item IDs from NetSuite

Schedule this script to export order item IDs from NetSuite to enable order updates during allocation.

```
HC_MR_ExportedSalesOrderItemCSV
```

### Import order line item IDs into HotWax

Enable this Job from the Orders page in the Job Manager app.

```
Order Item Attribute
FTP Config: IMP_ORDER_ITM_ATTR
```

### Export order IDs from NetSuite

Schedule this SuiteScript in NetSuite to export NetSuite internal order IDs of recently created orders that have not been synced back to HotWax.

```
HC_MR_ExportedSalesOrderCSV
```

### Import order IDs into HotWax

Enable this Job from the Orders page in the Job Manager app to consume the file generated by NetSuite.

```
Order Identification
FTP Config: IMP_ORDER_IDENT
```

{% hint style="success" %}

```
Orders and order line IDs are now synced back into HotWax
```

{% endhint %}


---

# 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://docs.hotwax.co/documents/learn-netsuite/synchronization-flows/order-sync/sync-orderids.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.
