Software Maintenance and Support
Software maintenance and support (also called a maintenance contract or AMC) lets you monetize your software updates: a customer keeps using the version they bought, but receives updates only while their maintenance is active. It is most useful with perpetual licenses, where you want recurring revenue from updates rather than from the license itself.
You offer it by creating a maintenance policy and linking it to a license, the same way feature entitlements and meter attributes layer onto a license. The policy controls which updates (major or minor) a customer can install, and for how long.
Maintenance policy properties
A maintenance policy has the following properties:
| Property | Description |
|---|---|
| Name | Name of the maintenance policy. |
| Subscription Interval | How long updates stay available, as an ISO 8601 duration (P1Y, P3M10D, P30D), which accounts for varying month and year lengths. Set to null for lifetime maintenance. |
| Subscription Start Trigger | When the maintenance period begins: license-creation (aligns with the purchase date) or license-activation (starts on first activation). |
| Allow Major Version Updates | If true, major version updates are allowed until the license maintenance expires. |
| Allow Minor Version Updates | If true, minor version updates are allowed until the license maintenance expires. |
Enforcing update eligibility in your app
After you have created a maintenance policy and linked it to a license, call SetReleaseVersion() in your app (after SetProductId()) with your app's current version:
SetReleaseVersion("1.2.3");The version must be dot-separated digits in one of three forms: $MAJOR.$MINOR, $MAJOR.$MINOR.$PATCH, or $MAJOR.$MINOR.$PATCH.$BUILD (for example, 1.2, 1.2.3, or 1.2.3.4).
If you do not use Cryptlex Release Management, also call SetReleasePublishedDate() so LexActivator knows when the release was published.
The version set here is stored in the license as the currentReleaseVersion property and in the activation as the releaseVersion property. If the license has more than one activation, currentReleaseVersion stores the maximum release version across activations.
Renewing maintenance
A license linked to a maintenance policy with a subscriptionInterval exposes a read-only, computed maintenanceExpiresAt property, the date its maintenance expires. When it is set depends on the policy's subscriptionStartTrigger:
license-creation: computed from the license creation date.license-activation: staysnulluntil the first activation, since maintenance starts only when the license is used.
To renew, call the license maintenance renew endpoint or use the license page in the admin portal. Renewal extends maintenanceExpiresAt by the policy's subscriptionInterval.
Common configurations
| Goal | subscriptionInterval | allowMajorVersionUpdates | allowMinorVersionUpdates |
|---|---|---|---|
| Lifetime free updates (or create no policy) | null | true | true |
| Lifetime minor version updates only | null | false | true |
| One year of all updates | P1Y | true | true |
| One year of minor version updates only | P1Y | false | true |
| No updates | null | false | false |
Limiting updates without a policy
If you only want to allow updates up to a specific version, you do not need a maintenance policy. Set the license's maxAllowedReleaseVersion property to the highest version you want to allow, and call SetReleaseVersion("x.x.x") in your app.