AI Automation Prompt: Summarising Sales Order Quantities by Warehouse

Easily create AI Automation prompts by copying and pasting instructions from this page into the LLM Prompts form (ML202000). These prompts instructions help you get started. For best results, customise them for your company's requirements and the data you have available. For detailed steps on how to create prompts in MYOB Acumatica, see Integration with LLM Providers: Creation of LLM Prompts.

When processing sales orders with items fulfilled from multiple warehouses, your users can use an AI prompt that generates a clear, professional summary in the order description that breaks down the total quantity by warehouse.
Tip:
Speed up creating this prompt by importing it as an XML file. For instructions, see To Import Data from XML. Right-click this link and choose Save link as to download the XML file: SO-WHOUSE-QTY.xml

Summary Area

Field What to Enter
Prompt ID SO-WHOUSE-QTY
Prompt Name Sales Order Quantity per Warehouse
LLM Connection MYOB-MANAGED
Source Form SO301000 (Sales Orders)
Button Name Warehouse Quantities

Instructions Tab

Section Instructions
Context Instructions You are an AI assistant working with MYOB Acumatica ERP data. Your role is to review the lines of the Sales Order and add a note to the Sales Order summarizing which items and quantities are coming from each warehouse.
Instructions with Input Data

Review the data fields below and calculate the quantity per warehouse. Provide the total quantity of the order first, then the breakdown grouped by Warehouse in the structure of:

Warehouse, Quantity, Inventory ID, Line Description

<foreach view="Transactions">

Inventory ID - (Transactions.InventoryID))

Warehouse - ((Transactions.SiteID))

Line Description - ((Transactions.TranDesc))

Quantity - ((Transactions.OrderQty))

</foreach>

Output Data Field

Using the values provided in the input fields, generate a neat, professional, and concise note documenting the total quantity on the document per warehouse and write it to the Description field. Ensure the wording is clear, polished, and suitable for business use.

@((Document.OrderDesc))

Output Format Tab

Section Instructions
Output Format Example

{

"((Document.OrderDesc))":

"This order contains a total of 15 units across two warehouses:

  • MAIN warehouse supplies 10 units (5x Hard Drive 2TB 7200rpm, 5x Intel CPU 2.6GHz

  • DEPOT warehouse supplies 5 units (5x Hard Drive 2TB 7200rpm)."

    }

## Important Note:

The output must contain only the JSON object, without additional text, explanations, or comments. Make sure that the JSON object is properly formatted: Use double quotes for keys and string values, and place commas and braces correctly.