ParitLAB
← Lab Notes

Development & Versions · 2026-09-15

When One Customer Buys Multiple Products: A Single Licence Workflow

Published by ParitLAB
Field notes from designing, building and testing our products

license management, transaction, multi-product, Manager Portal, customer workflow

A one-customer, one-product licence form works at first, but it creates repetition when a customer buys a bundle or several tools from the same manager. The manager repeatedly selects the same customer and can paste a key into the wrong row. The revised workflow begins with one customer and allows several purchased products to be selected in one overlay.

Storage still keeps one licence per product

A multi-selection interface does not justify storing every key in one field. Products can have different states, versions and key-generation rules. Each licence remains a separate customer-and-project record. The overlay simply submits several related operations together.

Keep each key beside its product

Every project has its own checkbox and licence-key field. The field stays disabled until the project is selected. Clearing the checkbox also clears the value, preventing unused data from reaching the server.

Validate the complete scope before writing

The server checks that the manager owns the customer and that every submitted project belongs to the assigned portfolio. One project outside the scope rejects the whole request before any record is written. This also covers a forged request that mixes authorised and unauthorised IDs.

A transaction prevents a half-completed bundle

After validation, a database transaction updates or creates each licence. A failure rolls the primary database changes back as one unit. The result message reports the number of products saved instead of providing an ambiguous success response.

Handling an existing licence

When a customer already has a licence for a project, the latest record is updated to active with the new key rather than adding an unnecessary duplicate. Grant and revocation events remain available in the manager audit log.

Data tables and overlays solve different problems

The data table searches, sorts and paginates existing records. The overlay handles a focused decision without removing the surrounding list. Revocation also uses a confirmation overlay that names the customer and product.

Possible next steps

A larger catalogue may need search inside the product selector, a preview of an existing key and templates for common bundles. Every shortcut should retain the same invariant: validate the customer, validate every project and save a result that can be explained.