Generating a quote copies your template Doc, reads the copy it just made (never a cached idea of the template — you may have edited it five minutes ago), fills every placeholder and the item rows in one batch, exports the result as a PDF, and only then writes two rows into your spreadsheet: one in a Quotes tab (number, version, date, valid-until, currency, totals, status, links to the Doc and PDF) and one per line in a Quote items tab you can sort, filter and sum like any other. The PDF is filed in a “Quotes” folder in your Drive named after your sheet, and the filled Doc is saved in your Drive as well, named after the quote number and the customer. If anything fails before the PDF exists, the half-made Doc is deleted and no row is written — a quote with a number and no document is worse than an error.
The number follows your own rule. The default format is QT-{YYYY}-{0000}; the tokens are {YYYY}, {YY}, {MM} and a run of zeros for the padded sequence, so INV-{YY}{MM}-{000} is as valid as the default. The sequence is claimed atomically, so two people generating at once get different numbers. One limit, stated: the number is claimed before the document is built, so a generation that fails leaves a gap in the sequence. Quotes here are commercial documents, not statutory ones, and nothing should rely on the counter being gapless.
A quote has a status — draft, sent, accepted, rejected, expired — kept in the sheet, and a daily sweep marks a quote expired the day after its valid-until date on your workspace’s own calendar, not the server’s. A new version of a quote reruns generation from the original’s lines, so a revised price is not a retype. Inside Libromi Team Inbox, the PDF can be staged into the reply box with Send in chat; the WhatsApp page explains that surface.