Define a JSON Object to Represent a NetSuite Record

This topic applies to

Applies to

SuiteCommerce Advanced


To use the data in a NetSuite record, you must determine how to represent the record as a JSON object. For example, a custom record containing a set of questions and answers may have the following structure:

  • record namecustomrecord_q_and_a

  • custom fieldcustrecord_q_and_a_queston

  • custom fieldcustrecord_q_and_a_answer

A JSON object representing this custom record would look like the following:

{ "question": "A String with the question" , "answer": "A String with the answer" , "createdAt": "2016-03-31" }

This example only requires name/value pairs representing each custom field and its value. However, depending on the complexity of the record you need to represent, a JSON object can be more complex. For example, a JSON object can contain arrays or nested objects.

After defining the formal structure of a JSON object, you can define the backend model that accesses the NetSuite record. See Create a Backend Model for more information.