# Run and test SuiteQL in Cadbury

*2026-09-29*

<BlogVideo
  src="https://cadbury-s3-brain-prod.s3.us-east-2.amazonaws.com/public/assets/suiteql-editor-launch-2026-09-30.mp4"
  poster="/images/blog/suiteql-editor/suiteql-launch-poster.jpg"
  title="Run and test SuiteQL in Cadbury"
  caption="A two-minute walkthrough of writing and running SuiteQL against sample company data in Cadbury."
  width="1832"
  height="1080"
/>

As NetSuite consultants, we run into two problems when we write SuiteQL:

1. ChatGPT and Claude incorrectly generate it, which means we need to hand check it.
2. The develop->run->evaluate loop is slow in NetSuite, requiring setting up a harness via SDF or several GUI based steps within NetSuite. Both take too much time.

Today, we're solving both problems. Try it [here](/?q=Which%20of%20my%20preferred%20vendors%20does%20NetSuite%20predict%20will%20deliver%20late%2C%20and%20by%20how%20many%20days%2C%20for%20items%20I%20currently%20have%20on%20backorder%20at%20any%20location%3F%20Give%20me%20the%20SuiteQL.) or read on for more details.

## Custom training

We've ingested tens of thousands of SuiteQL scripts, hand written by some of the premier NetSuite developers in the world. We've taken this data, annotated it, and trained Cadbury on it. The result is an AI that is more accurate over ChatGPT or Claude.

### Example 1

> Which of my preferred vendors does NetSuite predict will deliver late, and by how many days, for items I currently have on backorder at any location? Give me the SuiteQL.

ChatGPT returns 

```sql highlight="<predicted_days_field>"
SELECT
...
    /* Replace these with the field IDs exposed in your account */
    v.<predicted_days_field>              AS predicted_days_early_late,
    v.<predicted_confidence_field>        AS prediction_confidence
FROM
    item i
...
WHERE
    NVL(il.quantitybackordered, 0) > 0
    AND NVL(v.<predicted_days_field>, 0) > 0
ORDER BY
    v.<predicted_days_field> DESC,
    ...
```

It actually doesn't _know_ the fields in question, so it asks you to fill them. 

Cadbury [returns](/?q=Which%20of%20my%20preferred%20vendors%20does%20NetSuite%20predict%20will%20deliver%20late%2C%20and%20by%20how%20many%20days%2C%20for%20items%20I%20currently%20have%20on%20backorder%20at%20any%20location%3F%20Give%20me%20the%20SuiteQL.)

```
SELECT
...
FROM
...
WHERE
    NVL(il.quantityBackOrdered, 0) > 0
    AND NVL(v.predictedDays, 0) > 0
ORDER BY
    v.predictedDays DESC,
    il.quantityBackOrdered DESC
```

...correctly identifying the `predictedDays` fields and the precise camelCase on `quantityBackOrdered` (not that it matters).

### Example 2

> Give me a SuiteQL query that lists which NetSuite features are available in my account and whether each one is turned on.

ChatGPT returns

```There isn’t a supported SuiteQL table that exposes the full Setup → Company → Enable Features matrix.```

Cadbury [returns](/?q=Give%20me%20a%20SuiteQL%20query%20that%20lists%20which%20NetSuite%20features%20are%20available%20in%20my%20account%20and%20whether%20each%20one%20is%20turned%20on.)

```sql
SELECT
    Name AS feature_name,
    IsAvailable AS is_available,
    IsActive AS is_enabled
FROM
    CompanyFeatureSetup
ORDER BY
    Name ASC
```

...which executes perfectly.

## Test and debug quickly, deploy once in NetSuite

when you ask anything SuiteQL, a code editor pane will open on the right. Here, you can run live SuiteQL against sample data - we have different verticals (Ecomm, Manufacturing) and some starter queries.

<GuideScreenshot
  src="/images/blog/suiteql-editor/enabled-features.png"
  alt="Cadbury answering a SuiteQL question with the query and its results open in the SuiteQL pane"
  caption="Cadbury writes the query, runs it against a sample company, and shows the results beside the chat."
  width="2880"
  height="1720"
/>

Try it [here](/ask/help-me-draft-a-suiteql-query).
