If you run a D2C brand in India, COD is unavoidable. It accounts for 60β70% of all ecommerce orders. But it comes with a cost: 20β30% RTO (Return to Origin) rates that silently drain your margin.
For a brand shipping 1,000 COD orders/month at 25% RTO:
The fix most people reach for: hire telecallers to manually confirm orders. This costs βΉ25,000β40,000/month per agent, and they max out at 80β120 calls/day.
There's a better way.
Here's what I built:
Shopify/WooCommerce webhook
β
Order placed (COD)
β
POST to Vyora API
β
AI voice agent triggers (<60 seconds)
β
Hinglish/Hindi call to customer
β
Outcome logged β Confirmed / Cancelled / No Answer
β
Webhook fires back β Update OMS
No human in the loop. Entire flow runs in under 2 minutes from order placement.
Go to vyora.ai β Get Started β Create a new agent.
Agent config:
Script I used (Hinglish):
Namaste! Main [Brand Name] ki taraf se bol raha hoon.
Aapne abhi ek order place kiya hai β [Product Name] β βΉ[Amount] ka.
Kya aap yeh order confirm karna chahte hain?
[If yes] β Bahut acha! Aapka order confirm ho gaya.
Delivery 3-5 din mein hogi.
[If no] β Koi baat nahi. Main order cancel kar deta hoon.
This runs fully automatically. The agent handles "haan", "ha", "yes", "nahi", "cancel" β all variations.
In Shopify Admin β Settings β Notifications β Webhooks
Add webhook:
orders/create
Node.js handler:
const express = require('express');
const axios = require('axios');
const app = express();
app.use(express.json());
app.post('/webhook/shopify-cod', async (req, res) => {
const order = req.body;
// Only trigger for COD orders
if (order.payment_gateway !== 'Cash on Delivery') {
return res.status(200).send('skipped');
}
const payload = {
phone: order.shipping_address.phone,
variables: {
customer_name: order.shipping_address.name,
product_name: order.line_items[0].title,
amount: order.total_price,
brand_name: 'YourBrand'
}
};
await axios.post('https://api.vyora.ai/v1/calls/trigger', payload, {
headers: {
'Authorization': `Bearer ${process.env.VYORA_API_KEY}`,
'Content-Type': 'application/json'
}
});
res.status(200).send('call triggered');
});
app.listen(3000);
Deploy this to Railway or Render (free tier works fine for under 500 orders/day).
If you're on WooCommerce, use a webhook trigger on woocommerce_new_order
:
add_action('woocommerce_new_order', 'trigger_vyora_cod_call', 10, 1);
function trigger_vyora_cod_call($order_id) {
$order = wc_get_order($order_id);
if ($order->get_payment_method() !== 'cod') return;
$phone = $order->get_billing_phone();
$name = $order->get_billing_first_name();
$product = $order->get_items();
$total = $order->get_total();
$payload = json_encode([
'phone' => $phone,
'variables' => [
'customer_name' => $name,
'amount' => $total,
'brand_name' => get_bloginfo('name')
]
]);
wp_remote_post('https://api.vyora.ai/v1/calls/trigger', [
'headers' => [
'Authorization' => 'Bearer ' . VYORA_API_KEY,
'Content-Type' => 'application/json'
],
'body' => $payload
]);
}
Vyora fires a callback when the call completes. Set your callback URL in the Vyora dashboard.
app.post('/webhook/vyora-outcome', async (req, res) => {
const { call_id, outcome, order_id } = req.body;
if (outcome === 'confirmed') {
// Mark order as verified β proceed to dispatch
await markOrderVerified(order_id);
}
if (outcome === 'cancelled') {
// Cancel order in Shopify
await cancelOrder(order_id);
}
if (outcome === 'no_answer') {
// Retry logic β try again after 30 mins
await scheduleRetry(order_id, 1800);
}
res.status(200).send('ok');
});
Running this on a fashion brand with ~800 COD orders/month:
| Metric | Before | After |
|---|---|---|
| RTO rate | 27% | 16% |
| Monthly RTOs | 216 | 128 |
| RTOs prevented | β | 88 |
| Savings (βΉ350/RTO) | β | βΉ30,800/mo |
| Vyora cost | β | βΉ799/mo |
ROI: 38x in month one.
The biggest drop came from impulse buyers who cancelled on the call β orders that would have shipped, failed delivery, and come back.
English IVR calls in India get ignored. Customers hang up or don't engage.
When the agent speaks in the customer's language:
For Tier 2/3 cities, this is non-negotiable. A brand in Jaipur selling to Rajasthan customers cannot run a confirmation call in English and expect results.
Vyora's agents handle Hindi, Hinglish, Tamil, Telugu, Marathi out of the box. You pick the language per agent.
For a full breakdown of the COD return problem and the data behind AI confirmation calls, read: How Indian D2C Brands Are Using AI Calls to Cut COD Returns by 40%
This is pre-dispatch only β filters fake orders before they ship.
If you're losing more than βΉ50,000/month to COD returns, this pays for itself on day one.
Questions on the webhook setup? Drop them below.
Tags: india ecommerce shopify node voiceai