Skip to content
Konstera
Capability catalogue
customersread

customers.recent_returns

Recent returns for a customer

Last N returns (RMAs) for a customer, newest first, shaped as list items for the reviewer context panel.

Effect
read
Fanout
no
Cache TTL
none
Traits
read_only
Implemented by

BetterCommerce

The tenant picks one of these when they bind this capability at install time. New implementations land as connectors ship — browse the connector catalogue.

Request arguments

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

FieldTypeRequiredDescription
emailstringnoFallback lookup key when customerId is absent
format: email
limitintegerno
default: 5 · min: 1 · max: 20
customerIdstringnoThe customer id from customers.lookup_by_email

Response

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

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

FieldTypeRequiredDescription
idstringyes
titlestringyes
badgesarray<object>no
subtitlestring | nullnoOrder number and reason for return
timestampstring | nullno
format: date-time

Example call

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

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

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