Difference between revisions of "Make Retail Tariff from Wholesale Tariff explained"
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
=Usage= | |||
--- | Make Retail Tariff from Wholesale Tariff go to '''SETTINGS –> Billing –> Tariffs''' and click on '''Make User Retail Tariff''' link for chosen Tariff. In opened window choose how Rate details have to be changed: | ||
Retail Tariff from Wholesale Tariff is done by the following algorithm: | <br><br> | ||
[[File:make_user_retail_tariff.png]] | |||
<br><br> | |||
* At least one of '''Add amount''' or '''Add percent''' must be specified. | |||
* '''Add Connection Fee amount''' and '''Add Connection Fee amount''' percent can be left empty. | |||
* '''Round by/Increment''' - this option control how '''Increment''' (which will be called '''Round by''' in Retail tariff) from wholesale tariff is caculated. | |||
** '''Largest from the Source:''' - Increment with highest value from the destination group will be selected. | |||
** '''Custom:''' - Enter custom value in seconds. | |||
<br><br> | |||
==Algorithm== | |||
Retail Tariff from Wholesale Tariff Rate calculation is done by the following algorithm: | |||
1. The highest Rate in Wholesale Tariff for Destinations in Destination Group (DG) is selected. | 1. The highest Rate in Wholesale Tariff for Destinations in Destination Group (DG) is selected. | ||
2. This | 2. This Rate is modified by adding a value or percentage to the price. | ||
<br><br> | |||
==== Example ==== | ==== Example ==== | ||
Line 18: | Line 31: | ||
Now, if we want to create a Retail Tariff by adding 0.005 to the Wholesale tariff, we will have a price for USA Destination Group = 0.035. | Now, if we want to create a Retail Tariff by adding 0.005 to the Wholesale tariff, we will have a price for USA Destination Group = 0.035. | ||
For example, the highest | For example, the highest Rate from Destinations is selected and modified. | ||
<br><br> | <br><br> | ||
= Inner mechanics = | == Inner mechanics == | ||
The | The Wholesale Tariff line will have these values: | ||
* connection_fee | * connection_fee | ||
Line 41: | Line 53: | ||
|- | |- | ||
|} | |} | ||
<br><br> | |||
= VIDEO: How to create Retail Tariff from CSV = | |||
<html> | |||
<iframe width="640" height="360" src="https://www.youtube.com/embed/KQYtpST0U9w" frameborder="0"></iframe> | |||
</html> | |||
<br><br> | |||
=See Also= | |||
* [[Entering Rates for Retail Tariff]] | |||
* [[Advanced Rates]] | |||
* [[Rate import from CSV]] |
Latest revision as of 07:35, 12 July 2022
Usage
Make Retail Tariff from Wholesale Tariff go to SETTINGS –> Billing –> Tariffs and click on Make User Retail Tariff link for chosen Tariff. In opened window choose how Rate details have to be changed:
- At least one of Add amount or Add percent must be specified.
- Add Connection Fee amount and Add Connection Fee amount percent can be left empty.
- Round by/Increment - this option control how Increment (which will be called Round by in Retail tariff) from wholesale tariff is caculated.
- Largest from the Source: - Increment with highest value from the destination group will be selected.
- Custom: - Enter custom value in seconds.
Algorithm
Retail Tariff from Wholesale Tariff Rate calculation is done by the following algorithm:
1. The highest Rate in Wholesale Tariff for Destinations in Destination Group (DG) is selected. 2. This Rate is modified by adding a value or percentage to the price.
Example
Imagine we have a Wholesale Tariff with the following rates for the USA:
- Prefix 1, rate 0.01.
- Prefix 12, rate 0.02.
- Prefix 123, rate 0.03.
And we have Destination Group USA with Destinations (1;12;123) in it.
Now, if we want to create a Retail Tariff by adding 0.005 to the Wholesale tariff, we will have a price for USA Destination Group = 0.035.
For example, the highest Rate from Destinations is selected and modified.
Inner mechanics
The Wholesale Tariff line will have these values:
- connection_fee
- min_time
- increment_s
When transforming to Retail, these Advanced Rates are created:
Based on which variable | FROM | DURATION | TYPE | ROUND BY | RATE | Comments |
connection_fee | 1 | event | connection_fee | This record is only created when connection_fee > 0. | ||
min_time | 1 | min_time | minute | min_time | rate | This record is only created when min_time > 0. |
increment_s | min_time + 1 | -1 (means 'infinity') | minute | increment_s | rate | This record is always created. |
VIDEO: How to create Retail Tariff from CSV