Difference between revisions of "Rate import from CSV"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
= Description =
It's very tedious work to add several thousands rates by hand so you can import them from CSV file.
There‟re 7 steps for importing rates from CSV file:
# File upload
# Column assignment
# Column confirmation
# Analysis
# Creating destinations
# Updating rates
# Creating new rates
We will cover each of them one by one.
'''IMPORTANT NOTE: When importing - prefixes should be in E.164 format!!! E.g. no international prefixes!'''
== 1. File upload ==
Select [[Image:excel.png]] '''Import from CSV''' for the Tariff you want to import rates.
Then press on '''Browse''' and select CSV file with rates. Press '''Upload file''':
[[Image:Example.jpg]]
== 2. Column assignment ==
File is uploaded and 5 first line of this file is available to check:
[[Image:Example.jpg]]
This helps us in next step, to assign CSV file‟s columns to MOR‟s variables. We have following window:
[[Image:Example.jpg]]
Here we must to assign columns from CSV file. '''Prefix''' and '''Rate''' are mandatory fields. All other fields can be empty.
'''
Connection Fee''', '''Increment''' and '''Min. Time''' have their defaults, if you want, you can enter manually values for them. Manually entered values have highest priority. If you omit them, then MOR insert values from CSV file, if there‟re no assigned column for these fields, then default values will be added to database (DB).
There are group of values under name '''USA specifics'''. These are only for USA/Canada. Users from these countries need to use these fields with their CSV files.
In the following example we selected fields which match our CSV file. Also entered some manual values for '''Increment''' and '''Min.Time'''. We will count time by 30s increments and minimum time for the call will be 60s with these settings:
[[Image:Example.jpg]]
Such way of selecting CSV rows and assigning them to MOR values lets us import various CSV file formats.
== 3. Column confirmation ==
Next step is to review our selection and confirm if everything is correct. We can go Back or forward to the next step:
[[Image:Example.jpg]]
== 4. Analysis ==
It will take some time to accomplish this step. Now MOR is checking a lot of things from DB and CSV files: comparing rates, searching for duplicates, fixing small errors and so on. We get something like this after analysis is completed:
The most interesting line is '''3 bad destination(s)'''. We press on the List to check them. In the new window we can see which destinations are bad and we can decide what to do with them. Possible that there are no directions for them, MOR can‟t know to which country to assign this destination or maybe these destinations have duplicates in CSV file? You have to fix this if you want to import whole file. Here you can stop and fix your CSV file or you can ignore these errors and continue.
We will continue due to demo purposes pressing on '''Proceed'''.
Following steps are separated to divide big processing power if rate file is huge. It allows browser not to crash and successfully import 160.000+ destinations from one CSV file. (Tested).
== 5. Creating destinations ==
MOR creates new destinations here. These destinations are necessary for the rates which will be added in step 7. This window is just informative, no decisions here:
== 6. Updating rates ==
Here MOR updates rates with the values from CSV files. These rates already exist in DB. Just press '''Proceed''':
== 7. Creating new rates ==
Finally MOR creates all rates and we are all done!
== NOTES ==
If there‟re a lot of rates please be patient and let MOR finish its job. Sometimes it gets some time to count everything and come back to life. At the moments it could seem that browser is not responding – that‟s not true – it just works very hard importing your very own rates from CSV file. If you get timeout error – try to import file in smaller pieces.
= Example Videos =
<flashow>http://wiki.kolmisoft.com/videos/rates_import_from_csv.swf|width=600|height=455</flashow>
<flashow>http://wiki.kolmisoft.com/videos/rates_import_from_csv.swf|width=600|height=455</flashow>



Revision as of 12:38, 8 May 2009

Description

It's very tedious work to add several thousands rates by hand so you can import them from CSV file.

There‟re 7 steps for importing rates from CSV file:

  1. File upload
  2. Column assignment
  3. Column confirmation
  4. Analysis
  5. Creating destinations
  6. Updating rates
  7. Creating new rates

We will cover each of them one by one.

IMPORTANT NOTE: When importing - prefixes should be in E.164 format!!! E.g. no international prefixes!

1. File upload

Select Excel.png Import from CSV for the Tariff you want to import rates.

Then press on Browse and select CSV file with rates. Press Upload file:

File:Example.jpg


2. Column assignment

File is uploaded and 5 first line of this file is available to check:

File:Example.jpg

This helps us in next step, to assign CSV file‟s columns to MOR‟s variables. We have following window:

File:Example.jpg

Here we must to assign columns from CSV file. Prefix and Rate are mandatory fields. All other fields can be empty. Connection Fee, Increment and Min. Time have their defaults, if you want, you can enter manually values for them. Manually entered values have highest priority. If you omit them, then MOR insert values from CSV file, if there‟re no assigned column for these fields, then default values will be added to database (DB).

There are group of values under name USA specifics. These are only for USA/Canada. Users from these countries need to use these fields with their CSV files.

In the following example we selected fields which match our CSV file. Also entered some manual values for Increment and Min.Time. We will count time by 30s increments and minimum time for the call will be 60s with these settings:

File:Example.jpg

Such way of selecting CSV rows and assigning them to MOR values lets us import various CSV file formats.


3. Column confirmation

Next step is to review our selection and confirm if everything is correct. We can go Back or forward to the next step:

File:Example.jpg


4. Analysis

It will take some time to accomplish this step. Now MOR is checking a lot of things from DB and CSV files: comparing rates, searching for duplicates, fixing small errors and so on. We get something like this after analysis is completed:

The most interesting line is 3 bad destination(s). We press on the List to check them. In the new window we can see which destinations are bad and we can decide what to do with them. Possible that there are no directions for them, MOR can‟t know to which country to assign this destination or maybe these destinations have duplicates in CSV file? You have to fix this if you want to import whole file. Here you can stop and fix your CSV file or you can ignore these errors and continue.

We will continue due to demo purposes pressing on Proceed.

Following steps are separated to divide big processing power if rate file is huge. It allows browser not to crash and successfully import 160.000+ destinations from one CSV file. (Tested).


5. Creating destinations

MOR creates new destinations here. These destinations are necessary for the rates which will be added in step 7. This window is just informative, no decisions here:


6. Updating rates

Here MOR updates rates with the values from CSV files. These rates already exist in DB. Just press Proceed:


7. Creating new rates

Finally MOR creates all rates and we are all done!

NOTES

If there‟re a lot of rates please be patient and let MOR finish its job. Sometimes it gets some time to count everything and come back to life. At the moments it could seem that browser is not responding – that‟s not true – it just works very hard importing your very own rates from CSV file. If you get timeout error – try to import file in smaller pieces.


Example Videos

<flashow>http://wiki.kolmisoft.com/videos/rates_import_from_csv.swf%7Cwidth=600%7Cheight=455</flashow>


Similar video with different tariff:

<flashow>http://wiki.kolmisoft.com/videos/tariff_import_from_csv.swf%7Cwidth=800%7Cheight=618</flashow>