Difference between revisions of "CDR Rerating"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Description =  
= Description =  


This function is used when you change Tariff for some customer and you want to recalculate Price for his Calls in the past. You need to select User, Period and system recalculates all Prices for all Calls in selected period for selected User. It affects balance of User and statistics will show information with new Prices.
This function is used when you change Tariff/Rate for some customer and you want to recalculate price for his Calls in the past. You need to select User, Period and system recalculates all prices for all Calls in selected period for selected User. It affects balance of User and statistics will show information with new prices.
<br><br>
<br><br>
=Usage=
=Usage=


Go to '''SETTINGS –> Billing –> CDR –> Rerating''':
Go to '''SETTINGS –> Billing –> CDR –> Rerating''':
<br><br>
[[Image:cdrrerating_image1.png]]
<br><br>
Select date interval and User whose Calls you want to rerate. You can select All Users and include calls of Reseller Users.


  <!---This functionality is available from MOR X5--->
[[File:Mor_rerating_filters.png]]
 
Select date interval and User (or multiple Users) whose Calls you want to rerate. You can select All Users and include calls of Reseller Users.
 
Also you are able to set '''Ghost Time''' percent, this value will increase user_billsec and/or reseller_billsec and price which depends on changed user_billsec and/or reseller_billsec. Ghost Time will be calculated just from initial billsec, and if you will rerate two times with same percentage value, on second time nothing will change. 0 leaves or returns initial user_billsec and/or reseller price. By default Ghost Time is applied '''before''' Tariff rounding. If you need to apply Ghost Time on top of Tariff rounding, add additional setting in /etc/mor/system.conf:
 
rerating_apply_ghost_time_after_rounding = 1


Also you are able su set '''Ghost Time''' percent, this value will increase user_billsec and/or reseller_billsec and price which depends on changed user_billsec and/or reseller_billsec. Ghost Time will be calculated just from initial billsec,  and if you will rerate two timesr with same percentage value, on second time nothing will change. 0 leaves or returns initial user_billsec and/or reseller price.
<br>
<br> <br>
Table below will show which data of Calls will be affected according each selection scenario.
Table below will show which data of Calls will be affected according each selection scenario.
<br>
<br>
Line 45: Line 46:
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+  
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(just for Reseller User Calls)
|}
|}
'''NOTE''' If in Call of Reseller User will be used one of [[Common Use Providers]] Tariff to rerate Reseller Price will be taken form ADDONS -> Resellers -> Common use Providers. If in Call of Reseller User will be used one of Provider which belongs just to Reseller, Provider Price will be rerated by that Provider tariff.
'''NOTE''' If in Call of Reseller User will be used one of [[Common Use Providers]] Tariff to rerate Reseller Price will be taken form ADDONS -> Resellers -> Common use Providers. If in Call of Reseller User will be used one of Provider which belongs just to Reseller, Provider Price will be rerated by that Provider tariff.
<br> <br><!---Nuo x6 lieka tik FAST rerating ir test mode--->
<br> <br><!---Nuo x6 lieka tik FAST rerating ir test mode--->  
* Press '''Rerate in Background(FAST)''' if you want to send Rerating task to [[Background Tasks]]. This way rerating of huge amount of Calls goes faster than SLOW method and also you do not need to wait in current page till rerating will be finished. '''Also Provider Billing details will be rerated'''
 
<!---SLOW rerating tik iki x5--->
* Press '''Rerate in GUI(SLOW)'''. The rating mechanism is the same as in MOR application but here rating is done by GUI. '''Be patient – if there are many calls – it can take some time to rerate all of them'''. '''Provider Billing details will NOT be rerated.''' If you choose this way for Rerating you will be redirected to second step:
<br><br>
[[Image:cdrrerating2.png]]
<br><br>
Here you see call stats for selected date interval. When you are sure everything is correct – press '''Rerate''':
<br><br>
[[Image:cdrrerating3.png]]
<br><br>
Here you will see the Difference after Rerating.
<br><br>
== Rerate all users ==  
== Rerate all users ==  
<!---This functionality is available from MOR 11--->
<!---This functionality is available from MOR 11--->


Select 'All Users' from User selection to rerate all Users at once in selected period.
Select 'All Users' from User selection to rerate all Users at once in selected period.
<br><br>
== Testing mode ==
Select '''Tariff for User''' below '''TESTING MODE''' header:
<br><br>
[[Image:cdrtestrerating.png]]
<br><br>
...and press '''Test with selected Tariff (SLOW)''' to check differences of Rates for selected User. This way Rerating will not save changes to Calls/Users.
Testing mode is useful for testing "What if User had this Tariff" scenarios.
<br><br>
'''Selected Tariff is used just in [[Image:icon_test.png]]Testing mode.''' Rerating functionality rerates old Calls by Tariff set in User Settings, if you did not change Tariff for User, after rerating Calls Prices will be same as were before.
<br><br>
<br><br>
== Tariff from Localization ==
== Tariff from Localization ==


If call's prefix is in Localization Rule which has some Tariff, this Tariff is used to count call's price instead of User's Tariff.
If call's prefix is in Localization Rule which has some Tariff, this Tariff is used to count call's price instead of User's Tariff.
<br><br>
However, '''localized''' destinations are used for the Rerating.
<br><br> '''Example:'''
<br>
1) User dialled 001137067012345. Localization rule was applied:
'''Cut:''' 0011, '''Add:''' , '''Change Tariff to:''' Tariff B.
So this call to 001137067012345 was billed according to Tariff B rates. Localized destination number 37067012345 was saved to the database.
Now when you are rerating, destination number 37067012345 is taken. The rule to cut 0011 and change tariff cannot be applied here.
2) User dials 37067012345. Localization rule was applied:
'''Cut:''' 3706, '''3706''' , '''Change Tariff to:''' Tariff B.
This call to 37067012345 was billed according to Tariff B rates. Since the destination number is not changed, Localization rules will be applied to number 37067012345 and Tariff B will be used when rerating.


<br><br>
<br><br>
Line 107: Line 68:


* Re-rate will take Active Rate when Rates with [[Rate Effective From | Effective From]] are re-rated.
* Re-rate will take Active Rate when Rates with [[Rate Effective From | Effective From]] are re-rated.
* Min duration, Increment and Connection Fee are also changed during Re-rating. Admin still see original duration. Rounded duration is visible under User account.
* Provider Billing details will be rerated.

Latest revision as of 11:34, 8 February 2024

Description

This function is used when you change Tariff/Rate for some customer and you want to recalculate price for his Calls in the past. You need to select User, Period and system recalculates all prices for all Calls in selected period for selected User. It affects balance of User and statistics will show information with new prices.

Usage

Go to SETTINGS –> Billing –> CDR –> Rerating:

Mor rerating filters.png

Select date interval and User (or multiple Users) whose Calls you want to rerate. You can select All Users and include calls of Reseller Users.

Also you are able to set Ghost Time percent, this value will increase user_billsec and/or reseller_billsec and price which depends on changed user_billsec and/or reseller_billsec. Ghost Time will be calculated just from initial billsec, and if you will rerate two times with same percentage value, on second time nothing will change. 0 leaves or returns initial user_billsec and/or reseller price. By default Ghost Time is applied before Tariff rounding. If you need to apply Ghost Time on top of Tariff rounding, add additional setting in /etc/mor/system.conf:

rerating_apply_ghost_time_after_rounding = 1


Table below will show which data of Calls will be affected according each selection scenario.

One of Admin Users One of Admin Resellers                 All Users                 One of particular Reseller Users All Users (Reseller Users Included)
user_billsec,

user_rate, user_price

                +                 -                 +

   (just for Admin Users Calls)

                +                 +
reseller_billsec,

reseller_rate, reseller_price

                -                 +

 (for Calls of All Reseller Users)

                +                 -                 +

NOTE If in Call of Reseller User will be used one of Common Use Providers Tariff to rerate Reseller Price will be taken form ADDONS -> Resellers -> Common use Providers. If in Call of Reseller User will be used one of Provider which belongs just to Reseller, Provider Price will be rerated by that Provider tariff.

Rerate all users

Select 'All Users' from User selection to rerate all Users at once in selected period.

Tariff from Localization

If call's prefix is in Localization Rule which has some Tariff, this Tariff is used to count call's price instead of User's Tariff.



Other notes

  • Re-rate does not take into account Flat Rates and User will be charged for such Calls. Do not do rerating for such User.
  • Re-rate does not work when call's DID, LCR or Owner Device is changed by Localization rules.
  • Min duration, Increment and Connection Fee are also changed during Re-rating. Admin still see original duration. Rounded duration is visible under User account.
  • Provider Billing details will be rerated.