Articles in this section

Export data from NetSuite using SuiteQL

After setting up an OAuth 1.0 connection to NetSuite SuiteTalk APIs, create an export flow step to map and transform the data as it is extracted from SuiteQL.

Create an export

To begin exporting data from SuiteQL, 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 your custom HTTP NetSuite connection. Establish the connection to NetSuite SuiteTalk APIs and name the export.

    or

  • From the Tools menu, select Flow builder. For the Source application, select your custom HTTP NetSuite connection. 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.

Configure the export

In the What would you like to export? section, configure the following fields.

14352776551579-mceclip1.png
  • HTTP method (required): Select POST.

  • Relative URI: Enter the following path: /services/rest/query/v1/suiteql?limit=5&offset={{export.http.paging.skip}}

    • Note

      the limit parameter is optional and you would probably want to increase the limit number or just remove that parameter.

  • Configure HTTP headers: Enter prefer in the left field, and enter transient in the right field.

  • HTTP request body: Enter your SQL query like the following:

{
    "q": "select * from customer"
}
    • Note

      your sql query needs to be flatten to a single line prior to pasting it into this JSON format.

Expand the Configure export type section and configure the following field.

14352779685659-mceclip2.png
  • Export type (required): Select All - always export all data.

Expand the Does this API use paging? section and configure the following settings.

14352812428699-mceclip3.png
  • Paging method: Select Skip number parameter.

  • Override skip number start index: Enter 0.

  • Path to total number of results field in HTTP response body: Enter totalResults.

  • Path to paging complete field in HTTP response body: Enter hasMore.

  • Paging complete values: Enter false.

Expand the Non-standard API response patterns section, and in the Path to records in HTTP response body field, enter items.

Click Preview in the Preview data pane to verify the export retrieves your SuiteQL data as expected.

14353456430107-mceclip4.png

When you are satisfied with the results, Save and Close the export.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.