Introduction
Connectivity SFTP can execute a CSV import after a download automatically. This feature can be used when for example the SFTP downloads a CSV price list, a list of journal entries, or a list of transactions. Connectivity SFTP can trigger a native NetSuite saved CSV import. This section explains how to configure an automated CSV import.
CSV Import
To be able to automatically import a CSV file a "Saved CSV Import" must exist and of course, support the CSV file which Connectivity SFTP downloads. A saved CSV import can be found by navigating to Setup > IMPORT/EXPORT > Saved CSV Imports. The page that opens shows all the saved CSV imports for the NetSuite environment.
If a saved CSV import wasn't created yet this must be first created. The steps to create a saved CSV import aren't described in this article.
In the first column, NetSuite shows the internal ID of the saved CSV import. For the next steps, it is needed to write down the internal number of the CSV import that should be executed after downloading the CSV file with Connectivity SFTP.
Statement & Files retrieval (Download Action) Configuration
The next step is to generate a Statement & Files retrieval (previously known as Download Action) Configuration that is configured to execute the CSV import after download. To generate this navigate in the main menu to Setup > ZoneReconcile Setup > Connectivity SFTP > click on View on any of the existing Connection Setups > Navigate to the bottom of the page > Actions > Click on Setup Statement & Files retrieval (in the old installation, the path was known as Setup > SFTP Connector > Download Action Configuration > New).
It is important to ensure that the Statement & Files retrieval Configuration only downloads the CSV files that apply to the Saved CSV Import from the previous step. It is highly recommended to ensure these are in a dedicated folder on the SFTP server or that the specific files are targeted with the option "Download only if name matches pattern" and the field "Naming pattern".
In the section "Trigger CSV Import" the checkbox "Trigger CSV Import" must be enabled and in the field "CSV Import ID" the internal ID from the Saved CSV Import must be set. The configuration could look as follows:
Executing Download and CSV Import
The automated CSV import only works when the download is configured in a scheduled context. This means that when a user clicks but grey button download on the Statement & Files retrieval Configuration then Connectivity SFTP will not execute the import. When the download is executed scheduled then the CSV import will execute and import the CSV file. More information related to scheduled import can be found on the page Trigger Download Scheduled Script.