function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dileep KatariDileep Katari 

how to send an email alert which contains the number of remaining licenses on an org

Salesforce licenses in our org regularly get used up and we are forced to run an audit every once in awhile and downgrade users to platform license. But this is going to cause delay in granting access to users in need. 

When the number of remaining licenses comes down to say 25 or 50, our users need to wait until our audit gets completed.

Can we avoid this?  Basically the ask is whether the "Company Information", Total number of licenses, used, remaining details on setup can be exported and scheduled via code and received as an email. Any help would be appreciated. 

Thank you!
SwethaSwetha (Salesforce Developers) 
HI Dileep,
I believe there is no way currently to accomplish. See the idea- "Organization Information should be accessible via SOQL or API"(https://success.salesforce.com/ideaView?id=08730000000XnUCAA0)

Please consider upvoting the above idea on Idea exchange so that the Salesforce product team can implement it in coming releases based on number of upvotes.
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.