billmax documentation   BillMax Billing Solutions
  877.245.5629
  sales@billmax.com
 

Name

tierplan table — table for Tierplan data

tierplan Field Definitions

Name

Description

Data Type BillMax Default
Name

Description

Data Type BillMax Default
cangodown

Species whether the usage for a Service with a Usage Based Billing plan can be billed at a lower-priced Tier after having been billed at a higher-priced Tier.

tinyint(4) 0
datapurge

The number of elapsed days before the applicable statistics are automatically purged from the stats table.

[Warning] Warning

The applicable statistics are purged even if they have not been used for a Usage Based Computation Result

int(11) 90
descr

Usage Plan Name.

char(40) No default. User input required.
direction

Statistics recorded in the stats table may represent a direction measurement by using a Named Samples. An inbound static is denoted by "in='value'". An outbound statistic is denoted by "out='value'". Both directions may be recorded in the stats table using the form in='value',out='value'. Computations may be based based on in values, out values, the larger of the two values, or the sum of the in and out values. Choose Not Applicable when using the Sum computation method.

tinyint(4) 0
displayprec

Specifies the usage display precision shown to customers. This option does not effect some values displayed in the staff interface.

tinyint(4) 3
linearfree

Used when the Linear style Tierplan is selected. Pricing is computed by multiplying linearprice and (Usage Based Computation Result minus linearfree). Ignored when the Step style Tierplan is selected.

double(20,8) 0.0
linearprice

Used when the Linear style Tierplan is selected. Pricing is computed by multiplying linearprice and (Usage Based Computation Result minus linearfree). Ignored when the Step style Tierplan is selected.

double(16,8) 0.0
method

Computational method used to determine Usage Based Computation Result See Tierplan Valid Values.

tinyint(4) 3
number

System Identifier for a database row. In most cases automatically generated. Allowable range is 1-2147483647.

int(11) Autogenerated. Generally next available integer.
percentile

Used for the Percentile computation method.

tinyint(4) 95
reportfreq

Usage report for a Service may be mailed to the email address of the Account every reportfreq days. The last previous date a usage report was sent is stored in the bwreportdate field of the service table

tinyint(4) 7
siunits

Specifies whether or not the International System of Units are used when calculating units from certain data. Presently this option is used only when loading stats data from the datacall table and in datacall reports.

tinyint(4) 0
style

Denotes what style of Usage Plan is being used. See Tierplan Valid Values.

tinyint(4) 0
stype

A description of the type of sample. This links the type of sample specified here with statistics entered in the stats table using enter_stat with the stype parameter set to the value specified here.

Example 3.1. Examples for the field stype

  1. Bandwidth Usage

  2. account states

  3. new calltracks


char(30) No default. User input required.
susp_cost

Whenever usage costs reaches this value, the customer's service is suspended for over usage for the remainder of the service's usage cycle. This option is available only for the MIN, MAX and SUM computation methods. A zero value disables this option.

int(11) 0
susp_value

Whenever the usage computed value reaches this value, the customer's service is suspended for over usage for the remainder of the service's usage cycle. This option is available only for the MIN, MAX and SUM computation methods. A zero value disables this option.

double(20,8) 0.00
units

The units of measurement captured in the stats table.

[Warning] Warning

This is for descriptive purposes only. Specifying units such as MB and capturing the data in another such as Mb will cause incorrect billing and confusion

char(20) Mb/sec
warn_cost

Whenever the difference between the current usage cost and the previous usage cost reaches this amount, send the customer an email warning. This option is available only for the MIN, MAX and SUM computation methods. A zero value or a missing email template (usagereport.email) disables this option.

int(11) 0

Valid Values for Certain Fields

Table 3.1. Valid Values for Tierplan direction

Direction Programming Constant Database Value Description
None TIERPLAN_DIRECTION_NONE 0 Not Applicable. Value stored in stats table is a single floating point value.
In TIERPLAN_DIRECTION_IN 1 Value stored in stats table must include the Named Samples "in=''".
Out TIERPLAN_DIRECTION_OUT 2 Value stored in stats table must include the Named Samples "out=''".
Greatest TIERPLAN_DIRECTION_GREATEST 3 Uses the greatest of the Named Samples "out=''" and "in=''" which must be included in the value field for the stats table.
In+Out TIERPLAN_DIRECTION_INOUT 4 Uses the sum of the Named Samples "out=''" and "in=''" which must be included in the value field for the stats table.

Table 3.2. Available Computational Methods

Computational Method

Programming Constant

Database Value

Description

Percentile

TIERPLAN_METHOD_PERCENTILE

0

All the samples for a given period are sorted, then the top x% are discarded. x is defined as 100 minus percentile. The largest remaining sample is the Usage Based Computation Result.

Sample values are 1,2,4,7 and 20. Percentile is 80% The Usage Based Computation Result is 7.0.

Average

TIERPLAN_METHOD_AVERAGE

1

Usage Based Computation Result is the average of the samples.

Sample values are 1,2,4,7 and 16. The Usage Based Computation Result is 6.0.

Max

TIERPLAN_METHOD_MAX

2

Usage Based Computation Result is the maximum of the samples.

Sample values are 1,2,42,7 and 16. The Usage Based Computation Result is 42.0.

Min

TIERPLAN_METHOD_MIN

3

Usage Based Computation Result is the minimum of the samples.

Sample values are 1,2,42,7 and 16. The Usage Based Computation Result is 1.0.

Sum

TIERPLAN_METHOD_SUM

4

Usage Based Computation Result is the sum of the samples.

Sample values are 1,2,42,7 and 16. The Usage Based Computation Result is 68.0.


Table 3.3. Usage Plan Styles

Usage Plan Style Database Value Programming Constant Description
Tiered Pricing 0 TIERPLAN_STYLE_STEP The Tier with the greatest value such that Usage Based Computation Result is greater than or equal to the Tier value is selected. The price for that Tier is billed.
Linear Pricing (no price tiers) 1 TIERPLAN_STYLE_LINEAR Any defined tiers are ignored. The "Base Amount" is subtracted from the Usage Based Computation Result. The billed amount is the resulting value multiplied by the "Price Per Unit".
Bulk Rate Pricing 2 TIERPLAN_STYLE_BULK The Tier with the greatest value such that Usage Based Computation Result is greater than or equal to the Tier value is selected. The price for that Tier multiplied by the Usage Based Computation Result is billed.
Marginal Pricing 3 TIERPLAN_STYLE_MARGINAL Billing for Marginal Pricing is a two step computation. The Tier with the greatest value such that Usage Based Computation Result is less the Tier value is selected. The "Marginal Price Total" is one value of the computation. Then the Tier with the greatest value such that Usage Based Computation Result is greater than or equal to the Tier value is selected. The value of the Tier is subtracted from the Usage Based Computation Result and the result is multiplied by the Tier price forming the second value of the computation. The sum of the two computations is what is billed.

SEE ALSO


Document Revision A for BillMax 2.2.0   -   Copyright © 1997-2006 The iSpark Group, Inc.

All rights reserved. No part of this documentation may be reproduced or transmitted in any fashion without written permission by The iSpark Group, Inc. This documentation is for the sole use of licensees of the BillMax billing software created by The iSpark Group, Inc. Making the documentation available to a non-licensee of BillMax without written permission of The iSpark Group, Inc. is a violation of the use of this documentation.

While precautions have been taken in the preparation of this documentation, The iSpark Group, Inc. assumes neither liability nor responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

All terms mentioned that are known to be trademarks have been appropriately capitalized. Use of the a trademark does not affect the validity of any trademark or service mark.

Links to third-party Web sites are provided for convenience. The iSpark Group, Inc. is not responsible for any content contained in the third-party Web sites.

Comments about this documentation may be sent to doc@billmax.com