In NetSuite, each customer record is assigned a status—such as Qualified, Close Won, or Renewal—based on their position in your sales pipeline. These statuses are stored internally using numerical IDs, which can be unclear when building reports or SuiteQL queries.
To help with this, you can use the SuiteQL query below to generate a list of customer statuses. It allows you to easily reference the internal IDs alongside their display values—making it especially useful for reporting, scripting, or understanding your data structure.
SELECT
entitystatus AS Customer_Status_ID,
BUILTIN.DF(entitystatus) AS Customer_Status
FROM
customer
GROUP BY
entitystatus,
BUILTIN.DF(entitystatus)
- entitystatus returns the internal ID of each customer status.
- BUILTIN.DF(entitystatus) returns the display name of that status.
- GROUP BY ensures that you only get one row per unique status.
To easily execute a SuiteQL query, see NetSuite Admin Tip | Running SUITEQL Using a Suitelet
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
We’d love to hear how you integrate SuiteQL into your NetSuite processes! Share your insights and experiences in the NetSuite Admin Corner.