← Copilot build

Compile review — Abandoned-cart recovery

Pending review
Run a test first

Merchant request

Recover abandoned carts — pause Meta ads on price intent, send a win-back email within 20 minutes, cap at 50 sends/week.

Parsed graph

C1–C7 · 7 nodes
  • C1 Webhook trigger cart.abandoned → cart:Cart ✓
  • C2 Filter cart_total>50 deterministic → pass:bool ✓
  • C3 GPT Classify intent gpt-4o-mini → intent:Intent ✓
  • C4 Branch route/intent ← intent:Intent → route:Route ✓
  • C5 Meta pause / Email send / skip → effect:Effect ✓
  • C6 Policy pre-check guard(policy.meta_v2_3) → allowed:bool ✓
  • C7 Weekly cap 50 / week → allowed:bool ⚠

Generated steps

  1. 01 Webhook trigger Trigger C1 ✓
  2. 02 Filter cart_total>50 Filter C2 ✓
  3. 03 Classify intent GPT C3 8.4k tok · $0.011 ✓
  4. 04 Branch on intent Branch C4 ✓
  5. 05 Pause / Send / Skip Effect C5 ✓
  6. 06 Policy pre-check Compliance C6 ✓
  7. 07 Weekly cap Guard C7 ⚠
Compiled JS step 02 · Filter
export const filter = (cart) => cart.total > 50;
✓ schema valid ✓ 6/7 deterministic ⚠ Weekly cap 50 — confirm ⚠ 1 POLICY RISK — Email copy: unsupported health claim (Meta 2.3) → suggested rewrite available ✓ no network in code steps
Will need your approval ① Raise budget +20% spend ② Human review — first 3 runs quality
Why this plan

Report-first, policy-gated, cost-capped

Report-first pattern (most-installed workflow) Policy check before send (top community complaint) Cap enforced per-node-run accounting (cost predictable)