« The SaaS project – Part four – Orders and Operations | HomePage | The SaaS project – Part six – Federation »

Friday, 23 March 2007

The SaaS project – Part five – Metering and billing

Other articles on the SaaS project

The Software as a Service (SaaS) Project
The SaaS project - part 2 - challenges and provisioning
The SaaS project - Part 3 - Plans and plan management
The SaaS project - part 4 - Orders and Operations
The SaaS project - part 5 - Metering and billing
The SaaS project - part 6 - Federation

 

5. METERING AND BILLING

The tenant has purchase a “per usage” service. How do we bill her?

Let’s assume that the hosting providers offering of the ISV software is based on a per software item usage, e.g. per Sitecore document, or in a CRM system it could be per account. How can we build a generic interface that allows the hoster to get this information from the ISV software on a per-tenant-basis?

 

The application manifest offers metering points, the plan defines which to use

The different measuring offerings for a given piece of software are usually decided by the software itself. Sitecore, for example can configure and measure limits on a per item level, per concurrent content author, the total of content authors, per database size, etc.

The application manifest, which holds information about requirements for a piece of software as well as the actual installation script, also contains a metering section with zero or more metering (web) services for the software item.

 

<am:monitors>
  :
  <am:metering>
    <am:usagemetering type="applicationitems"
      id="SC_ItemCount">
      /sitecore/itemcount.asmx?tenant=$(tenantname)
    </am:usagemetering>
  </am:metering>
</am:monitors>

 

When the hosting provider defines the plan, they also configure the pricing models. Each pricing model for the software will define the rules of the billing routine, such as “every month, check on the (max) content items, then bill the tenant 5 cents per item”. This rule will point to the metering point, ruled by the manifest.

The plan naturally can reside in any database, but in XML it could look something like:

 

<Plan>
  <Item id=”SCBox”>
    <MeteringPointIntervals>
      <Point id=”SC_ItemCount” Refer=”x” meteringInterval=”24h” />
      <Point id=”SC_DBUsage” Refer=”y” meteringInterval=”1h” />
    </MeteringPointIntervals>
    <LicensePacks>
      <LicensePack name=”LowFlatHighItem">
        <Limitation type=”flatfee”>2$</Limitation>
        <Limitation type=”Items”>0,5$ * $SC_ItemCount</Limitation>
      </LicensePack>
      <LicensePack name=”HighFlatLowItem”>
        <Limitation type=”flatfee”>20$</Limitation>
        <Limitation type=”Items”>0,05$ * $SC_ItemCount</Limitation>
      </LicensePack>
      :
    <LicensePacks>
  <Item>
  <Item id=”SCBoxMailing”>
    :
  </Item>
  :
</Plan>

 

Measuring intervals

Naturally, the hoster could choose to use the metering point web service once a month, but this would allow the tenant to decrease the number of content item every month right before the hoster read the value.

To solve this issue, the hosting provider should supply a measuring (windows) service that, with regular intervals (also defined in the plan) can use the measuring web service and store this value in a measuring point database.

When the hoster has defined the plan, and publishes it to the front end ordering system, the plan management system also generates a plan interval manifest.

The windows services operate from this plan interval manifest and as such the service simply receives a number of operations, executes them and stores the return value into a database. E.g.:

 

<?xml version="1.0" encoding="utf-8" ?>
<PlanManifest>
  <Plan name="Premium">
    <SoftwareItem id="Sitecore" intervalMinutes="10">
      <MeteringPoint id="SC_ItemCount" tenantId="customer1"
        action="http://sitecore/itemcount.asmx?tenant=customer1"/>
      <MeteringPoint id="SC_ItemCount" tenantId="customer2"
        action="http://sitecore/itemcount.asmx?tenant=customer2"/>
    </SoftwareItem>
    <SoftwareItem id="SitecoreMailingList" intervalMinutes="15">
      <MeteringPoint id="SCML_Mailboxcount" tenantId="customer1"
        action="http://sitecore/mailboxes.asmx?tenant=customer1"/>
    </SoftwareItem>
  </Plan>
</PlanManifest>

 

Once a month, or when the plan defines to bill the customer, they will query the measuring point database through method with an interface looking something like:

 

float GetMeeteringPoint (
    MeteringPoint, TenantID, StartDate,
    EndDate, AggreegationType)

 

Where the last parameter, aggregation type is allowing, sum, count, average, max and min values.

When the plan management system receives this value, it can calculate the max number of items and add this with the agreed upon price.

 

CRM or ERP integration

This process can be initiated from the CRM or ERP system (which too can be connected to the ordering flow), or the billing engine could be a separate piece of simple software which passes the data to the CRM.

The hosting provider must be aware of the potential need to deliver billing information to any 3 part billing provider; this could be a service provider who’s an expert in collecting fees, or it could be the ISV who must handle invoices.

13:41 Posted in SaaS | Permalink | Comments (0) | Email this | Tags: saas, sitecore

The comments are closed.