Planning Your Licensing Strategy
Planning is one of the fundamental functions of software development, and this is particularly true when it comes to planning Licensing and Versioning strategies. Before you set up your product(s) in LicenseCloud, there are a few things you’ll need to think about:
Throughout this section of our site, we’ll be referring to a few keywords that mean specific things within LicenseCloud, like Public Token or Product. Click any of the words to the right to expand their definition so you’ll know what the heck we’re talking about.
Your software. This can be desktop software, an app, a WordPress plugin, basically anything you need to create a license for.
Within a product, you’ll define Versions such as 1.0.0 or 1.2.1. Versions exist in 3 parts: Major, Minor, and Patch.
A license key or serial number generated by LicenseCloud for a Product. These are unique 20-character alphanumeric keys, aren’t case-sensitive, and can be used in dashed or dashless format (example: 32D3E-FBF71-574F0-99E38 or 32d3efbf71574f099e38)
The LicenseCloud server where you’ll perform commands such as creating, validating, and activating licenses. Data is returned in your choice of XML or JSON. The full API documentation can be found here.
A unique 40 character string that must be included in any API call. There are two kinds of tokens available: The Public Token can be embedded into your apps, and can only be used for activating and validating licenses, and Private tokens which can perform WRITE operations in the API, such as creating, modifying, and deleting licenses.
An “activation” is the process of connecting to the LicenseCloud API to activate a license. You can see exactly how to do this in the API Reference.
A “validation” is the process of connecting to the LicenseCloud API from within your software to validate a license key. You can see exactly how to do this in the API Reference.
Your Versioning Strategy
There are three numbers used to define a product’s version: Major, Minor, and Patch. These are represented as 3 integers, such as 1.0.0 or 1.2.1. Although the versioning process is fairly straight-forward, it’s important to think about how your licenses will be applied to future releases. Namely, if a customer purchases Version 1.0, do you want their license also to work in Version 1.1? What about Version 2.0?
Your answer will determine how you set up your Products. In LicenseCloud, when you create a Product, the licenses you create for that product will be valid for any additional versions you add to it. This means that if you only want your licenses to be valid within a Major release, then each Major release would be configured as a separate product.
One of the options when creating a license in LicenseCloud is the ability to identify it as a trial and set an expiration date. There are a few things to think about if you’re offering trial versions of your software:
- Some developers will distribute a single “full featured” Product, and then hard-code a license validation API call into their software every time it’s run. That lets them use our API to determine if the license the user entered is a trial license, and they can program their app to disable some or all of its functionality when the license status is expired. This allows the developer to lock and unlock features based solely on the license status, see how often the app is used, and more.
- Other developers will distribute a completely different version to trial users, and if the user purchases the full version they’re directed to download a different version than the one they’ve already installed. In this scenario, they would be set up as different Products in LicenseCloud.
Something else to consider is what happens when the trial user decides to upgrade to the full version: Do you want to update their current license and remove the trial status, or do you want to just issue them a new license and have them re-enter it into the product? Both options are possible within the LicenseCloud API, it’s up to you to choose which method you prefer. Click the chart to the right to see the full sized version of the most popular trial scenario.
When you’re creating a License, whether you’re doing it manually through the admin console or through the API, there are a few settings to consider:
- Max Activations
- Days Valid
Max Activations is exactly what you think it is; the number of times this license can be activated. Or, more specifically, the number of different devices the License can be activated on. Most developers just set this to one, but if you allow your customer to install your Product on, say, five different machines, you could put a 5 in the Max Activations box. To utilize this feature, you’ll need to code your product to send a unique device ID to the API for each activation and subsequent validation. See the API Reference for details on how to do this.
Trial is a simple yes or no setting indicating the license status. It’s returned in the API validation response, so you can use this status within your software if you want to do anything different for trial users.
Days Valid is a setting at license creation that applies an expiration date to the license upon activation. Since licenses aren’t always activated at the same time they’re created, this prevents licenses from expiring before they’re ever activated. With this setting, the counter starts at activation time. Most developers use this feature as a method of limiting the time a customer is allowed to receive free updates; a setting of 365 would set the license’s expiration date to one year away.
Group is a setting for organizing licenses. It’s pretty straight-forward… you can create License Groups to organize licenses by ad campaigns, affiliates, or any criteria you like. It’s entirely up to you.
Activation, Piracy, and Device Detection
When you’re creating a new license in the API, you can automatically have that license ACTIVATED at the time of creation or wait until the user activates it. In most cases you’ll want to go ahead and activate it, so when your user installs their software you can code it to ask them to enter their license key, validate it, and let them continue. For more advanced applications with device validation, you may want to code your app to do the activation at first runtime, but it’s entirely up to you.
Now, pay close attention here because this part is important…
One of the optional parameters you can pass over to the API when activating a license is called USER_DEVICE. This is designed for you to be able to pass over a unique device ID that identifies the system making the activation. If this parameter is set, you must include USER_DEVICE in every future validation request for the license or the validation will fail.
Essentially, this feature is how you protect your software from piracy. If someone tries to copy their installation over to another system, that other system won’t have the same unique device ID, so when it tries to validate the license our server will reject it. Click the diagram to the right to enlarge.
Let’s face it, we know you’ll never release just one version. You’ll discover a bug, think of a new feature, or just insist on changing something. The good news is that we make it pretty easy to deploy those updates to your users.
All you have to do is sign into the LicenseCloud console, and from the menu select Products > Create a New Product Version, then enter the new version info and link to the file.
If you’ve coded your software to validate the license when they run it, or even just once in a while at specific intervals, one of the parameters returned is the current version and download URL. Then all you have to do is check if the version LicenseCloud returned is newer than the one the user is running and either force an upgrade or just notify the user so they can download it.
Storing User Information
When you create and/or activate a license, you have the option of storing information about your customer in LicenseCloud. It’s up to you how much or little you want to store, but we recommend at the very least storing a Transaction ID and e-mail address.
Storing the Transaction ID can help you find the correct license and disable it if you need to refund the customer’s purchase. And if an email address is supplied, our system can send an email to the user with their license key and a link to download the file when the license is created, or when you add a new version of the product they purchased.
Ever wonder how often people are actually using your software? It’s actually pretty easy to figure out – just code your application to validate the license every time it’s run. Our API logs everything, including the IP address associated with the activation, and presents neat little reports showing you usage statistics and geographic locations of your customers. You can see this data for an individual license, or aggregated across them all, so you get a true 360 degree view of the impact of your software.