Search Engine: Elastic

Article ID: 116557, created on Jul 26, 2013, last review on Jul 14, 2018

  • Applies to:
  • Business Automation
  • APS 1.x


Business Automation allows to manually or programmatically set/update usage of resources based on DUMMYGATE using the Public API method SetResourceUsage_API.

Business Automation uses the following formula to calculate usage of non-additive resources in a subscription which is displayed on the Resources tab in a subscription properties in Business Automation Control Panel:

Your text to link here...

  • Resource amount set - the amount of resource set by the SetResourceUsageAPI_ API method
  • Resource amount set time - the moment of time when resource amount was set for a subscription
  • Subscription last overusage reset time - the moment of time when resource overusage was last time billed for a subscription (last billing date of a subscription)

So, Business Automation displays the average usage of non-additive resource since a subscription last overusage billing time.

Additional information

Algorithm of showing usage of resources in Business Automation Control Panel in a subscription properties and in Billing Orders is different for additive and non-additive resources:

  • For additive resources it is quite straightforward – Business Automation always shows the last amount set by the SetResourceUsage_API API method as 'Usage' in Control Panel and shows the same value as quantity in Billing Order.

  • For non-additive resources Business Automation takes into account resource usage history and period of time each amount was used within the Billing Period

Simple example

Let us consider the following usage of a resource during a 30-days month:

  1. 1st - 10th days of month: 60 units
  2. 11th - 20th days of month: 90 units
  3. 21th - 30th days of month: 0 units

The total usage in Billing Order (BO) for the whole month in the example above will be calculated as follows:

Your text to link here...

Detailed example (how algorithm works)

Whenever the SetResourceUsage_API Business Automation API method is executed for a subscription the used amounts of resource, dates and other parameters are stored in Business Automation database.

E.g. we have Billing Order with order detail for resource overusage like this:

Your text to link here...

We can fetch parameters for calculating the above quantity = 3.07 GB from Business Automation database, they may look like this:

Your text to link here...

Quantity in the Billing Order is calculated as total sum of Usage[i] (usage for each period of time listed above) where each amount of resource was used during its part of Billing Period:

Your text to link here...

  • (Time[i+1] - Time[i]) is the period of time in seconds while Amount[i] has been used
  • (BillingPeriodStart - BillingPeriodEnd) is the length of Billing Period in seconds

The fraction Your text to link here... represents a portion each usage period takes within the whole Billing Period.

Also we consider that initial Amount[0] = Amount(BillingPeriodStart) and the last Amount[N] = Amount(BillingPeriodEnd). Thus:

Your text to link here... Your text to link here... Your text to link here...

Example with graph

Please see the below picture illustrating the algorithm:

Your text to link here...

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 978c327986a55270842e3de502d69383 717db81efe94e616312b74fb03a5d474 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF