Outcomes and events
Tell us what actually happened, so a conversation that sounded fine but booked nothing is caught.
Your systems know things a transcript does not: whether the refund went through, whether the customer came back angry, whether a person had to step in. Send that and it appears on the conversation, next to our review.
Outcome
Whether the conversation worked, by your own definition: success or fail. One per conversation; sending again replaces it.
generalcontext.report_outcome(conversation.id, "fail", note="Customer reopened the ticket")Events
Anything that happened in your systems, any time later. Each event has an id you choose, so a retry is counted once.
generalcontext.log_event(conversation.id, "order.refunded", {"amount": 42.5}, event_id=f"refund-{refund.id}")The reply is {ingested, skipped, failures}. Up to 500 events per request. Properties are flat strings, numbers and booleans. From the SDK, both calls flush pending calls first, return true when accepted, and never raise.
Examples
| Kind of agent | Events |
|---|---|
| Support | ticket.reopened, ticket.escalated, csat.submitted |
| Commerce | order.refunded, order.cancelled |
| Scheduling | appointment.booked, appointment.no_show |
| Any agent | handoff.to_human, complaint.received |