E-commerce
July 1, 2026
"The bot says refund even though I haven't paid the delivery driver yet." "The AI doesn't know if my postal code accepts COD." "Transferred without an exact amount or SMS confirmation link." Three bot failures where the AI confuses COD and prepay, invents an amount, or promises a refund on an unpaid RTO order.
An e-commerce cash on delivery AI chatbot does not replace COD-FLOW agents (#469). It classifies bot_cod_* intents, looks up COD-MAP zone fees, cites order total + cod_fee API, guides confirmation SMS switch prepay, and hands off to carrier RTO with full payload.
This guide #470 covers bot_cod_* intents, CODBOT flow, and cod_bot KPIs. Distinct from the COD playbook (#469) and the alternative payments bot (#323): here, AI use cases for COD availability terms and confirmation.
Summary
Why automate COD support with a bot?
COD tickets often arrive pre-purchase (area eligibility) or Day 0 (SMS confirmation), when agents are not available and a generic bot routes to refund or card declined.
COD bot volume and opportunity
On active MENA and Asia COD markets, 60 to 75% of cod tickets are botifiable at tier 1 level if COD-MAP grounded and NO-REFUND-UNPAID guardrails are active.
Three risks of an uncalibrated COD bot
Refund promise unpaid: bot promises RTO refund
Invent amount: LLM quotes delivery agent amount without order API
Wrong payment route: COD confused with payment declined refund #370
McKinsey estimates COD at 40 to 60% of orders in certain markets with RTO at 15 to 30% if confirmation is weak (McKinsey, retail payments 2025). Shopify documents COD payment customization 2026 (Shopify, COD 2026).
Angle #470 vs related content
COD Customer Service #469: COD-FLOW agents execute. #470 = bot tier 1 guide handoff.
Alt payments #323: bank transfer invoice. #470 = cash on delivery, not async bank.
Refund #370: refund status. #470 = unpaid COD not refund pending.
Payment declined: card declined. #470 = pay at door.
Local #430 bot: local delivery. #470 = payment method layer.
MENA DTC Example
82 cod tickets/month baseline #469. After CODBOT: cod_bot_auto_resolve 74%, cod_bot_wrong_refund_promise 0, cod_bot_handoff_quality 92%, cod_bot_csat 4.4/5.
Bot guides, does not capture cash
CODBOT-SUP: bot explain confirm handoff, carrier captures payment at door.
MENA off-hours COD chat
58% of cod bot sessions are in the evening local time: CODBOT tier 1 critical confirm deadline coverage.
First COD order thank-you hook
Post-checkout COD widget T1: bot_cod_confirm proactively reduces cod_confirm_expired tickets by 25-35%.
COD vs card at checkout bot
Customers compare COD and card in the same chat: the bot must explain that COD differs from payment declined retry, featuring fees and SMS confirmation before shipment, without routing to generic card macros.
How does CODBOT differ from COD #469 and APAY #323?
Human COD playbook, async alternative payments bot and COD bot: three distinct payment bot layers.
Bot → COD role matrix
#470 CODBOT: zone fee confirm amount switch handoff
#469 COD-FLOW: agents switch prepay carrier RTO execute
#323 APAY-BOT: transfer mandate proof collect
#370 REF-BOT: refund status paid orders
#429 LOCAL: delivery zone overlap local COD
Shared COD-MAP corpus
#469 defines COD-MAP JSON. #470 bot consumes: cod_enabled fee max confirm switch_window.
Four BOT-COD-TYPE flows
bot_cod_eligibility: zip zone fee ceiling pre-checkout
bot_cod_confirm: SMS resend deadline auto-cancel explain
bot_cod_amount_wismo: exact total + fee in transit
bot_cod_handoff: switch prepay driver RTO fraud block
#470 Promise
CODBOT-SUP policy, 12 bot_cod_* intents, CODBOT CB-1 to CB-8 flow, guardrails, handoff payload, cod_bot_* KPIs.
Upstream downstream pipeline
Checkout COD select → #470 confirm guide → #469 agent switch carrier → capture at delivery.
Bot ops 30-minute training
Module 1: COD vs prepay vs refund. Module 2: guardrail red team. Module 3: handoff payload review. 90% Quiz before prod.
Intent priority COD vs WISMO
COD order in transit: combine tracking + TPL-CODBOT-AMOUNT single response not separate bot sessions.
Which bot_cod_* intents to classify?
Twelve COD bot intents before the CODBOT flow.
Twelve bot_cod intents
bot_cod_zone_check: COD available my PC (postal code) city
bot_cod_fee_faq: how much is COD fee
bot_cod_limit_exceeded: amount limit exceeded
bot_cod_confirm_resend: resend SMS confirmation link
bot_cod_confirm_expired: auto-canceled order explanation
bot_cod_switch_prepay: pay by card before shipping
bot_cod_cancel_pending: cancel unfulfilled COD
bot_cod_amount_delivery: exact delivery driver amount
bot_cod_rto_explain: package refused no refund
bot_cod_driver_dispute: delivery driver change handoff carrier
bot_cod_refund_confusion: reroute not #370 unpaid
bot_cod_fraud_block: repeat RTO address explanation
Tier bot execution
Tier 1 auto: zone_check, fee_faq, amount_delivery, confirm_resend explain, rto_explain, refund_confusion reroute.
Tier 2 handoff: switch_prepay link, driver_dispute carrier, cancel_pending agent if policy.
Bot session fields
cod_intent, order_id, ship_zip country, order_total, cod_fee, confirm_status, fulfillment_status, financial_status, handoff_reason.
Intent router payment keywords
COD payment delivery driver cash route CODBOT before generic refund or payment declined macros.
Post-handoff bot silence
After switch prepay or carrier handoff CB-7: bot stops COD guidance in the same session to prevent contradictory steps.
Multilingual COD bot
Active COD markets Arabic Hindi: bot_cod_* intents detect language, localized TPL-CODBOT templates, identical COD-MAP zone labels regardless of language to avoid map FR vs chat AR contradictions.
How does the bot consume COD-MAP #469?
The bot reads COD-MAP #469 for grounded eligibility fee confirm window without inventing COD zone.
Lookup CB-4 bot
zip country → cod_enabled: Y/N macro template
cod_fee_flat_pct: cite checkout fee
order_max_cod: limit exceeded branch
confirmation_required hours: confirm_resend deadline
switch_prepay_window: handoff or deny grounded
fraud_rto_threshold: block macro honest
Pre-checkout zip only
bot_cod_zone_check: user provides zip → CB-4 COD-MAP → TPL-CODBOT-AVAILABLE or NOT-AVAILABLE.
Post-order API
CB-3 auth order → read payment_gateway_names COD flag total_price cod_fee metafield confirm_status.
Amount grounded
bot_cod_amount_delivery: total + cod_fee from API only guardrail NO-INVENT-AMOUNT.
RAG /pages/cod-payment
Corpus COD-* macros #469 + FAQ zones link every COD thread.
Stale COD-MAP alert
Bot RAG hash mismatch #469: block zone answers handoff until sync.
cod_fee line item verify
CB-3 read cod_fee from order line items or metafield: amount guard compares sum not guess.
Carrier COD reconciliation context
CB-3 reads tracking carrier COD collect status when API available: bot_cod_amount_delivery cites status collect pending vs collected without promising refund if collect failed RTO.
How to write the CODBOT-SUP policy in eight rules?
The COD CODBOT-SUP bot policy governs triage without unpaid refunds or invented amounts.
Eight CODBOT-SUP rules
COD-MAP grounded only: zone fee from map not LLM
NO-REFUND-UNPAID: RTO unpaid never refund promise
NO-INVENT-AMOUNT: delivery amount order API only
Auth before order COD: CB-2 email order post-purchase
Switch prepay window: handoff link only if COD-MAP allows unfulfilled
Refund confusion reroute: bot_cod_refund_confusion not #370
Handoff payload complete: order confirm_status amount zip
/pages/cod-payment link: once per COD thread
Forbidden bot actions
Promise COD zone not in map. Refund timeline unpaid. Waive cod_fee bot execute. Confirm ship bypass SMS if required. Capture payment bot API.
Payment declined reroute
Card fail keywords without COD order: route payment declined not CODBOT.
financial_status gate
CB-3 branch: pending authorized paid COD paths distinct TPL-CODBOT-RTO only unpaid contexts.
Paid capture rare edge
financial_status paid COD delivered: route #370 refund only if return policy applies not TPL-CODBOT-RTO.
How do you apply the CODBOT CB-1 to CB-8 flow?
The CODBOT CB-1 to CB-8 flow structures triage for COD bot grounded maps.
Eight steps CB-1 to CB-8
CB-1 Intent classify: bot_cod_* from message
CB-2 Auth gate: pre-checkout skip | post order email match
CB-3 Order context: COD flag financial_status fulfillment confirm
CB-4 COD-MAP lookup: zone fee window fraud
CB-5 Refund check: bot_cod_refund_confusion reroute not REF-BOT
CB-6 Respond tier 1: TPL-CODBOT-* grounded CB-3 CB-4
CB-7 Branch: close | resend confirm | switch handoff | carrier | cancel agent
CB-8 Log: intent amount handoff csat
CB-6 bot_cod_zone_check
TPL-CODBOT-AVAILABLE fee max link /pages/cod-payment checkout steps.
CB-6 bot_cod_confirm_resend
Trigger Klaviyo resend API or handoff agent if API fail. Deadline hours from COD-MAP.
CB-7 bot_cod_switch_prepay
Within switch_prepay_window : handoff agent payment link payload not bot send link unless integrated.
CB-6 bot_cod_rto_explain
TPL-CODBOT-RTO no refund unpaid reorder prepay suggest if fraud clear.
CB-7 bot_cod_driver_dispute
Carrier ticket handoff payload order tracking driver dispute reason.
CB-2 zip collect pre-checkout
bot_cod_zone_check : ask zip city if not provided before CB-4 lookup reduce wrong zone assume.
SLA bot COD tier 1
CB-6 macro under 5 s. Confirm resend handoff acknowledgment under 10 s with ticket ref.
Escalade bot_cod_cancel_pending
CB-7 cancel unfulfilled: bot verifies fulfillment_status null, confirm_status pending, handoff agent with macro COD-CANCEL-AGENT payload order_id reason client verbatim.
Which TPL-CODBOT-* templates and guardrails?
Eight COD bot templates and guardrails NO-REFUND-UNPAID NO-INVENT-AMOUNT.
TPL-CODBOT-AVAILABLE
"COD available [zone]. Fee [X], limit [Y]. Checkout: select Cash on Delivery. /pages/cod-payment"
TPL-CODBOT-NOT-AVAILABLE
"COD not available [zone]. Card [Klarna] accepted."
TPL-CODBOT-CONFIRM
"Order #[X]: confirm via SMS within [h] or automatic cancellation. Courier amount [total+fee]. Resent link."
TPL-CODBOT-AMOUNT
"Upon delivery: [exact amount] [currency] = order [Z] + COD fee [fee]. Correct change recommended."
TPL-CODBOT-RTO
"Parcel returned: unpaid COD order, no refund. Recommend prepaying next order."
TPL-CODBOT-SWITCH-HANDOFF
"Card payment before shipping possible within [deadline]. Agent transfer link sending within [SLA]."
Guardrail NO-REFUND-UNPAID-01
Block refund timeline when financial_status not paid COD RTO context.
Guardrail NO-INVENT-AMOUNT-01
Block € amount not matching order API total + cod_fee within 0.01 tolerance.
Touchpoints
Checkout COD selected thank-you confirm hook T1
/pages/cod-payment proactive T2
SMS not confirmed reminder T3 bot_cod_confirm
Handoff Gorgias cod_bot payload
TPL-CODBOT-EXPIRED
"Confirmation expired: order #[X] cancelled. Place a new COD order and confirm via SMS within [h]."
TPL-CODBOT-DRIVER-HANDOFF
"Courier change dispute: we are opening driver ticket #[ref]. Expected amount [amount] per order. Agent will contact you within [SLA]. Do not refuse the parcel if the displayed amount is correct."
Which confirmed expired, fraud, and local COD cases should be processed?
Special COD bot cases require either the COD-MAP branch or immediate handoff.
Confirm expired new order
bot_cod_confirm_expired : new checkout required not revive cancelled order bot workaround.
Fraud RTO block
bot_cod_fraud_block : TPL-CODBOT-FRAUD prepay only per COD-MAP threshold.
Local delivery COD
Same-day driver cash : link #429 POD + TPL-CODBOT-AMOUNT.
Gift COD recipient
COD ship gift address : #205 recipient prepares cash amount macro.
Partial fulfill COD
Split shipment : amount cites shipped lines total only per #469 partial policy.
Address change COD pending
Unfulfilled zip change : re-run COD-MAP eligibility CB-4 before confirm.
Wire confusion
Client asks virement for COD order : route #323 APAY not CODBOT.
Ramadan peak scale
Pre-scale confirm resend capacity MENA evening delivery season.
WhatsApp confirm channel
COD-MAP confirmation_channel WhatsApp : bot_cod_confirm_resend distinct template if WA not SMS.
Installment vs COD confusion
Route installment if Klarna keywords not CODBOT.
B2B COD rare
B2B order with intracom VAT and COD : route #464 VAT handoff if pro forma invoice is required before cash delivery, bot does not mix NET-TERMS #234.
Which chatbot KPIs should be measured?
COD bot KPIs link auto-resolve, zero wrong refund, and confirm assist rate.
Eight key metrics
cod_bot_session_rate: bot_cod sessions / 100 cod chats
cod_bot_auto_resolve: tier 1 closed / sessions
cod_bot_confirm_assist_rate: confirm completed post bot resend / eligible
cod_bot_wrong_refund_promise: guardrail violations (target 0)
cod_bot_amount_accuracy: API match responses / amount intents
cod_bot_handoff_quality: payload complete / handoffs
cod_bot_zone_lookup_success: map hit / zone checks
cod_bot_csat: satisfaction post COD bot path
Benchmark DTC COD markets
cod_bot_auto_resolve 68-78%, cod_bot_wrong_refund_promise 0, cod_bot_confirm_assist_rate > 80%, cod_bot_csat > 4.2/5.
Dashboard payment bot
Intent breakdown, zone not available requests, confirm expired rate, switch prepay handoff funnel.
cod_bot_ticket_delta agents
Measure cod agent tickets post-CODBOT: target 50-65% tier 1 deflection maintain handoff quality.
cod_bot_confirm_expired_rate
Track bot sessions before vs after confirm widget: optimize SMS copy and deadline hours.
A/B confirm widget copy
Test thank-you T1: "Confirm within 2 hours" vs "Reply YES to the SMS" measures cod_bot_confirm_assist_rate uplift.
Which COD bot anti-patterns should be avoided?
Twelve COD bot anti-patterns to ban from production.
1. Refund promise RTO
NO-REFUND-UNPAID-01 block.
2. Invent delivery amount
NO-INVENT-AMOUNT-01 API only.
3. Promise COD off map
Rule 1 COD-MAP grounded.
4. Route #370 refund
Rule 6 bot_cod_refund_confusion.
5. Skip auth post-order
Rule 4 CB-2 email match.
6. Switch prepay after ship
CB-7 window check unfulfilled.
7. Payment declined as COD
Router payment declined separate.
8. Empty handoff switch
Rule 7 payload order amount deadline.
9. Waive cod_fee bot
Agent manager only not bot.
10. Confirm ship bypass
Never bot promise ship without confirm if map requires.
11. Revive expired order
New order path bot_cod_confirm_expired.
12. Skip /pages/cod-payment
Rule 8 link once.
13. Mix WISMO COD amount
Tracking + amount same response TPL-CODBOT-AMOUNT + tracking link grounded order API one turn.
14. LLM zone hallucination
Block any city name not in COD-MAP even if model "knows" market : grounded lookup only.
How does Qstomy implement CODBOT?
Qstomy on Shopify runs CODBOT: bot_cod_* classifier, COD-MAP #469 lookup, order total cod_fee API, NO-REFUND-UNPAID NO-INVENT-AMOUNT guardrails, confirm resend trigger, handoff payload.
Qstomy cod bot capabilities
cod_intent_classifier: 12 bot_cod intents
cod_map_bot_lookup: zone fee window
order_cod_context: financial confirm fulfillment
refund_unpaid_guard: block refund promise
amount_api_grounded: total + fee verify
carrier_handoff_cod: driver dispute payload
Pipeline #470 #469 #323 #370
#470 bot tier 1 COD. #469 agents execute. #323 distinct bank transfer. #370 refund paid only reroute.
Encrypted DTC scenario
MENA, 82 cod tickets/month, wrong refund promise baseline uncalibrated bot.
After CODBOT-SUP + Qstomy: cod_bot_auto_resolve 76%, cod_bot_wrong_refund_promise 0, cod_bot_confirm_assist_rate 84%, cod_bot_csat 4.5/5.
Explore customer support and request a demo.
AI payment Governance
CB-8 logs feed AI governance (#124) monthly cod_bot guardrail audit.
Weekly cod bot guardrail audit
Sample 25 sessions regex refund unpaid and amount mismatch zero tolerance.
Integration Gorgias cod_bot tag
Handoff auto-tag cod_bot_handoff + intent + amount payload: #469 agents take over without asking for zip amount again.
What is the checklist for deploying CODBOT?
CODBOT Checklist (12 steps)
Sync COD-MAP #469 JSON into bot RAG
Draft CODBOT-SUP policy 8 rules
Deploy 12 intents bot_cod_* classifier
Implement CB-1 to CB-8 + guardrails
Shopify order COD context read-only API CB-3
TPL-CODBOT-* + /pages/cod-payment corpus
Confirm resend Klaviyo integration or handoff
Refund confusion reroute #370 block rules
Test 8 scenarios: zone yes no, confirm resend, amount API, RTO no refund, switch handoff, driver dispute, refund reroute, fraud block
Dashboard KPI cod_bot section 9
Thank-you COD confirm widget T1
Red team refund promise amount invent quarterly
Summary
#470 = bot COD tier 1, does not execute capture
COD-MAP #469: shared corpus
NO-REFUND-UNPAID: RTO explain
NO-INVENT-AMOUNT: API grounded
KPI cod_bot_wrong_refund_promise: target 0
FAQ
Can the bot refund COD RTO?
No. TPL-CODBOT-RTO unpaid no refund. Handoff if paid edge rare.
Difference with #469?
#469 agents switch prepay carrier execute. #470 bot classify guide handoff.
Difference with #323?
#323 async wire transfer. #470 driver cash COD.
Driver amount?
TPL-CODBOT-AMOUNT order API total + cod_fee.
Where to confirm SMS?
bot_cod_confirm_resend resend or TPL-CODBOT-CONFIRM deadline.
Go further
This week: import COD-MAP into bot RAG, deploy bot_cod_* classifier, activate NO-REFUND-UNPAID guardrail, configure order API amount verify, test 8 scenarios staging, launch dashboard cod_bot_wrong_refund_promise zero tolerance.
Share this guide #470 with ops bot and payment: one API grounded amount is worth ten LLM refund promises on unpaid COD, one bot confirm resend is worth fifteen RTO packages cancelled for lack of understood SMS.
Go-live test matrix
8 scenarios: zone available not, confirm resend, amount API, RTO no refund block, switch handoff, driver escalate, refund reroute, NO-INVENT-AMOUNT test.
Ramadan bot capacity
Pre-scale CODBOT confirm resend and evening session capacity 1.5x MENA Ramadan COD peak.
Internal CODBOT documentation
Wiki ops: mapping intents → templates → handoff triggers, links #469 COD-MAP owner, guardrail owner payment ops, quarterly review red team refund unpaid and amount invent scenarios.

Enzo
July 1, 2026





