AI and machine learningE-commerce and business

Nova Poshta inside the chat: how the bot ships an order without an operator

How the LEO Chat bot finds a city and a branch in the Nova Poshta directory, creates the waybill and returns statuses to the same conversation. The mechanism, requirements and limits.

«Which branch do you use?» looks like a trivial question until you count how many times a day a salesperson has to ask it. The customer writes in a messenger, the salesperson opens the carrier's account, looks up the city, double-checks the branch number, copies the address into the order. While that happens the conversation waits, and the order waits with it.

In LEO Chat, our chatbot platform for online stores, that step lives inside the conversation: the bot searches the Nova Poshta directory for the city and the branch itself, arranges the shipment and returns the waybill number to the same chat. Below is how it works, what the store has to provide, and where the automation stops.

What the customer sees

Once the items are in the cart and the name and phone number are given, the bot offers delivery options as buttons: a Nova Poshta branch, a parcel locker, courier to the door, or self-pickup.

For a branch the bot first asks for the city. The customer types «Lviv» and the bot queries the carrier's directory, returning the options as buttons, because several cities and villages can share a name — and this is exactly the step where a parcel starts travelling to the wrong place. Then the branch: the customer enters a number or a street name, and the bot shows matches from the real list of branches and parcel lockers in that locality. One tap, and the delivery address sits in the order in the shape the carrier will accept.

Courier delivery follows a different logic: first the city, then street, building and apartment as text. The difference is not cosmetic. Nova Poshta accepts door delivery as an address, not as a branch identifier, so the scenario branches diverge from the very start.

Then payment — cash on delivery or card — and order confirmation. When the waybill is created, its number arrives in the chat. Shipment status changes land in the same conversation too: the customer has no letter to dig up and no separate account to open.

What happens under the hood

The bot pulls the directory of cities and branches from the Nova Poshta API at the moment of the request. We deliberately keep no copy of our own: the list of branches and parcel lockers changes constantly, and a stale copy produces the nastiest kind of error — the customer calmly picks a branch that no longer exists.

The waybill is created through a call to the same API with the sender details the store enters once in its account. The created waybill is written into the order, the order moves to the shipped state, and the customer gets a message. After that automatic status synchronisation takes over: the platform checks the tracking itself and updates the order once the parcel has been handed over.

A code review on 21 August 2026 shows the full set for this branch of the product: cities, branches, parcel lockers, waybill creation, label printing, courier to the door and status autosync all run against the live Nova Poshta API rather than a test stand — the module was verified with a real waybill.

A separate word about the reliability of the messages themselves, because a waybill number that never arrives is worse than no number at all. On 17 August 2026 we ran the platform on a test stack under a load of 300 messages per second for a minute, killing the engine at the twentieth second and, in the following runs, restarting the queue and the cache. After each run we compared the counters: zero lost and zero duplicated messages among the acknowledged ones. Along the way we found two message-loss bugs and fixed them before they reached a live store.

What the store has to provide

Three things, and all three come from the store's side.

An API key from the store's Nova Poshta account. The waybill is created on behalf of the sender, so working on someone else's key is impossible both technically and in substance: whoever owns the key becomes the sender in the document.

Sender details. Counterparty, contact person, city and branch of dispatch, phone number. Without them the carrier simply will not create the waybill.

Cargo parameters. Type, weight, who pays for delivery — Nova Poshta requires them in every request, so they are set in advance instead of being sorted out with the customer mid-conversation.

Until the store's key is in place, the bot will walk the customer up to the delivery step, but there will be no waybill. That is not a switch to be flipped later, it is the carrier's requirement.

Where the limits are

The bot does not pick the cheapest delivery for the customer, does not negotiate a courier time slot and does not settle disputes over a damaged parcel. It hands such conversations to a human in the shared inbox together with the full history, the customer's attributes and their orders, so the operator sees the context and does not ask again what has already been asked.

Delivery questions that the store's knowledge base can answer, the bot closes on its own — but only within that base. In an evaluation on 4 July 2026 we ran the AI module against 29 questions the knowledge base covers and 16 questions outside it: accuracy on the first set was 89.7 %, and on the second the bot admitted in all 16 cases that it did not know and offered to pass the conversation to an operator. That is a result on a specific set, not a property that holds for any question.

And the simplest limit, easy to forget in a conversation about automation: the waybill is created instantly, but the parcel travels only once someone physically brings it to the branch. Checkout inside the chat removes channel switching and manual lookups in the carrier's account; it does not affect price, availability or the speed of the shipment itself.

Channels are worth knowing about too. LEO Chat has two live ones: Telegram and the website widget. Instagram and Viber are planned. Card payment is enabled on the payment provider's keys held by the store, which makes it a separate connection step.

For stores that already have Nova Poshta on the site

This does not replace the carrier's module on the site itself. A store on OpenCart, Horoshop or Prom.ua keeps handling delivery in its own checkout — the bot adds the same mechanics in the channel where there is no site: the messenger. If orders from the chat have to reach the store's accounting, there are webhooks and a public API for that.

If what you need is Nova Poshta integrated into the store rather than into the chat, we have a separate service for it, and we wrote about typical branch-selection mistakes in checkout in the article on Nova Poshta in checkout.

See it for yourself

The bot in the corner of this page is LEO Chat. How an order from a conversation ends up in the revenue report, and what such a report does not prove, we covered in the previous article. The product description and admin screenshots are on the LEO Chat page, and the rest of what we build is in the own products section.

You can try the platform on your own store at leo.lionex.com.ua — the pricing model and trial terms live there, on the product site. And if the bot has to be wired into your catalogue, delivery and accounting rather than configured by yourself, send us the task: we reply within two hours and work under a contract.

Tags

AIE-commerce

Did you like the article?

Your opinion helps us create better content

Share with friends

Found something useful?

Help others learn about it - share the article on social networks

Thank you for helping us grow

Founder of LIONEX

Vladyslav Chystiakov

Writes about what he builds himself: online stores on OpenCart, applications on Next.js, integrations and site speed. The articles carry measurements and checks a reader can repeat on their own project, not general advice. Commercial development since 2015.

Questions

Frequently asked questions

Answers to common questions on the topic

Does the store need its own Nova Poshta API key?

Yes. The waybill is created on behalf of the sender, so a key from the store's own Nova Poshta account is required, along with the sender details: counterparty, contact person, city and branch of dispatch, phone number. Until the key is in place the bot will walk the customer up to the delivery step, but there will be no waybill — that is the carrier's requirement, not a platform setting.

Does the bot create the waybill automatically?

Yes, the waybill is created while the order is placed in the chat, and its number arrives in the same conversation. The store prints the label on its side. After that automatic status synchronisation takes over: the platform checks the tracking itself and updates the order.

Does the bot handle only branches, or parcel lockers and courier delivery too?

According to a code review on 21 August 2026, the module works with cities, branches, parcel lockers, waybill creation, label printing, courier delivery to the door and status autosync against the live Nova Poshta API, and it was verified with a real waybill. For courier delivery the bot asks for city, street, building and apartment, because door delivery is accepted as an address rather than as a branch identifier.

Does this replace the Nova Poshta module on the store's website?

No. A store on OpenCart, Horoshop or Prom.ua keeps handling delivery in its own checkout. The bot adds the same mechanics in the channel where there is no site — the messenger. If orders from the chat have to reach the store's accounting, there are webhooks and a public API for that.

Which channels does this work in?

LEO Chat has two live channels: Telegram and the website widget. Instagram and Viber are planned and do not exist as of the publication date. Card payment is enabled on the payment provider's keys held by the store, which makes it a separate connection step.

Get the best articles by email

Subscribe to our newsletter and receive useful tips, insights and news about web development, marketing and business.

We respect your privacy. You can unsubscribe at any time.

More from the blog

Related articles