AI phone-order agent wired into Shopify and SAP
A seven-figure U.S. consumer-products company that sells direct, wholesale and through reseller programs, with a Shopify storefront, phone orders and SAP Business One.
$25,000in sales a day in peak months at the Shopify business this system was built for
The problem
The business takes phone orders from consumers, businesses and resellers. Overflow and after-hours calls needed an answer, and every order depends on both SAP Business One, where the customer's account and discount tier live, and Shopify, where price, stock, tax and shipping live.
Why it mattered
On a phone channel at this scale, a quote has to come from the systems of record, and a retried request must never become a second order.
What I built
- 1
Answer every overflow call
Overflow and after-hours calls on the business line route to an AI voice agent, 24 hours a day.
- 2
Triage the caller
Individual (B2C) or business organization (B2B). Catalog requests go to a second agent that cannot price or sell.
- 3
Look up the customer in SAP
A workflow finds the account in SAP Business One and the account type sets the discount tier. It times out after 5 seconds with a graceful fallback, and stored data is never read back to the caller.
- 4
Quote from Shopify
Live price, inventory, tax and shipping come from Shopify, and the quote is cached for the conversation.
- 5
Validate the address
The postal service validates and standardizes the shipping address.
- 6
Ask for a spoken yes
The agent reads the order back and the caller must say yes; a gate blocks the order otherwise.
- 7
Create the order once
A Shopify draft order is created, keyed to the call's conversation id, and the customer pays through an invoice link.
- 8
Learn after the call
A queue pulls FAQ candidates from each transcript for review.
My role
Sole builder and operator. I directed AI coding agents and shipped 533 commits over about seven months.
Stack
- ElevenLabs Conversational AI (Gemini 2.0 Flash)
- Twilio
- n8n, self-hosted
- Python and FastAPI
- PostgreSQL with pgvector
- Redis
- RabbitMQ
- OpenAI GPT-4o-mini and embeddings
- Shopify GraphQL Admin API
- SAP Business One Service Layer
- USPS address validation
- AWS
Results
Measured
- 5,000+calls logged
How it is built
- 300 to 500calls a day the voice system was built to support
- 24/7cover for overflow and after-hours calls
- 45 stepsin the order workflow
- Two agentsa sales agent and a catalog agent
Where a human approves
- Business-organization and volume-pricing calls go to a human specialist.
- The caller confirms every order before it is created.
- Nothing reaches the knowledge base without a person's approval.
How I think
Key the order to the call, not the request
Voice agents retry with fresh payloads, so de-duplicating requests fails. A lock-based approach produced bugs and was dropped; the order is keyed to the conversation id instead.
Know where not to automate
Prices and stock come only from tools, and the catalog agent's sales tools are removed, not just disabled. Calls that need judgment stay with people.
- In production
- About seven months
- ElevenLabs Conversational AI (Gemini 2.0 Flash)
- Twilio
- n8n, self-hosted
- Python and FastAPI