Analytics Warehouse Returns Analysis Prompt Sample: Filters and Top 10

Understand the Analytics Warehouse Returns Analysis sample’s required OAC subject areas, transaction-line filters, and monthly comparison logic. Learn what to preserve when adapting its top-10 returns and matching-sales analysis.

·8 min read·By NetSuite Changelog·2 views

The Analytics Warehouse Returns Analysis prompt sample ranks items by current-month returns, retains the top 10, and calculates previous-month returns and current-month sales for those same items. Its required OAC subject areas, transaction-line filters, and currency measure are part of the specification—not interchangeable implementation details.

For finance teams adapting the prompt, the central safeguard is to preserve the selection logic: choose items by current-month returns first, then calculate their comparison values.

Key takeaways

  • Use the OAC MCP connector with NetSuite - Order to Cash - Return Authorization and NetSuite - Sales Order. Identify missing subject areas rather than silently replacing them.
  • Calculate returns using qualifying item lines and Line Amount in Analytics Currency from the Analytics Currency Amounts folder.
  • Filter months using Gregorian Calendar Year and Month Number, not Time.Date.
  • Select the top 10 items by current-month Total Returns, descending—not by sales or previous-month returns.
  • Calculate previous-month returns and current-month sales for those same Item Identifiers.

What does the Analytics Warehouse Returns Analysis prompt sample specify?

The NetSuite AI Connector Service Companion SuiteApp supplies editable prompt samples across 14 business categories, organized by business function and suggested role. The Analytics Warehouse – Returns Analysis sample suggests the Chief Financial Officer role. The documentation also calls NetSuite Analytics Warehouse NetSuite Data Intelligence.

This is a starting specification for a defined financial comparison, rather than a general request to “analyze returns.” It establishes the source connection, required subject areas, eligible transaction lines, currency basis, calendar periods, and item-selection method. Changing any of those can change what the resulting numbers mean.

For broader context, see the AI Connector Companion SuiteApp guide. For additional reading, see the Companion prompt-category overview. This walkthrough stays with the returns sample rather than extending its rules to other categories.

Treat the suggested CFO role as audience guidance, not an access specification. The supplied material does not establish role-based access requirements.

Which OAC subject areas does the Returns Analysis prompt require?

Before analysis, the sample requires confirmation that both of these subject areas are available through the OAC MCP connector:

Required subject area Role in the requested comparison
NetSuite - Order to Cash - Return Authorization Supplies the return-authorization side of the analysis
NetSuite - Sales Order Supplies the matching current-month sales side

The distinction between a connector and a dataset matters here. The sample specifies the OAC MCP connector, not a dataset that happens to contain similarly named information. Source selection is an explicit prerequisite, not something to leave to an assistant’s discretion.

If either subject area is unavailable, the prompt directs the response to identify it and explain that it must be activated or made available in OAC. It prohibits substituting another dataset or subject area without telling the user.

For a finance reviewer, this creates an acceptance gate: a plausible-looking result is insufficient if its sources have changed. Ask for confirmation of both exact subject-area names before reviewing totals. If a source is missing, resolve that prerequisite rather than treating a substitute analysis as the requested comparison. Disclosure of a proposed alternative does not make it equivalent to the original specification.

Apply the return-line filters and Analytics Currency measure

The return-line filters define which lines contribute to Total Returns. Preserve their exact conditions when rewriting the prompt; “use return transactions” is too broad to express the sample’s requirements.

Component Exact requirement
Sales-order origin Return Authorization - Is Created From Sales Order equals 'T'
Return main-line exclusion Exclude records where Return Authorization - Main Line is not 'F'
Return tax-line exclusion Exclude records where Return Authorization - Tax Line is not 'F'
Grouping Calculate Total Returns by Item Identifier
Returns amount Use Line Amount in Analytics Currency from the Analytics Currency Amounts folder

The exclusion wording matters: the requirement is not merely to mention main lines and tax lines, but to preserve the specified 'F' conditions. An adapted prompt should not weaken “exclude records where … is not 'F'” into an imprecise instruction such as “ignore non-item data.”

The currency basis also belongs in the calculation request. The sample names both the amount and its folder; replacing them with an unspecified “amount” makes the instruction less precise. For review purposes, ask the analyst to state the selected measure alongside the filters. That gives the reviewer separate checks for the population of lines and the monetary basis when investigating different totals.

How does the prompt compare current-month returns with the previous calendar month?

The sample requests current-month returns and previous-calendar-month returns using the same return criteria. It explicitly specifies Gregorian Calendar Year and Month Number, not Time.Date, for monthly filters. Preserve both the calendar period and the fields used to identify it.

A practical review sequence is:

  1. Identify the current calendar month for the analysis.
  2. Filter it using Gregorian Calendar Year and Month Number.
  3. Identify the previous calendar month, including its year.
  4. Apply the same return-line criteria and Analytics Currency measure to that previous month.
  5. Keep the previous-month results available for the items selected by current-month returns.

For example, if the analysis month is January, the previous calendar month is December of the preceding year. This illustrates why checking the year as well as the month number matters. A rolling interval is also a different request from a calendar month.

Keep the purposes of the comparison values distinct: previous-month returns provide the historical comparison, while current-month sales provide the matching sales amount. Replacing the latter with previous-month sales would change the requested analysis.

How does the prompt select the top 10 items and calculate matching sales?

The item-selection sequence defines this analysis. First calculate current-month Total Returns in Analytics Currency by Item Identifier. Sort that result in descending order and retain the top 10 items. Calculate the comparison values for that selected group.

Stage Required logic
Rank Current-month Total Returns in Analytics Currency, descending
Retain Top 10 items
Compare returns Previous-calendar-month returns for those same Item Identifiers
Calculate sales Current-month sales for those same Item Identifiers
Sales amount source Transaction Lines – Analytics Currency Amounts
Sales exclusions Exclude records where Sales Order - Main Line, Sales Order - Tax Line, or Sales Order - Do Not Display Line is not 'F'

Consider a hypothetical item that enters the top 10 for current-month returns but was outside the previous month’s top 10. Its previous-month returns still belong in this comparison because current-month returns determined membership. Re-ranking the previous month and joining two independently selected top-10 lists would answer a different question.

The same principle applies to sales. A selected item remains part of the requested comparison regardless of whether it ranks among the highest-selling items. The prompt asks for matching sales, not a separate sales leaderboard.

For validation, compare the Item Identifiers used in all three calculations. They should trace back to one current-month returns selection. Check the sales-specific exclusions separately: Sales Order - Do Not Display Line is explicitly part of the sales requirement and should not disappear when the returns instructions are copied into a reusable prompt.

How can you adapt the Returns Analysis sample without changing its requirements?

Separate presentation changes from analytical changes. Asking for clearer narrative explanations can leave the calculation intact. Changing the ranking period, measure, item population, or source changes the requested analysis and should be treated as a deliberate revision.

Use this review procedure before running an adapted prompt:

  1. Name the connection and sources. Retain the OAC MCP connector and both exact subject-area names.
  2. Preserve the missing-source response. Require identification of unavailable subject areas and an explanation that they must be activated or made available in OAC.
  3. Keep calculation conditions explicit. Carry forward all return-line filters, sales-line exclusions, and Analytics Currency requirements.
  4. Keep the calendar definition. Specify Gregorian Calendar Year and Month Number rather than Time.Date.
  5. Preserve the selection logic. Rank current-month returns first; calculate comparison amounts for the same Item Identifiers.
  6. Label intentional changes. Describe a different ranking period or population as a different analysis, not an unchanged version of this sample.

For a CFO reviewing an adapted prompt, a useful final question is: “Would this still select the same items, from the same sources, using the same amounts and periods?” If the answer changes, document the revision before comparing its results with the original specification.

There is one output limitation to keep visible. The supplied excerpt ends mid-sentence while defining the output table, so it does not establish a complete column list. The calculations above are supported; a reconstructed “official” table layout would not be. If you design an additional review layout, label it as your own presentation choice rather than attributing it to the sample.

FAQ

Which data sources does the Analytics Warehouse Returns Analysis sample require?

It specifies the OAC MCP connector and requires both NetSuite - Order to Cash - Return Authorization and NetSuite - Sales Order. Missing subject areas must be identified, with an explanation that they must be activated or made available in OAC; they must not be silently replaced.

How does the sample filter return lines?

It selects item lines where Return Authorization - Is Created From Sales Order equals 'T' and excludes records where Return Authorization - Main Line or Return Authorization - Tax Line is not 'F'.

How are items chosen for the sales comparison?

The sample ranks items by current-month Total Returns in Analytics Currency, descending, and retains the top 10. It then calculates current-month sales for those same Item Identifiers, rather than selecting a separate top-10 sales list.

Which date fields define the monthly filters?

The sample specifies Gregorian Calendar Year and Month Number, not Time.Date. Previous-calendar-month returns use the same return criteria as current-month returns.

Additional reading