Advanced Rates

From Kolmisoft Wiki
Jump to navigationJump to search

Description

Advanced Rates are used ONLY for Retail Tariffs.

In order to manage rates for destinations more easily, destinations are grouped, so that one rate applies for a group of destinations, not for one destination separately. (A Group can contain only one destination if necessary.) Destinations groups are for users, not providers, because providers need to have very exact rates for every destination.

Each group of destinations consists of several destinations described by prefixes. As an example, let's take Albania MOB. Here we have three destinations described by prefixes: 35538, 35568 and 35569. Each of these destinations is Albania MOB. Usually users do not care which MOB network they are calling, and for the less popular countries providers usually put one price on all destinations in that direction. It's the same here: We can put one price on all these three destinations grouped as "group Albania MOB".

Each rate for a destination group may have many rate details. This means: a destination group may have one rate, but this rate has many rate details (sub-rates). Each rate detail describes one interval of the call. If the first rate detail is RD1, the second is RD2, and so on, all calls can be expressed as RD1 + RD2 + .. + RDn. The number is finite. The rate detail can be seen as the time intervals for all call durations. The time interval could also be zero length. It is explained further below.

Each rate detail consists of the following parts:

  • FROM – from which second the rate detail starts.
  • DURATION – the length of this rate detail (interval).
  • TYPE - minute or event.
  • ROUND BY – in what intervals to round the time.
  • RATE – the price per minute in this rate interval.

The type 'minute' describes an interval that lasts some time. This time is billed by rate and rounded accordingly. An Interval starts at FROM and lasts for DURATION seconds. The type 'event' describes some kind of zero-length interval which we call EVENT. For example, it could be a connection fee. If the type is 'event', the rate detail has no DURATION (it's always zero) and ROUND BY fields.



NOTE: The same rules apply to Custom Rates for users.




Examples

Example #1

The call should have 0.2 connection fee (currency does not matter here) and all other time must be billed by 6 second intervals with rate 0.1 per minute.

Such rate should be described like this:

FROM DURATION TYPE ROUND BY RATE
1 0 event 0.2
1 minute 6 0.1


Example #2

The first 30 seconds of the call cost 0.1, the next time till 5 minutes is billed at rate 0.05 rounded by 30 seconds and remaining time is billed by rate 0.02 and rounded by 1 second.

FROM DURATION TYPE ROUND BY RATE
1 30 minute 30 0.2
31 300 minute 30 0.05
301 minute 1 0.01


Same example can be described like this also:

FROM DURATION TYPE ROUND BY RATE
1 0 event 0.1
1 30 minute 30 0
31 300 minute 30 0.05
301 minute 1 0.01


Example #3

The rate for call is 0.01 per minute rounded by 1s. The max price for call can be 0.1.


FROM DURATION TYPE ROUND BY RATE
1 600 minute 1 0.01
601 minute 1 0

Example #4

The rate for call is 0.01 per minute rounded by 1s. First 15 seconds of the call are not billed.


FROM DURATION TYPE ROUND BY RATE
1 15 minute 1 0
16 minute 1 0.01




Import from CSV file

It is not possible to import(upload) Advanced rates from CSV file directly.

Here is workaround:

  1. Create Wholesale Tariff
  2. Import Wholesale rates to just created Wholesale Tariff
  3. Transform Wholesale Tariff to Retail Tariff
  4. Delete Wholesale Tariff




See also