Numbers Splitter

Note: You can use the Splitter components in a price plan, in a pricing macro, or in a refill plan (refill logic) but not in a charging plan.

The Numbers Splitter compares a numerical property P with a threshold T and divides the numerical property into two parts, p1 and p2, according to the following conditions:

Note: In all cases, P = p1 + p2.

When you insert it in the decision tree, the Numbers Splitter component divides the numerical property P into two parts and creates:

When the component is executed, if p1 and p2 are not equal to 0, the two branches are activated and provide two amounts which are added up to compute the final amount. If p2 = 0, the branch “beyond” is not activated.

Use

In a price plan, do the following to use the Numbers Splitter:

  1. Insert the component in the decision tree to create the two branches “up to” and “beyond”. Choose a numerical property, define a threshold, and choose the name of the generated property.

  2. Describe the pricing of each decision tree branch by using a Function component.

Example   

Note: In a price plan, you may need to apply different prices which vary depending on a numerical threshold. To do this, you can divide a numerical property according to the numerical threshold. A typical use of the Number Splitter component is the calculation of a call within the framework of a calling plan. The calculation rule is the following:

  • If the call duration is less than the time that remains in the calling plan, you must apply the calling plan price to the entire call duration.

  • If the call duration is greater than the time that remains in the calling plan, you must do the following:

  • Apply the non-calling plan price to the part of the call duration that is outside of the calling plan limits

  • Apply the calling plan price to the part of the call that is within the calling plan limits

  • Add the two resulting amounts

A client has a telephone service that contains a calling plan of two hours per month at the reduced price of $0.02 per minute. Beyond these two hours, the calls cost $0.04 per minute. To calculate the call price, you must compare and divide the call duration according to the time that remains in the monthly calling plan. The remaining time can be a counter that is decreased each time that there is a call and reset to two hours at the beginning of each month.

The following table presents the information that is needed to set up the Numbers component inside the price plan:

Data

Settings

Numerical property

Duration of the phone call (numerical property)

Threshold (Split value)

Monthly remaining duration in the package (counter)

Generated property

Call duration according to the calling plan

Pricing rules

Price that is applied to the “up to” branch: $0.02 per minute

Price that is applied to the “beyond” branch: $0.04 per minute

Identification area

Name: Type the name of the component (mandatory).

Description: Allows you to type the description of the component (optional).

Definition tab

Property Name: Provides the list of numerical properties. Select a numerical property.

Split value: Provides the threshold value list, or allows to type a threshold value. Select or type a split value.

Names of Computed Properties: Allows you to name two new numerical properties.