This Salesforce Lightning Application is designed to manage product licenses, user assignments, and purchase conditions. The application leverages custom objects and relationships to track and manage licenses efficiently.
In a Salesforce Org, to accurately determine that a Product License is in use, it is necessary to do more than just observe the assignment of User Licenses, Permission Set Licenses, and Feature Licenses to users.
An analytical layer is essential, utilizing not only these assignments but also other user characteristics such as profile and permissions. This layer does not exist natively in Salesforce Orgs.
This application is built to provide an infrastructure in terms of data model and data extraction to achieve taht end.
The application is built around the following custom objects and their relationships:
- ProductLicense__c - Contains details about the product license to be managed. Product license is what customer buys from Salesforce. It could be a base license or an add-on.
- ProductLicensePersona__c - Persona that uses this product license - represented by a SOQL query.
- ProductLicensePurchaseCondition__c - As a Product License can have different purchase conditions depending on commercial negotiations, this object will keep a track of these conditions so final prices can be correctly calculated.
- ProductLicenseUserAssignment__c - Object to represent product license assignment to users. This object will be populated based on the Product License query. It represents the analytical aspect required to determine product license utilization in a Salesforce Org.
Several reports were built in the app based in this data model.
The package contains two permission sets:
- License Manager - permission set with all required permissions to access the Lightning Application and Data Model
- License Manager - Download CRM Analytics - permission set with only the permission to Download CRM Analytics data - useful to get the list of users assigned to permissions without login in the past 180 days
Beside these two permission sets, user need to have CRM Analytics permission set licenses and permission set in order to access the out-of-the-box dashboard.
Based on the Product License Personas, it's possible to implement automations to automatically create and maintain the Assignments. However this is not built yet and is in the roadmap, depending on adoption.
This application is distributed in form of an unlocked package. You can build your own app based on the code or simply get the package ID on the sfdx-project.json
and install it directly in your org. Installation key is Vai Corinthians
.
After installation, please assign the required permission sets to the user. Also, as this app contains CRM analytics recipe, assign the permission set License Manager to the Analytics Integration User and execute the recipe. You can also schedule the recipe to execute in a determined agenda.
On scripts/data/sfdmu
folder there are some data sample that can be used to load sample data after package installation. For that you can use Salesforce Data Move Utility plugin and authenticated in the target org execute:
cd scripts/data/sfdmu
sf sfdmu run --sourceusername csvfile --targetusername <TARGET USERNAME>
If you find any issues or opportunities for improving this repository, fix them! Feel free to contribute to this project by forking this repository and making changes to the content. Once you've made your changes, share them back with the community by sending a pull request. See How to send pull requests for more information about contributing to GitHub projects.
If you find any issues with this demo that you can't fix, feel free to report them in the issues section of this repository.