Best Practices for the License Management Application (LMA)
Table of contents
- Glossary
- What is the LMA?
- LMA Feature #1: Seeing who installed your package
- LMA Feature #2: Controlling package access
- LMA Feature #3: Monitoring a license & organization lifecycle
- Best practices around managing licenses in the LMA
- Maintain the License-to-Account relationship
- Use the Partner Business Organization as LMO
- Maintain the seat count
- Maintain the license expiration date
- Use the license refresh button to refresh outdated license information
- Further resources
Glossary
This guide uses some terminology that is specific to the Salesforce ISV/OEM Partner Program. Here is a small glossary:
PBO (Partner Business Org): the organization you receive from Salesforce as part of your Partner Agreement (the one that includes two free user licenses).
LMA (License Management Application): a managed package offered by Salesforce that is required to manage license records.
License: A special object included in the LMA that controls whether (and how many) users within a specific subscriber organization can use your package.
LMO (License Management Org): the organization in which you have installed the LMA. It is recommended to use the PBO as LMO.
Subscriber Organization: a better term would be "Customer Org". Subscriber orgs are organizations that have installed one (or more) of your packages.
PAM (Partner Account Manager): team member of the Salesforce AppExchange team.
What is the LMA?
The LMA is a managed package built, maintained and distributed by Salesforce. It includes a set of objects and processes. It is mainly used for:
LMA Feature #1: Seeing who installed your package
Each installation of your package in a subscriber org automatically creates one license record in your LMO. Additionally, a Lead record for the person who installed the package will be created along the way and attached to the license.
LMA Feature #2: Controlling package access
One license record always combines the following things:
The installed package
The subscriber org in which the package was installed
The status of the license - mainly Active or Inactive
How many users in that subscriber org are entitled to use the package
The latter is controlled via the Seats field (sfLma__Seats__c). This field can be configured either as a so-called Site License or as a License with a maximum seat count:
Site License: setting the seat count to -1 will entitle any user in the subscriber org to access your package ― within the bounds of the Salesforce permission structure, which is maintained by the organization administrators.
Maximum seat count: setting the seat count to a numeric value, e.g. 15, will require your customers to explicitly assign users that should be entitled to user your package. The seat count defines the maximum number of users that they can assign. If an unlicensed user tries to access your package, Salesforce will render a license error (in most cases).
LMA Feature #3: Monitoring a license & organization lifecycle
There are certain scenarios how your customer relationship (or your customer's relationship with Salesforce) ends:
The customer uninstalls your package: this will automatically update the license record's status to Uninstalled.
The ISV/OEM/Partner (you) marks the License record as Suspended, effectively preventing the customer's users from interacting with your Package, even though it is still installed and assigned to users.
The customer's relationship with Salesforce ends without uninstalling your package. In this case, Salesforce deletes the subscriber organization after a certain grace period. Over the course of this period, Salesforce will automatically update the license record's Organization Status (sfLma__Org_Status__c).
You can read more about the possible License updates in the official Salesforce documentation: https://developer.salesforce.com/docs/atlas.en-us.workbook_lma.meta/workbook_lma/lma_edit_license.htm
Here is a visual summary:
In the example above:
There are two customers / subscriber orgs - A and B.
There are two packages - Core and Ext (think of a core and an extension package).
Subscriber org A has package Core and Ext installed:
The org admin can assign a maximum 15 users to L-00001 which entitle them to use package Ext.
The admin does not need to assign users explicitly for package Core, because the license was configured as a site license.
Subscriber org B has only package Core installed. Since the license is inactive, no user will be able to access package Core.
Best practices around managing licenses in the LMA
Maintain the License-to-Account relationship
License records within the LMA contain an account lookup (sfLma__Account__c). It's an optional field and it is in the responsibility of the partner to maintain that lookup. Maintaining it can be done via two ways (or a mix of both):
Manually: you manually assign or create the account to the license whenever a new license is created.
Manually with lead conversion: you convert the lead via the "Convert" button on the lead record. Doing so will allow you to select an existing account or create a new account that will then be automatically linked on the license.
Automatically: you build an automation, that automatically assigns or creates an account record based your own logic.
In most cases, the first two approaches are recommended and totally viable unless you have a high volume of package installations. We recommend maintaining the account relationship for all paying customers or prospects.
In ISVapp, the Account lookup is required in order to view the usage and behaviour of your customers. The ISVapp License Manager is a tool that helps you to keep your license records clean and tidy.
Use the Partner Business Organization as LMO
As a new Salesforce ISV or OEM partner, Salesforce recommends installing the LMA in the PBO. The reason for that is simple: in order to assign an account to a license, the account record needs to exist in the same organization.
Not following that recommendation can result in significant maintenance overhead and should be considered carefully. If you are a new Salesforce Partner, please consult with your PAM.
Maintain the seat count
Whether you deploy Site Licenses or seat counts based licenses depends on your business model. The first option allows your customers to effectively use the product with any number of users, while the second option enforces a maximum number of assigned users.
Some partners, for example, use Site Licenses but enforce the seat count contractually. If this applies to you or if you don't want to maintain seat counts on your license record, you can use ISVapp seat count overrides to pull in seat counts from a custom field on the account record.
Maintain the license expiration date
The Salesforce licensing model allows you to set an expiration date (sfLma__Expiration__c) on each license. Once a license passes its expiration date, Salesforce will treat the license as inactive and restrict access to your package(s) for the affected customer. Leaving the expiration date empty, will never expire a license. This field is also often referred to as renewal date. Keeping this field up-to-date allows you to properly control access to your products and prevents customers from accessing them once their contracts expire.
If you don't want to set expiration dates on licenses because you want to avoid that your customers are getting locked out of your app: Use the ISVapp Salesforce Sync to pull expiration dates from a custom account field.
Use the license refresh button to refresh outdated license information
It can happen that your license records become outdated. In that case, you can perform a License Refresh.
Further resources
The official Salesforce LMA Guide
The Salesforce ISVforce Guide is your first address for everything related to the AppExchange program
Details about an organization's status lifecycle in the Salesforce Help Portal