Articles in this section

Export data from NetSuite

A flow export queries or copies data from a source application or system. You also have options for mapping and transforming the data as it is extracted from the source application. Within NetSuite integrations, several built-in features help you accomplish common tasks encountered when exporting records.

Create an export

To export data from an application, for example, NetSuite, enter details in the following sections:

  • From the Resources menu, select Exports. In the resulting Exports page, click Create export. For the application type, select NetSuite. Establish the connection to NetSuite and name the export.

    or

  • From the Build menu, select Flow builder. For the Source application, select NetSuite.

There are two categories of Execution type available: scheduled and real-time. (These options are available only when initially creating the export flow. The Execution type is no longer exposed after you save the export.) Using a combination of scheduled and real-time exports in different flows is also very common. For example, you might enable a real-time export to send item pricing updates to your website and then use a nightly scheduled export to send inventory updates.

Scheduled exports

NetSuiteExport1.png

Scheduled exports run at specific intervals of time and group the data page by page.

The API Type field is on the General tab. It controls how integrator.io calls NetSuite. The following options are available for NetSuite exports:

  • Celigo RESTlets – Use this option to connect through the Celigo RESTlet. It supports SuiteScript hooks and data transformations. The NetSuite API version field appears only when Celigo RESTlets is selected.

  • REST APIs – Available for record-based flows only. When you select REST APIs, choose one of the following sub-options:

    • SuiteTalk (default) – Uses NetSuite’s SuiteTalk REST web services to interact with records.

    • Custom RESTlets – Uses custom RESTlet scripts deployed in your NetSuite account.

    Your selection is saved with the flow. You can switch between SuiteTalk and Custom RESTlets at any time.

  • SOAP Web Services (Deprecated) – Use this option if you have a NetSuite SuiteCloud Plus license and need to export large data volumes. This is the only option if you cannot install the integrator.io bundle in your NetSuite account.

Tip

To export more data per license, combine Celigo RESTlets and REST APIs exports.

SuiteTalk configuration

When SuiteTalk is selected, the export displays a Simple view by default. Toggle to HTTP view to configure the raw request directly. A base URL is not required — it is handled automatically.

Simple view (default) includes the following fields:

  • Record/resource type – Select the NetSuite record type to interact with (for example, Customer or SalesOrder).

  • Operation – Select the action to perform: Create, Read, Update, Delete, or Query.

  • Filter/query parameters – Filter the records this export returns.

HTTP view exposes the underlying request configuration directly:

  • HTTP method – The HTTP verb used for the request.

  • URL path – The path appended to the base URL for the request.

  • Headers – Key-value pairs sent with the request.

  • Query parameters – Parameters appended to the URL.

  • Request body – The data sent with the request. Use JSON format.

Note

Field values transfer between Simple view and HTTP view where they match.

Custom RESTlets configuration

Custom RESTlets uses HTTP view only. The HTTP view exposes the same fields as SuiteTalk’s HTTP view. These include HTTP method, URL path, headers, query parameters, and request body. A base URL is not required — it is handled automatically.

Setting up a NetSuite saved search

When extracting data from NetSuite in a scheduled export, integrator.io queries saved searches.

To set up a new saved search in NetSuite, complete the following steps:

  1. Log into the NetSuite account that you are exporting data from.

  2. From the Lists menu, select Searches > Saved searches > New.

  3. Enter a Search title with a name that is meaningful for the export.

  4. Click the Public checkbox to set the access to “public,” leave it blank to create a “private” search. (Public NetSuite searches allow you to select the search from a drop-down list in integrator.io. For private NetSuite searches, you must enter the search ID.)

  5. Add criteria based on the data you want to extract from NetSuite. For example, to create an auto-billing flow for sales orders, you would add criteria for Type: is Sales Order, Status: is Pending Billing, and so on.

    image11.png
  6. On the saved search Results tab, set Sort by to Internal ID.

    360006970712-image2__1_.png
  7. In the Columns section, choose the fields that you need data from.

    Tip

    Adding a Custom label for the fields will make it easier for mapping on the import part of the flow. It is also simpler if you need to use formulas in the results.

    image10.png

NetSuite saved search date filters may return unexpected records

If your NetSuite export is returning records that your saved search appears to exclude, your saved search may include a date filter with a specific time component (for example, “on or before today 5:00 AM”). The SuiteScript API ignores the time portion of date filters and evaluates only the date, which can cause the saved search to return records you expect to be filtered out.

To work around this, use one of the following options:

  • Add the Date Created field to your saved search results and apply additional filtering using the Additional Search Criteria section of your export configuration.

  • Add an output filter to your flow to exclude unwanted records before they are processed downstream.

  • Use a preSavePage script to filter records by both date and time before the export runs.

Export types

When exporting data from NetSuite, integrator.io provides four options for the Export type.

  • All – Export all data returned in the search each time the flow runs

  • Delta – Export all data with a date/time value for the selected field that is greater than the last time the data flow was run

  • Once – Export any data that has not been exported already and will also automatically update records to mark them as exported

  • Limit – Export a limited number of records based on the value specified (default is 1, and maximum is 100)

Grouping rows

Grouping is a feature that allows you to choose whether or not data exported from NetSuite should be returned together, according to the internal ID. When the NetSuite saved search is sorted by internal ID, then the records exported to integrator.io are grouped together into a data set, represented by a single array object.

If your NetSuite saved search is outputting multiple rows for each record, then check this box to tell integrator.io to group rows accordingly.

In certain cases, this default grouping may not be intended. Simply leave the box unchecked to turn off the default grouping (as well as the validation that required the NetSuite saved search to be sorted by internal ID).

Important

If you don’t use a transformation after checking Group rows, your import will include an extra, unneeded array layer. The correct array layer after using Group rows should be {{data.0.field}}, but without the transformation step, it becomes {{data.[0].0.field}}. Every time you edit the import step and click Save, even if you don’t change anything, integrator.io will add another array layer ({{data.[0].[0].0.field}}). To mitigate this issue, delete the padded array layer from your import every time you save your import.

Note

When Group rows is not checked, then all search rows will be exported as individual records. If any type of grouping is needed later, that can be implemented via a custom hook or in a wrapper using the integrator.io extension framework.

Sample data

Note

NetSuite automatically adds the id and RecordType fields. The DataURI displays in the sample data in case the record fails on import. In such cases, you can click View export record to review the value in the DataURI field. On runtime, however, the field is not available. If you map to this field, you’ll end up with a null on runtime.

This field provides a sample, containing the first row of the NetSuite saved search results in JSON format. The custom labels provided in the saved search results are the JSON properties/names, and they are paired with the data for the corresponding NetSuite field. The data is grouped depending on whether Group rows is set. When it is set, the data will be in the form of an array of JSON objects.

360007043631-pasted_image_0__5_.png

If Group rows is not set, the data will be single JSON objects.

360007043731-pasted_image_0__6_.png

Real-time exports

You can configure a NetSuite export to run on a scheduled basis with a wide array of scheduling options, or in real-time based on actual events happening inside NetSuite, such as a record being saved. Scheduled exports are ideal for syncing data in bulk, or when the timing of a sync is not critical, or when it is just not possible due to where the data is being sent. Generally speaking, scheduled exports are easier to configure and manage, and can also be a better option when getting started with a new integration use case. Real-time exports are slightly harder to configure and manage, but are a great fit for time-sensitive flows.

createListener.png

Use the following fields to create your listener:

  • Record type (required): Select which NetSuite record type you want to export. You can choose any standard record type (customer, sales order, journal entry) or any custom record type that has been defined in your NetSuite account. The list of record types is dependent on the permissions associated with your NetSuite connection. You can use the Refresh refresh.svg icon to regenerate the list of available record types if you add any new custom record types to your NetSuite account or if there are any changes to the permissions associated with the connection you’ve chosen for the export.

  • Execution context (required): Specify the conditions that must be met to trigger a real-time export. For example, many real-time exports are built to be triggered by changes made by end users interacting with a website, user interface, or web store. These values represent changes made by end users (like a user editing a customer record in the browser or a shopper submitting an order via the web store). User actions are recorded as small packets of data that must propagate quickly to other applications. For example, new web orders should be sent to the shipping API ASAP. Execution context values like CSV import are risky to enable because they can slow down your mass update due to the overhead of sending data to an external system one record at a time, and you may inadvertently flood your integration with too many individual records that don’t need to be immediately synced. Use a scheduled data flow if periodic updates are sufficient.

  • Execution type (required): Specify the exact execution type values to trigger a real-time record export. Real-time exports often include Create to send records that are newly submitted to NetSuite. They also often include both Edit and Inline edit to export records that have changed. Other values available in this field are more advanced, so consult NetSuite documentation or contact NetSuite support for more complex execution types.

Expand the Advanced section to further customize your listener:

  • Data URI template: When your flow runs but has data errors, use this field to ensure that all the errors in your job dashboard have a link to the original data from the export application. This field uses a handlebars template to generate the dynamic links based on the data being exported.

  • Skip export field ID: Use this field to specify a checkbox field on the NetSuite record type being exported. This field can be marked on record create/update to exclude the record from an export for that operation. The checkbox will auto-uncheck itself without initiating the real-time export.

  • Reload record before export: When a record is saved in NetSuite, certain fields – such as sales or transfer order line IDs – are unavailable until after the save completes. The only way to export those fields in real-time is to reload the record again from the NetSuite database. This extra load will slow down the real-time export, so if you do not need one of these special fields, avoid using this reload setting.

  • Do not retry data: Check this box if you do NOT want integrator.io to store retry data for records that fail in your flow. Storing retry data can slow down your flow’s overall performance if you are processing large numbers of records that are failing. Storing retry data allows anyone with access to your flow’s dashboard to see the retry data in clear text.

User event script deployment

When a real-time export from NetSuite is saved, integrator.io creates a deployment of the “Celigo Async Realtime Export Runner” for the NetSuite record type selected in the export’s configuration. NetSuite then runs this script during the “after submit” event while saving the record, thus invoking integrator.io to determine whether or not the export will run.

Frequently Asked Questions (FAQ)

Q: My real-time listener is not executing despite being triggered. What can I do?

Try disabling and reenabling the flow. The listener may be corrupted and can be re-registered by reenabling it. Disabling and reenabling the flow will also work in cases where the listener is disabled in NetSuite after you make multiple changes in the Celigo platform.

Q: NetSuite Private saved searches are reverting to Public saved searches after saving the export

This FAQ solves an issue where private NetSuite saved searches are reverting to public once the export is saved.

  1. Review your existing private saved search in NetSuite and save the Internal ID.

  2. In integrator.io, create a NetSuite export or edit an existing export.

  3. Refresh the saved search metadata (refresh.svg).

  4. Select Private and add the internal ID.