get_delivery_summary โ Delivery Summary
A single aggregate over delivery notes โ count, total value, min, max, and the date range.
/SQLQueries) โ dynamic
aggregate SQL returning per-query rows, not a fixed Service Layer entity.Delivery-summary report โ a single aggregate over delivery notes (outbound goods to
customers). Returns one row with count, total_value, min_value, max_value,
and the date range (date_from / date_to). Read-only. Reach for it when the user
asks for a rollup or totals of deliveries โ “summarise our deliveries”, “total value of
open deliveries”, “biggest and smallest delivery”. A no-match filter returns a single
zero row, not an error.
Try these prompts
- “summarise our deliveries”
- “how many deliveries and what’s their total value?”
- “total value of open deliveries for C001”
ื ืกื ืื ืืขืืจืืช
- “ืกืื ืืช ืืืฉืืืืื ืฉืื ื”
- “ืืื ืืฉืืืืื ืืืฆืขื ืืื ืฉืืืืื ืืืืื?”
- “ืื ืืขืจื ืืืืื ืฉื ืืืฉืืืืื ืืคืชืืืื?”
Arguments
| Arg | Required | Meaning |
|---|---|---|
card_code | optional | One customer, e.g. C001. Omit for all. |
from_date | optional | Delivery date on/after, YYYY-MM-DD. |
to_date | optional | Delivery date on/before, YYYY-MM-DD. |
document_status | optional | open or closed. |
Example result
12 deliveries, total $84,300. Smallest $180, largest $12,600 โ dated 2026-01-04 through 2026-06-28.
Result columns
| Column | Type | Meaning |
|---|---|---|
count | number | How many delivery notes matched the filters. |
total_value | number | Their combined value. |
min_value | number | The smallest delivery in the set (0 when nothing matched). |
max_value | number | The largest delivery in the set (0 when nothing matched). |
date_from | date | The earliest delivery date in the set (empty when nothing matched). |
date_to | date | The latest delivery date in the set (empty when nothing matched). |
No charts: the report is a single aggregate row, so there is no series or category to
plot along. Use list_deliveries when you want something chartable.
Related
list_deliveriesโ the line-by-line delivery notes rather than the aggregate.run_named_queryโmcp-ar-summaryis the equivalent summary for customer invoices.