Blog

Atomic document numbering for quotes and invoices

How Sanad assigns sequential document numbers safely when multiple people work at once.

By Sanad team · Updated

  • engineering
  • invoicing

Shared workspaces need one sequence for quotes and invoices—not duplicate numbers, not gaps from failed saves.

Strong transactions

Number allocation uses database transactions so two users cannot claim the same sequence value. The operation is atomic relative to your tenant’s counter.

Prefixes and years

Numbers follow your configured pattern (prefix, document type, year, sequence). Admins can align formats with how your firm already labels paperwork.

Retries and PDFs

If PDF generation fails, numbering does not “double spend.” Retries stay idempotent so support and ops stay sane.

Cookie preferences

We use cookies to improve your experience and (optionally) enable analytics.