Implementing an AI Voice Bot for Order Confirmation. Automated order confirmation calls are one of the first use cases for voice bots in e-commerce. Confirmation conversion rates are comparable to those of human operators (85–92%), and call costs are 10–15 times lower. ### Call Scenario
Бот: Здравствуйте! Это интернет-магазин «Твой выбор».
Вы оформили заказ номер 45678 на сумму 3 200 рублей.
Хотите подтвердить доставку на [дата] по адресу [адрес]?
Клиент: Да, подтверждаю
Бот: Отлично! Заказ подтверждён. Ожидайте звонка курьера.
Хорошего дня!
Или:
Клиент: Нет, хочу изменить адрес
Бот: Назовите новый адрес доставки
Клиент: [диктует адрес]
Бот: Проверяю... Новый адрес: [повторяет]. Верно?
Клиент: Да
Бот: Адрес обновлён. Заказ подтверждён. До свидания!
```### Implementation with dynamic content```python
from jinja2 import Template
GREETING_TEMPLATE = Template("""
Здравствуйте, {{ customer_name or 'уважаемый клиент' }}!
Вас беспокоит магазин «{{ store_name }}».
Вы оформили заказ номер {{ order_id }} на сумму {{ amount }} рублей.
{% if delivery_date %}
Доставка запланирована на {{ delivery_date }} в {{ delivery_time_window }}.
{% endif %}
Подтверждаете заказ?
""")
async def start_confirmation_call(order: dict) -> str:
greeting = GREETING_TEMPLATE.render(
customer_name=order.get("customer_name"),
store_name=config.STORE_NAME,
order_id=order["order_id"],
amount=order["total"],
delivery_date=order.get("delivery_date"),
delivery_time_window=order.get("delivery_window")
)
return greeting
```### Processing responses```python
async def process_confirmation_response(
user_text: str,
order: dict
) -> tuple[str, str]:
"""Returns: (action, response_text)"""
response = await client.chat.completions.create(
model="gpt-4o-mini",
messages=[{
"role": "system",
"content": """Клиент отвечает на подтверждение заказа.
Определи действие: confirm | cancel | change_address | change_date | repeat_info | unknown
Верни JSON: {"action": "...", "entities": {...}}"""
}, {"role": "user", "content": user_text}],
response_format={"type": "json_object"}
)
result = json.loads(response.choices[0].message.content)
return result["action"], result.get("entities", {})
```### Integration with the ordering system```python
async def update_order_status(order_id: str, status: str, data: dict = None):
async with aiohttp.ClientSession() as session:
await session.patch(
f"{ORDERS_API}/orders/{order_id}",
json={"status": status, "confirmation_data": data},
headers={"Authorization": f"Bearer {API_TOKEN}"}
)
```### Campaign Metrics - **Confirmation Rate**: % of confirmed orders (goal: >85%) - **Cancellation Rate**: % of orders canceled when called - **No Answer Rate**: failed to call - **Retry Strategy**: 3 attempts with intervals of 30 minutes, 2 hours, 4 hours Timeframe: Confirmation bot MVP — 2–3 weeks. With campaign management and analytics — 4–6 weeks.