Pattern 1: Webhook-First With Polling Reconciliation
Use this if you want low-latency updates but cannot trust best-effort webhooks alone. Flow:- create the case with
clientWebhookUrl - process webhook events immediately
- store
event_id - poll non-terminal or recently updated cases on a schedule
- repair missed updates from polling
Pattern 2: Operator Approval Loop
Use this when Offload may need business approval before continuing. Flow:- create case
- wait for
case.input_needed - display
inputRequestto an operator - submit the answer with
POST /cases/{id}/input - wait for the next webhook or poll until the case changes state
Pattern 3: Attachment Download On Completion
Use this when a completed case may include files. Flow:- receive
case.completed - inspect
data.attachments - request a fresh file URL for each attachment you want
- download immediately before
expiresAt
Pattern 4: On-Demand Transcript Review
Use this for internal tooling, debugging, or support workflows.conversationThreadis a formatted plain-text transcript, not a structured message array- the field is only included when
includeTranscript=true - if the case has no tracked thread yet,
conversationThreadisnull
Pattern 5: Use clientReferenceId As Your Join Key
Store both:
- your own
clientReferenceId - Offload
caseId
- an internal join key you control
- a stable way to find the Offload case from webhook events
clientReferenceId is echoed in both GET /cases/{id} and webhook payloads when you provide it at creation time.