offtrade escalations - BevvyTech/BrewskiDocs GitHub Wiki

Off-Trade Collection Request Escalation Playbook

Scope

Support engineers follow this guide when breweries report missing or delayed marketplace collection notifications. The flow covers requests surfaced in the Admin UI (/orders/collection-requests) and the underlying /offtrade API.

First-Line Checks

  1. Verify team context
    • Confirm the brewery has a valid offTradeContactEmail in Settings. Without it the API returns OFFTRADE_CONTACT_EMAIL_MISSING.
    • Confirm the operator is viewing the correct team in the Admin UI; the list reflects the currently selected membership.
  2. Inspect request metadata
    • In the Admin UI, note the request #ID, district, and message.
    • Cross-reference with the activity timeline (marketing category) to ensure an offtrade.notification or offtrade.notification.retry entry exists.
  3. Retry notification
    • Owners/admins can click Resend in the Admin UI. The action calls POST /offtrade/collection-requests/:id/retry, updating notifiedAt.
    • If the brewery lacks owner/admin access, support may invoke the API manually (see Manual API Calls).

Manual API Calls

Use these when troubleshooting outside the Admin UI.

  1. List requests
    GET /offtrade/collection-requests?teamId=<uuid>&status=pending
    
    Review notifiedAt and message to confirm context.
  2. Resend notification
    POST /offtrade/collection-requests/{requestId}/retry
    {
      "teamId": "<uuid>"
    }
    
    Expected response: { "status": "resent", "notifiedAt": "<ISO timestamp>" }.
  3. Common API errors
    • OFFTRADE_CONTACT_EMAIL_MISSING: populate the contact email in Settings before retrying.
    • OFFTRADE_REQUEST_NOT_FOUND: verify the request belongs to the provided team; the ID is numeric and team-specific.

Escalation Criteria

  • Repeated delivery failures: If retries consistently fail or the brewery still does not receive emails, file an incident for the marketplace engineering squad. Attach request IDs and response payloads.
  • Contact updates: When breweries request contact changes, direct them to Settings; support should not patch offTradeContactEmail directly.
  • Volume spikes / abuse: If rate limiting errors (OFFTRADE_RATE_LIMITED) surface frequently from the same IP, notify DevOps to scale or introduce Redis-backed throttling.

Data Hygiene Notes

  • Ensure launch tenants have a valid offTradeContactEmail seeded. For legacy teams, raise a support task to collect the preferred contact if the field is blank.
  • Encourage breweries to monitor the activity timeline; entries tagged offtrade.notification.retry confirm resend events without inspecting logs.
⚠️ **GitHub.com Fallback** ⚠️