Time Slot 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 Time Slot Splitter compares a time slot D with a reference time slot R and divides D into two time slots:

The illustration below shows different cases you can meet when using a Time Slot Splitter. The time slots are represented as follow:

Notes:

  • If the time slot D is completely inside R, part O = 0 (Case 1 in the previous illustration).

  • If the time slot D is completely outside R, part I = 0 (Case 2 in the previous illustration).

  • If the time slot D extends beyond the reference time slot R on either side of R, the time slot results are coherent: I = R, and O represents the sum of the two time slots that extend outside of either end of R (Cases 3, 4 and 5 in the previous illustration).

  • In all cases, D = I + O.

Use

When you insert it in the decision tree, the Time Slot Splitter component divides the time slot D into two time slots and creates:

When the component is executed, the two branches are activated and provide two amounts which are added up to compute the final amount. If I = 0 or O = 0, the corresponding branch is not activated.

Warning: If D = 0, (case of D1 = D2), no branch is activated and no transaction is generated (like with a Free Function).

If the Time Slot Splitter component processes "case 5" in the previous illustration, it does the following in this order:

  1. Process of the first time slot [O1 - O2] with Start Date (out of the slot) = O1 and End Date (out of the slot) = O2.

  2. Process of the time slot [I1 - I2] with Start Date (in the slot) = I1 and End Date (in the slot) = I2.

  3. Process of the last time slot [O1 - O2] with Start Date (out of the slot) = O1 and End Date (out of the slot) = O2.

Example

Note: In a price plan, you may need to apply prices which vary according to different time slots. The Time Slot Splitter component is often used to calculate the cost of a telephone call, the price of which varies according to the cases that are shown in the following table:

 

If the call takes place

You must apply the price to

During

Inside the reference time slot

“In the Time Slot”

The entire call duration

Outside the reference time slot

“Out of the Time Slot”

The entire call duration

Partly inside and partly outside the reference time slot

“In the Time Slot”

The call duration that is inside the time slot

“Out of the Time Slot”

The call duration that is outside the time slot

 

A customer has a telephone service that includes a reduced price of $0.02 per minute every day during the 10:00 PM to 6:00 AM time slot. Outside this time slot, the call costs $0.04 per minute. To calculate the cost of a call, you need to do the following:

  1. Compare the call time slot with the reference time slot (10:00 PM to 6:00 AM).

  2. Divide the call time slot into two time slots: “In the Time Slot “ and “Out of the Time Slot”.

  3. Calculate the duration of the two time slots and apply the corresponding price. For example, you insert a Duration Operator component into the two branches to calculate the duration, and then insert a Linear Function component to calculate the price of each branch.

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

Data

Settings

Time Slot D

Start date of the phone call (D1).

Stop date of the phone call (D2).

Reference Time Slot R

Type: Daily.

From: 10:00 PM To: 06:00 AM.

Generated property

Start Date and End Date (in the slot): [I1 - I2]

Start Date and End Date (out of the slot): [O1 - O2]

Pricing rules

Duration of each time slot: Difference between the two generated properties Start Date and End Date for each time slot.

Price that is applied to the “In The Time Slot” branch: $0.02 per minute.

Price that is applied to the “Out of The Time Slot” 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

Start Date Name: Provides the list of date properties. Select the date property that represents the value D1 of the [D1-D2] time slot.

End Date Name: Provides the list of date properties. Select the date property that represents the value D2 of the [D1-D2] time slot.

Time Slot Parameters: Allows you to set up the reference time slot [R1-R2].

Note: Depending on the selected time slot, the format varies as shown in the following examples:

  • daily: From 05.00 AM To 07.00 AM

  • weekly: From Monday at 05.00 AM To Wednesday at 07.00 AM

  • monthly: From 10 at 05.00 AM To 12 at 07.00 AM

  • yearly: From 22 May at 05.00 AM To 18 June at 07.00 AM

Names of Computed Properties: Allows you to type the names of the new date properties that retrieve the resulting time slots. These properties can be reused in a Duration Operator component to calculate a duration.