Difference between revisions of "M4 DIDs Import from CSV"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 6: Line 6:
<br><br>
<br><br>
The procedure is completed within the six following steps:
The procedure is completed within the six following steps:
# File upload;
# File upload,
# Separator selection (skipped when separators determined automatically match the system configuration);
# Separator selection (skipped when separators determined automatically match the system configuration),
# Column assignment;
# Column assignment,
# Column confirmation;
# Column confirmation,
# Analysis;
# Analysis.
# Import.
# Import.
'''Note:''' each step is covered in more detail below.
'''Note:''' each step is covered in more detail below.
Line 16: Line 16:


=File upload (Step 0)=
=File upload (Step 0)=
Clicking in IMPORT page open new page where we can select a CSV file to upload
Clicking on a IMPORT button opens a new page where we can select a CSV file to upload
<br><br>
<br><br>
[[File:m4_did_import0.png]]
[[File:m4_did_import0.png]]
Line 33: Line 33:


'''Required columns''' in a CSV file:
'''Required columns''' in a CSV file:
* DID - DID Number we want to import,
* '''DID''' - DID Number we want to import,
* Vendor - Vendor (M4 User) id in M4 DB,
* '''Vendor''' - Vendor (M4 User) id in M4 DB,
* Buying Pricing Group - Buying Pricing Group id in M4 DB,
* '''Buying''' Pricing Group - Buying Pricing Group id in M4 DB,
* Selling Pricing Group - Selling Pricing Group in M4 DB.
* '''Selling''' Pricing Group - Selling Pricing Group in M4 DB.


All other columns are optional (complete options are visible in the screenshot on Step 2). Optional fields which require id from M4 DB are:
All other columns are optional (complete options are visible in the screenshot on Step 2). Optional fields which require id from M4 DB are:
* Customer (id of the user in M4)
* '''Customer''' - id of the user in M4.
* Forward - require special values, which specify forward type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
* '''Forward to''' - require special values, which specify forward type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
** Forward Connection Point (id of connection point)
** '''Forward Connection Point''' - id of Connection Point in M4 which will be used for forwarding.
** Forward DID (id of DID in M4)
** '''Forward DID''' id of DID in M4.
* Failover 1 - require special values, which specify failover 1 type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
* '''Failover1''' - require special values, which specify failover 1 type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
** Failover1 Connection Point
** '''Failover1 Connection Point''' - id of Connection Point in M4 which will be used for Failover1.
** Failover1 DID (id of DID in M4)
** '''Failover1 DID''' - id of DID in M4.
* Failover2 Connection Point - require special values, which specify failover 2 type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
* '''Failover2 Connection Point''' - require special values, which specify failover 2 type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
** Failover2 Connection Point
** '''Failover2 Connection Point''' - id of Connection Point in M4 which will be used for Failover2
** Failover2 DID (id of DID in M4)
** '''Failover2 DID''' (id of DID in M4)
 
<br>
CSV header in CSV file can have any name, but it is best to use descriptive names as these header names will be used during the assignment used below.
CSV header in CSV file can have any name, but it is best to use descriptive names as these header names will be used during the assignment used below.


<br><br>
<br><br>
'''Minimal valid CSV file example''' (Vendor, Buying Pricing Group, Selling Pricing Group must exist in M4 with IDs from the file)
'''Minimal valid CSV file example''' (Vendor, Buying Pricing Group, Selling Pricing Group must exist in M4 with IDs from the file)
did, vendor, buying_pricing_group, selling_pricing_group
 
37068311111, 2, 1, 1
did, vendor, buying_pricing_group, selling_pricing_group
37068311111, 2, 1, 1


=Separator selection (Step 1)=
=Separator selection (Step 1)=
Line 62: Line 63:
<br>
<br>
=Column assignment (Step 2)=
=Column assignment (Step 2)=
After determining the [[DID_Import_from_CSV#Separator_selection_.28Step_1.29|Separators]], CSV file columns must be assigned to DID attributes.<br>
After determining the [[M4_DIDs_Import_from_CSV#Separator_selection_.28Step_1.29|Separators]], CSV file columns must be assigned to DID attributes.<br>
* In the ''assignment'' table it is necessary to map DID attirubtes in a '''Value''' column to CSV columns in a '''Select from CSV file''' column;
* In the ''assignment'' table it is necessary to map DID attirubtes in a '''Value''' column to CSV columns in a '''Select from CSV file''' column;
* If a column is missing in the CSV file it is possible to manually enter some value in the '''Enter manually''' column. This value will be applied to all DIDs that are being imported;
* If a column is missing in the CSV file it is possible to manually enter some value in the '''Enter manually''' column. This value will be applied to all DIDs that are being imported;

Revision as of 14:40, 22 March 2022

Description

M4 DIDs Import from CSV functionality allows creating DIDs by uploading a valid CSV file with necessary information. DIDs import accessible from DIDs Inventory page

DIDs import menu.png

The procedure is completed within the six following steps:

  1. File upload,
  2. Separator selection (skipped when separators determined automatically match the system configuration),
  3. Column assignment,
  4. Column confirmation,
  5. Analysis.
  6. Import.

Note: each step is covered in more detail below.


File upload (Step 0)

Clicking on a IMPORT button opens a new page where we can select a CSV file to upload

M4 did import0.png

File format

A valid file used in a DID import must be in a CSV format (Comma Separated Values).
A CSV Column Separator and a Decimal Separator must be set correctly in MAINTENANCE -> Settings CSV section:

  • CSV Column Separator,
  • CSV Decimal Separator.

CSV Columns could and sometimes should be enclosed within quotation marks ("). Possible closure cases:

  • CSV column values include a CSV Column Separator.

Note: quotation marks within closures must be escpaed correctly in order for columns to be read as expected (eg. "test value\"escaped\"").

Required columns in a CSV file:

  • DID - DID Number we want to import,
  • Vendor - Vendor (M4 User) id in M4 DB,
  • Buying Pricing Group - Buying Pricing Group id in M4 DB,
  • Selling Pricing Group - Selling Pricing Group in M4 DB.

All other columns are optional (complete options are visible in the screenshot on Step 2). Optional fields which require id from M4 DB are:

  • Customer - id of the user in M4.
  • Forward to - require special values, which specify forward type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
    • Forward Connection Point - id of Connection Point in M4 which will be used for forwarding.
    • Forward DID id of DID in M4.
  • Failover1 - require special values, which specify failover 1 type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
    • Failover1 Connection Point - id of Connection Point in M4 which will be used for Failover1.
    • Failover1 DID - id of DID in M4.
  • Failover2 Connection Point - require special values, which specify failover 2 type. (0 - disabled, 1 - Connection Point, 2 - External Number, 3 - DID number). Depending on the selected value, these values with IDs might be required.
    • Failover2 Connection Point - id of Connection Point in M4 which will be used for Failover2
    • Failover2 DID (id of DID in M4)


CSV header in CSV file can have any name, but it is best to use descriptive names as these header names will be used during the assignment used below.



Minimal valid CSV file example (Vendor, Buying Pricing Group, Selling Pricing Group must exist in M4 with IDs from the file)

did, vendor, buying_pricing_group, selling_pricing_group
37068311111, 2, 1, 1

Separator selection (Step 1)

When separators predicted by the system do not match the configuration, the Separator selection step is necessary.

M4 did import1.png

Column assignment (Step 2)

After determining the Separators, CSV file columns must be assigned to DID attributes.

  • In the assignment table it is necessary to map DID attirubtes in a Value column to CSV columns in a Select from CSV file column;
  • If a column is missing in the CSV file it is possible to manually enter some value in the Enter manually column. This value will be applied to all DIDs that are being imported;
  • The Default column indicates default attribute values in the Database.

The page in this step also shows the first five lines of a CSV file in order to help with column assignment.

Notes:

  • An asterisk (*) indicates the mandatory fields.
  • It is often practical to dedicate the first CSV file line to be a header and name the columns according to the Value column values. In this case columns will be assigned automatically (case is not relevant, spaces can be replaced with underscores (_));
  • The order of priority when assigning values to DIDs is the following: CSV column > Manual value > Default value.


M4 did import2.png

Column confirmation (Step 3)

The Column confirmation step is dedicated to review the Column assignment results. Assignment mistakes might be corrected by using the Back button. When satisfied with the result, Confirm columns button should be pressed in order to go to the next step.
Notes:

  • When the manual value is selected for a column this value is shown in this step as well;



M4 did import3.png

Analysis (Step 4)

The Analysis step checks if the DIDs provided in a CSV file are valid. The example analysis summary is provided in a screenshot below. By clicking on (Press here to get the list) link it is possible to view invalid DID information. Please note that CSV header (if present) will allways be displayed as

M4 did import4.png

Import (Step 5)

After pressing the Import button in the Analysis step the system creates DIDs with DID Rates (when imported) and assigns them to the User performing the DID import (in case of Accountants the DIDs are assigned to the System Admin).

See Also