A contact's store orders and support tickets (inbox profile card)
GET/api/contacts/:contactId/commerce-summary
Two different sources, deliberately.
ORDERS are read LIVE from the linked e-commerce platform through the
same call that builds the AI system prompt, so the agent's card and the
bot never disagree about what the customer bought. Nothing is cached in
our database. A connection whose pull_data is off, an unlinked
contact, or a store that is down all yield no orders — never an error,
because a third party being unreachable must not break the inbox.
TICKETS are OURS: a ticket in this product is a conversation with
source = ticket. No e-commerce platform has them. Trashed tickets are
excluded; the five most recently updated are returned.
MONEY is reported PER CURRENCY in totals. A contact who paid in TRY
and in USD has two entries, not one sum: adding them yields a number
that is true in no currency, and labelling that sum with whichever
currency happened to come first is worse than showing nothing.
Readable by anyone who can view the contact.
Request
Responses
- 200
- 401
- 404
The contact's commerce summary (empty arrays when none).
Not authenticated. code: account_disabled means the member's seat was deactivated in this workspace: the session is over even though the token was not revoked (clients sign out and clean up).
Resource not found (or not visible to the current tenant).