At 11:42 p.m., a customer messages your store:
The tracking says delivered, but I don’t have it. It’s a gift and I need it Friday.
The chatbot needs to check the order, recognise a missing-parcel case, and pass the Friday deadline to support. A few minutes later, another shopper uses the same chat to ask for a gift under $50.
Same chat window. Different data, permissions, and next steps.
Here’s how to build both workflows for the December rush.
1. Give each workflow a source of truth
| Customer wants to… | Read from… | The chatbot can… |
|---|---|---|
| Find a gift | Product catalogue, variant prices, and inventory | Suggest available products within budget and link to them |
| Check delivery timing | Checkout or shipping service | Ask for a postcode and share the available arrival estimate |
| Track an order | Order system and carrier tracking | Verify access, fetch the latest status, and share the tracking link |
| Get help with a return or missing parcel | Order details, return policy, and support queue | Check eligibility, collect details, or open a support case |
For gift recommendations, check the exact variant. A blue jacket might be available while the shopper’s size is sold out. The Shopify Storefront API’s ProductVariant reference exposes both availableForSale and currentlyNotInStock. Check both if you want to exclude items that can be ordered but aren’t in stock.
For delivery questions, Baymard’s checkout research explains why an estimated arrival date is more useful to shoppers than a shipping speed alone. If your service only returns a dispatch window, share when the order is expected to ship and explain that the arrival date is still unknown.
2. Keep permissions and write actions on the server
The model can interpret “My parcel never arrived.” Your application decides which order the customer can access and which actions the bot can take.
-
searchProductsreads public catalogue data. -
getDeliveryEstimatechecks the selected items and destination. -
getOrderStatusreturns order details after the server verifies access. -
checkReturnEligibilityapplies the return policy to the order. -
createSupportCaseopens a case and returns its reference.
Apply the access check on every order lookup. OWASP’s guidance on object-level authorisation explains why knowing an object ID alone doesn’t grant access. In staging, verify that a signed-in customer who enters an order number from a different test account receives no order details.
Also consider what happens if a tool call times out after the case is already created. AWS’s guidance on idempotent APIs describes using a token to recognise retries. Create one key per intended case and reuse it when retrying the same request. The customer should get the original case reference.
3. Make holiday policies easy to update
A store might extend gift returns through January while keeping its usual exclusions for final-sale items. Keep the purchase window, return deadline, market, and exclusions in one place so support can update them together.
For Shopify teams, YourGPT’s guide on how to add an AI chatbot to Shopify covers connecting catalogue pages and store policies. Use the policy source to explain the rules, then query the relevant system for stock, delivery, or order status when the customer asks.
Test where those rules meet real orders. Try a purchase made the day before the holiday window opened, a final-sale item bought during it, and a gift recipient without an order number.
4. Send support a case they can act on
When the carrier says delivered and the customer says not received, open a missing-parcel case after verifying order access. Include the details the support team needs to continue:
{ "intent": "missing_parcel", "orderReference": "example-1042", "orderAccessVerified": true, "carrierStatus": "delivered", "customerReport": "Parcel not received", "customerDeadline": "Friday", "nextAction": "support_review" } Attach the conversation so the customer doesn’t have to repeat the story. Share the case reference once the support system confirms it was created.
5. Test the outcome in staging
Start with real customer wording and sample orders. Check what the bot said, which tool it called, and what happened in the store or support system.
| Test request | Expected outcome |
|---|---|
| “Find a gift under $50.” | Every recommended variant is within budget and available to ship. |
| “Will it get here Friday?” | The reply uses the latest estimate for the destination and explains any uncertainty. |
| “Where’s my order?” | The application verifies access before returning order details. |
| “It says delivered, but it’s missing.” | The bot creates one case with the customer’s deadline. A retry returns the same reference. |
| “Can I return this sale item?” | The bot checks the purchase date and exclusions before answering. |
Start with one question shoppers ask before buying and one request your team handles after checkout. For the first, look at product clicks or add-to-cart actions. For the second, review answer accuracy, repeat contacts, and how often staff need to ask for information the bot could have collected.
If you had one day to build this for your store, which workflow would you ship first?

