Saltar al contenido
Egipto+20 110 928 0698
← Volver al blogMercado

A Lesson From Production: Making Cashier Sync After an Internet Outage Never Break an Invoice

Compartir artículo

Many shops operate in areas with frequent internet outages, and the question that worries any owner is: if the internet drops while I'm selling, will the invoice get lost, or recorded twice? This lesson covers how the TtaKkaa team found a behavior gap between two sync paths and fixed it.

The problem: the batch-sync path behaved differently from the inline path

TtaKkaa's cashier supports two paths for recording sales: an inline path (the sale is sent to the server immediately), and a background batch-sync path that runs when the internet comes back after an outage, sending every invoice recorded offline in one go. The TtaKkaa team discovered that the inline path had previously been hardened to safely handle "this invoice is already recorded" cases, but the batch-sync path never got the same fix.

Why this was risky

As a result, if the server responded with "this invoice already exists" (which naturally happens if the same invoice got sent twice due to a retry), the batch-sync path classified that as a "failure" instead of "already duplicate," so the cashier could retry sending it again unnecessarily. There was also a data-type bug that could have stopped the job from running at all for any real store.

The fix: the same rigor as the inline path, applied to batch sync

The TtaKkaa team fixed the batch-sync path to correctly classify "already recorded" as a duplicate instead of a failure, fixed the data-type bug, and made a temporary lock issue on one order fail only that order instead of the whole batch. The result: an invoice recorded offline syncs exactly once when the internet comes back, with no duplication and no false failures.

The numbers, honestly

This issue lived in a rare path (an internet drop during the sync itself, after a previous outage), and wasn't happening daily, but the TtaKkaa team chose to fix it before it became a real problem at an actual shop, rather than waiting for a customer report.

If your shop operates in an area with frequent outages

TtaKkaa's cashier is designed to keep recording sales locally even when the internet is down, and syncs automatically once it's back. Sign up at store.ttakka.store and try it yourself.

T

Escrito por The TtaKkaa team

con el equipo Ttakka

Prueba Ttakka en tu negocio

Inicia una prueba gratuita y mira la caja Ttakka funcionando el mismo día.

Probar gratis

Preguntas frecuentes

Does the cashier stop working if the internet drops suddenly?

No, the cashier keeps recording invoices locally even if the internet is down, and syncs them to the server as soon as it's back.

Could an invoice get recorded twice if the internet drops again during sync?

That's exactly the risk the TtaKkaa team found and fixed in the batch-sync path, so syncing is now as safe as a direct, online sale.