Skip to main content
— Setup walkthrough

Sell files and license keys together for one product

A Shopify product can carry both a file mapping and a license-key tag mapping in Alva Digital Downloads. The customer pays once and receives the download link plus a unique activation key in the same email — the canonical use case is software with an installer (file) plus an activation key (license key).

How dual mapping works

File mappings and license-key mappings are independent join tables — ProductFileMap attaches files to a product, and ProductLicenseKeyTagMap attaches license-key tags. Neither table knows about the other. At order time, Alva Digital Downloads looks up both maps for the purchased product and assembles a single email containing every download link and every assigned key. Adding a key never removes the file; removing the file never affects the key pool.

Set up a product with both

1. Open the product in Alva

In the Alva admin, click Products in the sidebar and choose the Shopify product you want to sell as a file plus key. The detail page opens with tabs for Files, Packs, Links, and License keys.

Screenshot needed

Product detail page in the Alva admin. Highlight the four tabs (Files, Packs, Links, License keys). Show one sample software product title at the top. No real customer data visible.

The product detail page with the four mapping tabs.

2. Attach the file

On the Files tab, click Add file, pick the installer or asset, and click Save. The file is now mapped through ProductFileMap and applies to all variants by default.

3. Switch to the License keys tab

Open the License keys tab on the same product. The empty state shows a Link tag button — license keys are linked at the tag level, not key by key, so the same product can draw from a fresh pool of keys forever.

4. Link a license-key tag

Click Link tag, choose the tag that holds the keys for this product, and click Save. The link is stored in ProductLicenseKeyTagMap. Each paid order pulls the next available key from that tag's pool.

Screenshot needed

The License keys tab on a product with one tag linked. Show the tag name, current available-key count (e.g. "47 available"), and an unlink icon. Highlight the available count.

A linked tag with its current available-key stock.

5. Confirm both mappings

Return to the Files tab — the attached file is listed. Switch back to License keys — the linked tag is listed. Both mappings now fire on every paid order for this product.

What customers see

The order email contains the download link for the file directly above an inline Your License Keys block listing the assigned key. The customer-account downloads page shows both: the file as a download row, the license key as a copyable code beneath the product. One purchase, one email, both deliverables.

License key timing reminder

If the shop has fraud checks enabled, license keys are not assigned until the order is approved — see Why license keys are assigned only after fraud approval. The file download link, however, is generated as soon as the email is sent. On a fraud-checked order this means the customer may receive the email with only the download link, then a follow-up email with the key after approval.

Frequently asked questions

Can I sell just a license key with no file?

Yes. Skip the Files tab and link only a license-key tag. The customer email lists the key on its own.

What happens if the linked tag runs out of keys mid-order?

Alva creates a PendingLicenseKeyAssignment row and emails the file download immediately. Once the tag is restocked, the key is auto-assigned and the customer receives a follow-up email.

Will the file zip include the license key?

No. The key is sent in the email body and shown on the customer-account downloads page. The zip contains only the mapped files.

See also

Was this helpful?

Still stuck? Email us.

Last updated 2026-05-06