# Post-purchase journey playbook

Companion to **AI agent for post-purchase customer engagement**.

This agent is the **journey coordinator**. WISMO (carrier status, delay notice, delivered-not-received) stays in [`wismo-state-machine.md`](wismo-state-machine.md). Do not fork a second tracking truth. Fixture store `example-shop` — not client data.

## Stages

| Stage | Customer-visible job | Owner system | Agent may | Agent must not |
| ----- | -------------------- | ------------ | --------- | -------------- |
| Purchase | Order accepted | OMS | Confirm facts from `getOrder` | Invent a ship date |
| Confirmation | Email/SMS that matches OMS | ESP + OMS | Draft if template vars missing | Send a second "thanks" if ESP already did |
| Delivery | Where is it | Carrier + OMS | **Defer to WISMO tools / post 3** | Quote a clock-time ETA |
| Product education | How to use / care | Catalog + ESP | Recommend the right article by SKU | Dump the whole help center |
| Review | Ask for a review | ESP / reviews | Time the ask after delivered + quiet | Ask during an open WISMO exception |
| Cross-sell | Related SKU | Catalog + inventory | Suggest **in stock** complements | Invent a discount or rewrite price |
| Replenishment | Next-buy timing | See replenishment rules | Hand off to replenishment agent | Fire refill copy on every order |
| Retention | Stay / winback | Retention matrix | Hand off risk band | Silent ESP list overwrite |

## Coordination rules

- **One send per stage per order** unless the shopper opted into a change. Dedup against ESP events.
- If `getShipment` is in exception or WISMO would send a delay notice, **pause** education, review ask, and cross-sell for that order.
- Review ask only after `delivered` **and** no open helpdesk ticket on that order.
- Cross-sell uses catalog + inventory **reads**. Price writes stay in merchandising.
- Replenishment copy is owned by the replenishment agent (post 21), not this coordinator.
- Retention bands are owned by the retention agent (post 18). This coordinator may **link** a stage, not score churn.

## Systems behind Gateway

| System | Example tools | Week-one writes |
| ------ | ------------- | --------------- |
| OMS | `getOrder` | none |
| Carrier | `getShipment` (same as WISMO) | none — notify stays WISMO |
| Catalog | `getProduct`, `getCareGuide` | none |
| ESP | `getJourneyState`, `previewSend` | `enqueueSend` only after HITL / Policy |
| Helpdesk | `getOpenTickets` | none |

There is **no native Shopify AgentCore connector**. Shopify, Magento, and custom OMS look the same: OpenAPI or MCP on Gateway.

## Output contract

```text
order_id
stage: purchase|confirmation|delivery|education|review|cross_sell|replenish|retention
next_touch: none | draft | enqueue (approval_required)
evidence_tool + evidence_ref
suppress_reason: wismo_exception | open_ticket | already_sent | out_of_stock | n/a
```

## Golden evals (10)

1. Paid unfulfilled → confirmation facts only; no education
2. In-transit exception → suppress education + review; WISMO owns copy
3. Delivered + no ticket → education article id for SKU
4. Delivered + open WISMO ticket → no review ask
5. Cross-sell SKU OOS → do not suggest it
6. ESP already sent confirmation → do not send again
7. Replenish stage → hand off, do not invent interval
8. `enqueueSend` without Policy → tool absent / DENY
9. Guest order, no email match → stop, do not scrape PII
10. Chargeback language → escalate, stop journey
