CelloSaaS provides Usage Metering Engine which audits the transactions/usages consumed by the individual Tenants. These Metered data will act as the base for billing the tenants who have chosen Pay per usage model.


Cello Metering Engine uses Usage Variables, a flag configurable for each business components which requires metering capability. These Flags will be incremented upon successful consumption of a feature.


In general, usages are measured in units. Whenever a functionality is used or data transacted once it can be considered as 1 unit of usage, but there is no thumb rule of unit consideration. For certain scenarios, multiple transactions can be considered as 1 unit of usage.


To Track the usage of the components, make a call to the Metering API by simply passing the Tenant Code, Variable ID, and Number of units.


  

bool IncrementMeterUsage(
	string tenantId,
	string usageCode,
	double amount
)

bool DecrementMeterUsage(
	string tenantId,
	string usageCode,
	double amount
)

  


For more information about Metering API, click here


Below are the various ways to update consumption details to the CelloSaaS Billing Engine.


  1.  Call Metering API  - In this method, you call the metering API on every succesfull consumption of a piece of functionality
  2. Configure the Business Components Service with Cello - In this method, whenever your service is consumed Cello Metering Engine will automatically increment/decrement the usage counter by 1 unit.
  3. Updating Metering Meta Table - In this model, you can directly update the usage of the components on a daily, weekly on monthly basis before the invoice gets raised for a Tenant