Index billing invoices by scope and document identity, not the seat roster
A seat roster is a poor primary key for an invoice archive. In a design scenario, a team adds seats after an annual renewal, then finance asks for the period's documents. Building the expected invoice list from today's users can lose the renewal, the adjustment, or the distinction between billing groups. I work on BrowserAct. Our Figma billing guide made a narrower implementation question useful:…
When organizing invoice records, it is crucial to use a combination of scope reference and invoice number as the index key, rather than solely relying on a seat roster. This approach helps avoid potential issues when adding seats after an annual renewal, such as losing renewal-related documents or failing to distinguish between billing groups.
The invoice-number serves as a reliable identifier, even though it may not be globally unique across different billing scopes. Preserve the exact invoice numbers without any modifications like lowercasing or trimming.
An invoice candidate should have a composite identity consisting of the scope reference and invoice number. This key should not include any filename or display name. The focus should be on maintaining the integrity of the invoice number, as it can be used to open the corresponding Stripe view for further examination.
Observations associated with an invoice also have their own reference and evidence reference. If the same observation appears twice, it should be preserved as two separate observations. However, if an observation reference is replayed, it indicates that the batch requires review, and conflicting replays should not be silently discarded. In such cases, an authorized reviewer needs to assess whether the issue lies in the scope, extraction, document version, or association before making a decision.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.