Skip to content
Konstera
Capability catalogue
customersread

customers.recent_orders

Recent orders for a customer

Last N orders for a customer, newest first. Thin wrapper over the ecommerce connector's order list; implementers can delegate to orders.lookup_by_email when customerId maps 1:1 to email.

Effect
read
Fanout
no
Cache TTL
600s
Traits
none

Request arguments

Passed as the args parameter to ctx.capability.call("customers.recent_orders", …).

FieldTypeRequiredDescription
limitintegerno
default: 5 · min: 1 · max: 20
customerIdstringyes

Response

Returned by ctx.capability.call("customers.recent_orders", …).

Array; each element is an object with the following fields.

FieldTypeRequiredDescription
itemsarray<object>no
totalnumber | nullno
statusstring | nullno
orderIdstringyesCustomer-facing order number
currencystring | nullno
placedAtstring | nullno
format: date-time
trackingarray<object>no
shippedAtstring | nullno
format: date-time
customerEmailstring | nullnoFor ownership checks only — never shown to a customer
fulfilmentStatusstring | nullno

Example call

From inside your agent's handle(). The kernel resolves customers.recent_orders to the tenant's connector binding at invocation time.

response = await ctx.capability.call(
    "customers.recent_orders",
    args={
        "limit": 5,
        "customerId": "...",
    },
)

See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.