Pages

Tuesday, April 24, 2018

Salesforce: User License Reporting

We can check the number of licenses purchased and remained from Company Information.



But, can we get the same info using report? With make it as a report, we can schedule to deliver that information directly to stakeholders inbox.


1. Custom Report Type
Salesforce out-of-the-box provides standard User report type, this is good enough to report user information, including login history. But, that report types not able to tell the number of licenses purchased.

Create custom report type and select Users as the primary object. In the Fields Available for Reports, edit the layout and add lookup field from Profiles, and select all fields under Profile. Even, in this case, we just need Name and Total Licenses information.



You may want to change the Total Licenses label by double-click the field, remove "Users: Profile: User License:".



Make sure to set the new Custom Report Type as deployed.


2. Create report
Create a new report using the new report type. To make it looks nicer, set the report as Summary Report, group by User License and filter only for Active users.
You need to create a few 2 custom summary formula:
1. Active Users: to count all active users, the formula: RowCount
2. License Remain: this is by calculating Total License - Active Users, the formula: User.Profile.UserLicense.TotalLicenses:SUM - RowCount


You can add Conditional Highlighting to get user attention when remaining licenses reach a certain threshold.


3. The Moment of Truth



How is the report looks like in Lightning? Except without Conditional Highlighting, the report will still show nicely.