M4 DIDs Import from CSV

From Kolmisoft Wiki
Jump to navigationJump to search

FUNCTIONALITY IS IN THE DEVELOPMENT STAGE



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,

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

  • Vendor - Vendor (M4 User) ID in M4 DB,
  • Buying Pricing Group - ID of Buying Pricing Group in M4 DB,
  • Selling Pricing Group - ID of Selling Pricing Group in M4 DB.
  • Recommended Charge Plan - ID of Recommended Charge Plan in M4 DB.
  • Customer - ID of the user in M4.
  • Forward to - require special values specifying 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 specifying 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 - requires special values, which specify the 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.
  • Header Transformation Group - ID of the Header Transformation Group.


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

37068311111

Yes, one DID number is enough to import it.



CSV file example with forward to the external number

did, vendor, customer, buying_pricing_group, selling_pricing_group, forward_to, forward_connection_point, forward_external_number
37068311111, 3, 2, 1, 1, 2, 11, 1234567



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 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.
  • The values of Forward to, Failover1 and Failover2 explained in File Format section.


M4 did import2.png



Column confirmation (Step 3)

The Column confirmation step is dedicated to reviewing 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. To see complete information, please use horizontal scrolling.
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 the CSV header (if present) will always be displayed as an invalid DID.

M4 did import4.png



Import (Step 5)

After pressing the Import button in the Analysis step the system creates DIDs with configuration from CSV file. If the CSV file contains valid customer value, created DIDs will be seen to Active status, otherwise, DIDs will be set to Free status. After this step, GUI will display the DIDs Inventory page which will contain newly created DIDs.



See also