An integrator.io export queries or copies data from an 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
- Scheduled exports
- Real-time exports
To begin exporting data from NetSuite, choose one of the following options:
- 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 Tools menu, select Flow builder. For the Source application, select NetSuite. Select your Destination application, and then click Save & continue in the upper right. After establishing the connections, click Launch flow builder. Click the NetSuite source in Flow builder to Create...export.
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 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 a good fit when you’ve purchased a NetSuite SuiteCloud Plus license and you also need to export very large amounts of data. The Web Services API is the only option available if you cannot install the integrator.io bundle in your NetSuite account.
Tip: To maximize the amount of data that can be exported from a single NetSuite license, consider a combination of 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 into the NetSuite account that you are exporting data from.
- From the Lists menu, select Searches > Saved searches > New.
- Enter a Search title with a name that is meaningful for the export.
- 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.)
- 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.
- 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.
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 export is run
- 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
- Test – Export only one record by default; used for testing, to avoid syncing lots of data
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).
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.
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.
If Group rows is not set, the data will be single JSON objects.
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.
Use the following steps to create a real-time NetSuite export:
- From the Tools menu, select Flow builder.
- Click Add source.
- Select NetSuite.
- Use the drop-down menu under What would you like to do? to choose Listen for real-time data in source application.
- Select your NetSuite connection (or create one if you have not already done so).
- Click Next. The Create listener page displays.
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 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. To provide at least one example for an advanced option, enable a real-time export on the Sales order record type but only export the sales order when company personnel clicks the Approve button for the order (or for a mass approval action). You can also use this export to route a simple message into a collaboration tool, such as Slack or HipChat, to alert stakeholders that an order needs approval.
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.
If you are mass updating records in NetSuite, and don't want to send all those updates from NetSuite. Check this checkbox field on any records you want the export to skip. After the export runs, this checkbox will automatically be unchecked. You can also use this for a bidirectional sync between two systems. If you have a real-time export of customers from NetSuite to another system, after a successful import to the destination application, you might need the ID of the record assigned by the destination application to be added to the NetSuite record. You can use another flow to update the ID in NetSuite that was assigned by your destination application. In this case the flow that adds the field to NetSuite would trigger the real-time flow to run again resulting in an infinite loop. To stop this loop, when the writeback import runs, you can check the box provided in the real-time export. integrator.io will uncheck this checkbox and skip sending this update from NetSuite back to the destination application and stop the infinite loop.
- 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. When a transaction record is first created, or when new line items are added to an existing transaction record, the Line ID values are not immediately available, and you must reload the record again from the NetSuite database to export the Line ID values. 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. NetSuite does not currently provide a master list of all the fields that require a reload, so some trial and error might be needed if a field is not exporting as expected.
- 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.
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.