Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

How is Consumed (allocated_count) updated in Subscription Management > Subscription Overview?

rajeshoffic
Tera Contributor

Hi everyone,

I'm trying to understand how the Consumed column (field: allocated_count) is updated on the Subscription Overview table (sn_sub_man_st_subscription_overview) in Subscription Management (sn_sub_man).

Questions:
- Is there a trigger (business rule, scheduled job, flow, or event) that updates Consumed?
- Or is it calculated live every time the Overview loads?
- What is the official definition of Consumed (allocated_count)? Is it allocated users, active users, or measured usage?
- Is there a cache or refresh job, so that the Overview can show an older value after allocations change?

What I found so far by reading the Script Includes:
- No business rule or scheduled job on the Overview table sets the value.
- SubscriptionOverviewProvider.getData() reads the latest subscription_detail record and sets allocated_count from SubscriptionUsageUtils.calculateStringAllocation().
- Per-user subscriptions use SubscriptionStatsService.calculateAllocatedUserCount(), which looks like a count of active users allocated to the subscription.
- Other subscription types use the custom table count, or the stored allocated_quota_count.
- Display Only and Unlimited subscriptions show a dash (-).
- Cloud capacity reads total_usage (ACCOUNT row) from sn_storage_pool_capacity or sn_storage_cloud_consumption.
- Results are cached (property sn_entitlement.subscription_detail_calculations_cache.enabled).

What I could not find:
- What writes the stored fallback fields on subscription_detail (allocated_user_count, allocated_quota_count).
- What populates total_usage in the storage tables.
- The code of getUserCountBySubscriptionIdAndUserIsAllocatedAndActive.

Can someone confirm whether this understanding is correct and share the official definition?

Release/version: Australia
Application: Subscription Management (sn_sub_man) and Entitlement (sn_entitlement)

Thanks!

0 REPLIES 0