As NetSuite consultants, we run into two problems when we write SuiteQL:
- ChatGPT and Claude incorrectly generate it, which means we need to hand check it.
- 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 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
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
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
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.
Try it here.