A flow export queries or copies data from a source application or system. You can configure mappings and transformations for 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.
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 Flows > Create flow. For the Source application, select NetSuite.
Two Execution type options are available: scheduled and real-time. You can choose between them only when 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 run at specific intervals of time and group the data page by page.
In scheduled exports, the API Type becomes available, offering you the choice for the type of calls made to NetSuite:
- RESTlet: When you select the recommended RESTlet option, the Celigo RESTlet communicates with NetSuite, simplifying integration while providing NetSuite services such as SuiteScript hooks and data transformations.
- Web services: This NetSuite API is ideal if you have a SuiteCloud Plus license and need to export large volumes of data. It is also the only option if you cannot install the integrator.io bundle in your NetSuite account.
To maximize the data you can export with a single NetSuite license, consider using both RESTlet and Web Services API exports.
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:
- Log in to the NetSuite account you want to export data from.
- Navigate to Lists > Searches > Saved Searches > New.
- Enter a descriptive Search title for the export.
- Select Public to make the saved search public, or leave it cleared to make the search private (Public saved searches can be selected from the Saved search drop-down in integrator.io. For private saved searches, you must enter the saved search ID manually).
-
Add criteria to filter the data you want to export from NetSuite. For example, for an auto-billing flow, you might filter Type = Sales Order and Status = Pending Billing.
-
On the saved search Results tab, set Sort by to Internal ID.
-
Then, 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.
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.
When exporting data from NetSuite, integrator.io provides four Export type options.
- 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)
Why previously exported records re-export (Delta vs. All)
Delta exports include records whose selected date/time field is later than the flow's last run time. As a result, a previously exported record is exported again if it's updated after the last run. All exports include every record returned by the search on every run, regardless of whether it was exported previously.
If records re-export unexpectedly, verify the flow's Export type and the date/time field used for comparison. Similarly, if new records stop appearing after you narrow a date filter to prevent re-exports, review these settings.
In the Shopify – NetSuite integration app, edited orders re-export for the same reason within the Shopify Order to NetSuite Order (add) and Shopify Order to NetSuite cash sale (add) flows. To stop already-synced orders from re-exporting when they're edited, open the relevant flow's Configuration Settings and clear Sync Shopify edited order data to NetSuite. To limit the flow to newly created orders within a date window, set Filter orders by to Creation time instead of Last updated time.
For this example, select Delta as the Export type and set Date field to use in delta search to Date last modified.
Grouping rows
Group rows determines whether NetSuite search results are grouped by Internal ID before being exported. When enabled, and the saved search is sorted by Internal ID, all rows for the same record are grouped into a single array object.
Enable this option if your saved search returns multiple rows for each record. If grouping is not needed, leave it disabled to export each search row as a separate record. Disabling this option also removes the requirement for the 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}} ). As a workaround, delete the padded array layer every time you save the import.
Note
If Group rows is not selected, each search row is exported as a separate record. To group records later, use a custom hook or an integrator.io extension framework wrapper.
Note
NetSuite automatically adds the id and RecordType fields. The DataURI is displayed in the sample data for records that fail during 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 displays a sample of the first row returned by the NetSuite saved search in JSON format. The saved search's custom labels become the JSON property names, and each is paired with its corresponding field value. If Group rows is enabled, the sample is returned as an array of JSON objects.
If Group rows is not set, the data will be single JSON objects.
You can configure a NetSuite export to run on a schedule or in real time. Scheduled exports support a variety of scheduling options and are ideal for bulk data synchronization, non-time-sensitive integrations, or scenarios where real-time processing is not possible. They are generally easier to configure and maintain, making them a good choice for new integration use cases. Real-time exports are triggered by NetSuite events, such as when a record is saved. Although they require more configuration, they are the best option for time-sensitive integrations.
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
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 contexts that trigger a real-time export. Real-time exports are typically triggered by user actions, such as updating a customer record in the NetSuite UI or submitting an order through a web store. These events are processed individually so that changes can be synchronized with other applications as quickly as possible.
Use caution when enabling contexts such as CSV Import. Because each updated record is exported individually, mass updates can take longer and may generate a large number of unnecessary exports. If immediate synchronization is not required, use a scheduled flow instead. - Execution type (required): Select the record actions that trigger a real-time export. Common options include Create for newly created records and Edit or Inline edit for updated records. Additional execution types are intended for advanced use cases. For details, see the NetSuite documentation or contact NetSuite Support. For example, you can configure a Sales Order export to trigger only when an order is approved, allowing you to send the approved order to another application or notify stakeholders through a collaboration tool such as Slack or HipChat.
Expand the Advanced section to configure additional listener settings:
- Data URI template: Use this field to add links to the original export data for records with data errors. These links appear in the job dashboard and are generated dynamically using a handlebars template based on the exported data.
-
Skip export field ID: Specify a checkbox field on the NetSuite record type being exported. When this checkbox is selected during a record create or update, the export for that operation is skipped. After the export runs, integrator.io automatically clears the checkbox without triggering another real-time export.
This option is useful when performing mass updates in NetSuite and you do not want those updates exported. Select the checkbox on any records you want to exclude, and integrator.io will automatically clear it after the export.
You can also use this setting to prevent infinite loops in bidirectional integrations. For example, if a real-time customer export sends records from NetSuite to another system, and a separate flow writes the destination system's record ID back to NetSuite, that writeback would normally trigger the real-time export again. By selecting the configured checkbox during the writeback, integrator.io skips exporting the update and automatically clears the checkbox, preventing the loop.
- Reload record before export: Some NetSuite fields, such as sales or transfer order line IDs, are not available until after the record is saved. To export these fields in real time, integrator.io must reload the record from NetSuite before exporting it. This is also required when new line items are added to an existing transaction because Line ID values are assigned only after the save completes. Reloading the record adds an extra database call and can slow real-time exports, so enable this option only if you need these fields. NetSuite does not provide a complete list of fields that require a reload, so some testing may be necessary if expected fields are missing from the export.
- Do not retry data: Select this option if you do NOT want integrator.io to store retry data for failed records. Disabling retry data can improve performance when processing large numbers of failed records, but users with access to the flow dashboard will no longer be able to view the retry data.
When you save a real-time NetSuite export, integrator.io creates a deployment of the "Celigo Async Realtime Export Runner" script for the selected NetSuite record type. NetSuite executes this script during the record's after submit event whenever the record is saved. The script then invokes integrator.io, which determines whether the export should run based on the configured criteria.
Q: My real-time listener is not executing despite being triggered. What can I do?
Try disabling and then re-enabling the flow. This re-registers the NetSuite listener, which can resolve issues caused by a corrupted listener or one that became disabled after multiple changes were made in the Celigo platform.
Q: NetSuite Private saved searches are reverting to Public saved searches after saving the export
This FAQ explains how to resolve an issue where a private NetSuite saved search reverts to public after the export is saved.
- Review your existing private saved search in NetSuite and save the Internal ID.
- In integrator.io, create a NetSuite export or edit an existing export.
- Refresh the saved search metadata.
- Select Private and add the internal ID.