ModularMerchant
Knowledge Base
Shopping Cart Software Online Manual
Sell Serial Numbers, License Keys or Registration Codes
Replace product thumbnail images When are royalties calculated?
Location Home > Shopping Cart Software Components > Administration Area > Products > FAQs & Tutorials

Sell Serial Numbers, License Keys or Registration Codes

selling product license keys, registration codes or serial numbers
We sell software online, and we need to automatically email the customer a license key when a product that requires registration is purchased. Can this be done?

Yes, the Modular Merchant shopping cart software can automatically distribute license keys to customers when they buy specified products. This is a common question, and can be done fairly easily. The Product Editor in the store's Administration Area includes built-in options to upload a text file containing code numbers. These code numbers can be license keys, serial numbers, etc. When the product is purchased, the next available code is given to the customer.

key concept
The system described in this tutorial can be used to sell textual license keys, serial numbers, registration code, passwords, etc. For the remainder of this article, the textual codes being sold are referred to as Serial Numbers.

prerequisites
This tutorial assumes the reader has the following:

1. A basic understanding of using the Modular Merchant store's Administration Area; specifically the Product Editor.

2. The ability to create and save a text file on your computer.

A tutorial on these prerequisites is outside the scope of this guide. However, if you require instruction on these items, many free resources and tutorials are available on the Internet, and a variety of books are available in the computer section of your local bookstore.
 
Overview of the steps for adding serial numbers to a product
  1. Create a text file with one product license key/registration code/serial number per line.
  2. In the Product Editor, use the Serial Numbers upload tool to assign the codes to that product.
  3. The customer automatically receives a serial number from the list for each unit of the product they purchase.
  4. Track the distribution of the serial numbers assigned to the product as sales are made.
If the steps listed above sound overwhelming, don't worry! Each step is discussed in detail below:

 
1: Create a text file with the product's license/serial/registration key codes

First, create a text file containing a single product code per line. This text file can be either a plain text file or a spreadsheet. The important thing is that each code is on a separate line. (See sample image below.)


A text document containing a single license code per line.

Each code can be up to 255 characters long, and can contain any combination of letters, numbers, spaces and punctuation. After you have created your list of codes, save the file on your computer. The file can have any name you like, and it can have either a ".txt" or ".csv" file extension. For example: "license_keys.txt" is a perfectly fine file name.

 
2. Use the Product Editor's Serial Numbers tool to upload the product codes

First, give the product a Name, Price, and any other desired information. Then, expand the section of the Product Editor that is titled Serial Numbers. (See sample image below.) This is the tool that is used to upload the text file containing the codes and assign them to the product.


Use the Serial Numbers section of the Product Editor to view the registration codes assigned to the product, and upload new ones.

The first time you load this screen, the message "No serial numbers are associated with this product" will be displayed. To add the fist wave of codes to the product, upload the text file that was created in Step 1. To start the upload process, click the Browse button in the "Upload a list of serial numbers..." option. This button will open a file browser on your computer. 

After you have located the text file containing the product keys, click the Open button in the file browser window. This will select that file to be uploaded. Next, click any of the Submit All buttons in the Product Editor to read the serial numbers in the text file and apply them to that product. After the serial numbers have been imported, the Product Editor screen will reload, and all of the codes from the text file will be listed. (See sample image below.)


A product with five serial numbers assigned to it, none of which have been sold yet.

serial number sales tracking
Brand new serial numbers will have "N/A" listed in the Sale Date and Order ID columns. That's fine. These two fields are populated when a serial number is distributed to a customer. We'll come back to this in a moment...

 
3. Customers automatically receive serial numbers when they purchase the product

Now you're all set. When a customer purchases this product, they will receive the next available serial number from the list. They will receive one serial number for each unit of the product they buy. For example, if the customer buys 3 units of this product, they will receive 3 serial numbers.

When a product with serial numbers assigned to it is purchased, the following happens:

  1. The next available serial number(s) for the purchased product(s) are used. The listings for each serial number in the store database is updated with the date and the ID number of the customer's order.
  2. The serial number(s) are listed on the Order Editor in the shopping cart software's Administration Area.
  3. The serial number(s) can be listed on the customer's receipt web page, printable receipt, receipt email, and in the Order History section of the customer's Account Area. (Whether all of these are used will depend on how you have designed your storefront and email templates. For example, it's possible to hide the key from the customer's receipt web page.)
 
4. Track the distribution of the product's serial numbers

After a serial number has been sold, it is not distributed to any more customers. (Each serial number is distributed once and only once.) However, it will still be listed in the Product Editor until you delete it. (See sample image below.) This allows you to easily track the distribution of the codes associated with the product.


Two of this product's serial numbers have now been sold. (Highlighted in yellow above.)

This table includes the following information:

SID
This is the System ID number of the serial number. The SID number is automatically assigned by the shopping cart software. It is used for internal tracking purposes, and cannot be changed.

Serial Number
The code from the imported text file. This is the code that is distributed to the customer when they purchase this product.

Create Date
The date that the serial number was uploaded.

Sale Date
The date the order that included this serial number was placed.

Order ID
The ID number of the order that received this code. Click this link to open it in the Order Editor.

X
Clean house by selecting old codes have been distributed and are no longer needed and then clicking any of the Submit All buttons. Deleting a serial number will have no affect on its usability, since that is controlled by the application that the key is being used with, and not the shopping cart itself.

 
The final results

You can now assign a list of License Keys, Registration Codes, or Super-Secret-Decoder-Ring-Codes to any product in your store. Every time that product is purchased, the store will automatically give the customer the next available code number. As each code number is used, the date and Order ID number will be recorded for your tracking purposes.

If you have any questions, problems or suggestions for further enhancements to the serial number distribution system, let us know! Modular Merchant is continually adding new features and improvements to our shopping cart software, and we welcome any feedback! Enjoy!

tips, hints and faqs
What if i need a more complex key-distribution system?
The store's built-in product registration code tool is a "one-size-fits-most" feature: a list of pre-made codes/serial numbers are assigned to a product, and customers receive the next available one when they purchase that product.

If your license key system is super-hyper-complex, it may require the development of a custom solution by Modular Merchant programmers. In that case, please contact us to review your project's needs in more detail.



Can these codes only be assigned to digital products?
Serial numbers can be assigned to any type of product — digital, shipped, service or hybrid products. If it's a product in your store, it can have codes assigned to it.
 


If I assign codes to a subscription product, will the customer get a new code every time their monthly subscription is billed?
Potentially, yes, since serial numbers are distributed any time an order for that product is placed — no matter whether it is an order placed by a customer, an administrator, or by the automated subscription billing system. If this doesn't fit into your plans, a simple solution is to use the Subscription Products module's options to daisy-chain two products together. That way, the customer will initially purchase product A, which has codes assigned to it, and all subsequent orders will be billed as product B, which is identical to product A, except that product B has no codes assigned to it.



Is there any way to temporarily turn off the issuing of serial numbers?
In that type of scenario, the way to temporarily stop distributing license keys for a product would be to delete the unused serial numbers, and then re-upload them when the time came to start distributing them again.



What happens when all of the serial numbers are used up?
If no serial numbers are available when an order is placed, no serial number is distributed with the order. Essentially, in this scenario the shopping cart would treat the product as if it did not have any codes assigned to it at all. Additional serial numbers can be appended to a product at any time by uploading another text file containing them.
 



What if I upload an empty text file?
Nothing will happen. Serial numbers will neither be added to nor removed from the product.
 



Will I be alerted when my products are low on serial numbers?
Yes. Once a product less than 10% of their total assigned serial numbers remaining, an alert will display on the Admin Home Page, that informs you of how many are left and for which product.
 



Is it possible to purchase more of a product than there are serial numbers available for it?
No. If there are 3 serial numbers left for a product, and a customer attempts to purchase 4, the system will adjust the number of units in their basket to the available number that will include serial numbers.

 



— Last Edited - 07/1/2015 9:25am PDT
Rank and add a comment to this article
Only logged in users may leave comments and rank articles. Log in to have your say!
  Knowledge Base Home

  QuickCode™ Tag Glossary

  Modular Merchant.com Homepage

Not Logged in.
Either Log in or create a User Account.

Other articles in this category...

Add a remotely hosted image to a product

Add an existing image to a product

Create duplicate products

Creating a Gift Certificate

Creating Product Bundles

How remotely hosted product images are handled

Introduction to Product Attributes

Introduction to Product Fields

Introduction to Vendor Royalties

Product Groups: Create a group of products with different prices

Product Groups: Create a product with a print and download version

Product Thumbnail Images

Replace product thumbnail images

Sell Serial Numbers, License Keys or Registration Codes

When are royalties calculated?