how many licenses I have?


I have licenses for internal users and licenses for portal users, but in the manage licenses there’s only 1 count of licences:
Allowed Licenses 32
Used Licenses 26

I know that I have 22 internal user licences and 10 portal.

Now is easy to track because numbers are low and I can count how many users, but in the future…

So is your question, “How can I track how many Licenses I have assigned to Portal Users versus how many are assigned to Internal Users?”

Here is the XML for a page that should help with that. (Note: this page must be run by a System Administrator in order to be useful). It uses an Aggregate Model on the User object with a Result of Subquery condition on the UserPackageLicense object, grouped by the User’s Profile’s User License type. It will give a Table with results like this:

User License Name # of Licenses

Thanks! and a way to know how many remaining licenses I have of every type? 

Unfortunately no, not out of the box, we can’t currently provide that level of information via a query on any Salesforce objects — you can query on the PackageLicense object (with a Condition on the NamespacePrefix field setting equal to “skuid”) to know how many total remaining Skuid licenses you have, but there’s no way to break this down by license type.

However, you could add a Custom Object or Custom Setting to your org for you to internally keep track of that information. Call it “Skuid License Info” or something, and then have a field on it called “License Type” that’s a picklist or something with values like “Salesforce”, “Customer Community”, etc. (matching the License Names for Salesforce license types), as well as a “Licenses Remaining” field. Then you could use a Skuid page (maybe with some Ui-Only Fields and the MODEL_LOOKUP() function) to go lookup the number of licenses remaining for each type to display it alongside the number of licenses used.