Examples of ChatGPT in NetSuite
SuiteAnalytics queries
To use ChatGPT for SuiteAnalytics queries, you can provide it with specific questions or requests related to your desired report. For example:
Prompt: Generic
Write a SuiteQL query that exports data from the Transaction table.

Prompt: Specific
Write a NetSuite SuiteQL query to export the transaction ID, transaction date, and transaction amount for all transactions between January 1, 2022 and December 31, 2022.

Prompt: Generic
Write a NetSuite SuiteQL query that exports the fields and entity from the Transaction table. Left join the transactionline table and the transactionaccountingline table to source the account, amount fields.

Prompt: Specific
Write a NetSuite SuiteQL query that exports the fields tranid, trandate, and entity from the Transaction table. Left join the transactionline table as tl and the transactionaccountingline table as tal (on tl.transaction = tal.transaction) to source also the account, amount fields. The query shall filter only transactions that are created for a specific entity.

Write an advanced PDF/HTML template
If ChatGPT could write new PDF templates from scratch that would be amazing. It is not there yet, but you can generate a simple template and improve it with further prompts.
Prompt:
Write an Advanced HTML/PDF NetSuite Form to print invoices. The advanced HTML/PDF template uses the free marker library to extract data from the printed record. The template shall be enclosed within pdf tags instead of html and start with the tag: <?xml version=”1.0″?><!DOCTYPE pdf PUBLIC “-//big.faceless.org//report” “report-1.1.dtd”>
Write an email template
ChatGPT can be used to generate email templates by providing a prompt and having it generate the corresponding text. The output can then be reviewed and edited as necessary to meet the specific needs of the email communication.
Prompt:
Write a NetSuite email template to a customer acknowledging an upcoming payment to be made. The email template uses the freemarker library. Wrap all the fields in the following way: <#if record.field??>record.field<#else>if not</#if>. Use <br/> tags to avoid long lines and avoid <#assign> tags.

- Always handle sensitive data with care. Masking confidential data is a best practice to follow. Be sure to never share any information that could compromise the security of our organization or our customers. By doing so, we can ensure that we are using ChatGPT to its full potential while also maintaining the security and privacy of our customers’ information.
- You are accountable for the solutions provided to our customers. Therefore, double-check the credibility of the solution provided before deploying it to our customers.
Note:
ChatGPT has limitations and may not always provide the best solution for complex problems.