Check for available licenses then consume one

Mike Hashemi
Kilo Sage

I have been asked to setup a new catalog item and flow, which will allow employees to request an Adobe Acrobat license (standard or pro). One of the required flow steps, is to check if there are any licenses available. If there are, then I want to immediately consume it and if there are not, I will create a catalog task to have one purchased.

 

Right now, I am looking at the License Metric Results table (samp_license_metric_result). If the associated software model is for Adobe Acrobat Standard (or Pro, if that was requested), then I check the number in "rights available" (greater than 0 means we have available licenses).

 

Is that the best way to make sure I have a license to give?

 

Once I have an accurate license count (and assuming I have one available), I need to mark it "consumed" or "allocated" or whatever. I thought I could created a record in User Allocations (alm_entitlement_user) with my user and the Adobe Acrobat Standard entitlement, but doing so did not reduce the count of rights available until I ran reconciliation (which makes sense). In the mean time, other requests for the same software could come in and we could end up thinking there are more licenses available than there really are.

 

What is the best way to quickly remove a license from availability, in my flow?

1 ACCEPTED SOLUTION

dreinhardt
Tera Sage

Hi @Mike Hashemi,

if you've the chance, please try the following in a non-prod or PDI -> Client Software Distribution 2.0 application.

CSD 2.0 is a framework provided by ServiceNow to cover your use case including request, license check, install and revocation actions.

 

Back to your question:

Prerequisite: All allowed installations/rights of use must be linked as allocations to the entitlement.After a new reconcile, you then have two values available for your process: “Rights Available” and “Allocations Available”

  • “Rights Available” - only updates itself with a new reconcile
  • “Allocations Available” is dynamic and changes with each allocation

Process steps:

1. Check "Rights available": If > 0 go to next check, If <= 0 start procurement process

2. Check "Allocations available": If > 0 allocate user  to entitlement (alm_entitlement_user), If <= 0 start procurement process

 

As you can see, the "Rights available" is used as a first check about the current license status based on the last recon, but the final decision is made based on "Allocations available", 

 

Hope this helps.

 

Best, Dennis

 

Should my response prove helpful, please consider marking it as the Accepted Solution/Helpful to assist closing this thread.

View solution in original post

1 REPLY 1

dreinhardt
Tera Sage

Hi @Mike Hashemi,

if you've the chance, please try the following in a non-prod or PDI -> Client Software Distribution 2.0 application.

CSD 2.0 is a framework provided by ServiceNow to cover your use case including request, license check, install and revocation actions.

 

Back to your question:

Prerequisite: All allowed installations/rights of use must be linked as allocations to the entitlement.After a new reconcile, you then have two values available for your process: “Rights Available” and “Allocations Available”

  • “Rights Available” - only updates itself with a new reconcile
  • “Allocations Available” is dynamic and changes with each allocation

Process steps:

1. Check "Rights available": If > 0 go to next check, If <= 0 start procurement process

2. Check "Allocations available": If > 0 allocate user  to entitlement (alm_entitlement_user), If <= 0 start procurement process

 

As you can see, the "Rights available" is used as a first check about the current license status based on the last recon, but the final decision is made based on "Allocations available", 

 

Hope this helps.

 

Best, Dennis

 

Should my response prove helpful, please consider marking it as the Accepted Solution/Helpful to assist closing this thread.