Difference between revisions of "M4 DIDs Import from CSV"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 93: Line 93:
The ''Analysis'' step checks if the DIDs provided in a CSV file are valid.
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.
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  
Please note that CSV header (if present) will allways be displayed as invalid DID
<br><br>
<br><br>
[[File:m4_did_import4.png]]<br>
[[File:m4_did_import4.png]]<br>


=Import (Step 5)=
=Import (Step 5)=
After pressing the '''Import''' button in the [[DID_Import_from_CSV#Analysis_.28Step_4.29|''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).
After pressing the '''Import''' button in the [[M4_DIDs_Import_from_CSV#Analysis_.28Step_4.29|''Analysis'']] step the system creates DIDs with configuration from CSV file. If CSV file contains valid customer value, created DIDs will be see to '''Active''' status, otherwise DIDs will be set to '''Free''' status. After this step GUI will display DIDs Inventory page which will contain new created DIDs.


=See Also=
=See Also=
*[[M4 DID Management]]
*[[M4 DID Management]]

Revision as of 14:58, 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 - id of Buying Pricing Group in M4 DB,
  • Selling Pricing Group - id of 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

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

CSV file example with forward to external number

did, vendor, customer, buying_pricing_group, selling_pricing_group, forward_to, forward_external_number
37068311111, 3, 2, 1, 1, 2, 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 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.
  • 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 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. 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 CSV header (if present) will allways be displayed as 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 CSV file contains valid customer value, created DIDs will be see to Active status, otherwise DIDs will be set to Free status. After this step GUI will display DIDs Inventory page which will contain new created DIDs.

See Also