NetSuite SuiteQL REST API Hack

Use Postman Visualize to convert SuiteQL  JSON results to an HTML table

So, you use NetSuite and Postman to explore your ERP data. Using NetSuite SuiteQL and Postman it’s a walk in the park. You even got used to reading the “Pretty” JSON response in the console.
But something is missing.

You would prefer to look at the data in a tabular fashion. Maybe copy/paste the data into excel for further manipulation. Maybe take a quick snapshot of the data and share it.

Enter Postman Visualize.

Applying a simple template in Postman, you can present your data in beautiful tables.

You can copy/pasted this data and the HTML file is stored in your temporary directory (on windows C:\Users\User Name\AppData\Local\Temp).

So, how to make this happen?

In Postman, in your SuiteQL request:

  1. Setup a template (A) in the Tests.
  2. You can use the sample template available below.
  3. Execute your request.
  4. Switch to the Visualize (B) result.

That’s it!

Notes:

  • Our SuiteQL sample query is a simple one, “SELECT * FROM customer“.
    In this post, we assume you already know how to use NetSuite REST API and SuiteQL.

  • In the Template, line 19 is already adjusted to properly loop over the “rows” returned in the SuiteQL JSON result: {{#each response.items}}.

  • Remember to update table column header names, and row data. For the data, make sure to use the column names that are present in the JSON response. Usually you will have columns like {{id}}, {{name}}….

  • As the “Test” is a handlebars/HTML template, you can do whatever you want here (sort, alignment….)

Feel free to use this template as a starting point:

Please contact us with questions and we will be happy to assist you.

NetSuite is complicated – We make it simple

Leverage our knowledge base and decades of experience to maximize NetSuite’s functionality for your business. We know what NetSuite does well and what it doesn’t. Schedule your 1-hour optimization call with our expert NetSuite team today, our gift to you.

SURPRISE ME
Appwrap