Contacts

Synchronize phone numbers

The entries in the desired phone book can be synchronized with the entries in the CSV file. The basic information for synchronization is a list of phone numbers or e-mail addresses.

Performing synchronization

  1. Create a CSV file with data to be synchronized.

    The file must contain one key column that is required and then other optional columns. The separating character can be a semicolon or comma.

    • The key column can be any of the following:

      Column name

      Value (described in detail in the following table)

      Emails

      PN = e-mail address

      Numbers

      PN = telephone number

      Rank

      the order of record processing

    • Optional columns can contain the following values:

      Column name

      Data type

      Description (Valid data values are given below)

      BlockMarketingUsage

      bool

      Block marketing usage

      Culture

      string

      A culture in the format specified in the Language table – e.g. en

      Emails

      string

      E-mail address

      ExcludeFromLookup

      bool

      Exclusion from looking up in lists; indicates that this number should not be considered when looking up a PhoneNumber and contact for the communication being established (IC/OC/M/CH); value true – the number should not be considered during the look-up; value false – the number can be used in the look-up function.

      GdprIdentity

      bool

      A telephone number is used to determine a person’s identity in terms of GDPR.

      LanguageId

      string

      guid – The language of the contact number

      Numbers

      string

      Phone number

      Rank

      int

      The order in which numbers and e-mails will be processed; the values do not have to be in sequence or unique;

      WaitingOffset

      int

      Preferential (+) or penalty (-) time of calls within the project; unit of measure – second; NULL means 0;

      Description

      string

      Description, identification of the number / e-mail type

      DisplayName

      string

      Name, service name

      TechnicalId

      string

      Technical address in chat

    • Example of a csv file

      Numbers;BlockMarketingUsage;Culture;Emails;ExcludeFromLookup;GdprIdentity;LanguageId;Rank;WaitingOffset;Description;DisplayName;TechnicalId
      736961364;Yes;en;JohnDoe@hotmail.com;No;true;E358EC45-86D3-4DD7-90F5-2FD32BA714BF;3;8;SomeDesc;JohnDoe;secretpassword
      
  2. Synchronize now

    1. In the administration, open the Contacts ‣ Phone numbers ‣ Phone number synchronization menu item.

    2. Click on the New phone book sync button and enter the following values in the form:

      • Synchronized phone book – Select the name of the list to be updated.

      • Synchronization key – From the drop-down menu, choose which column is key for the synchronization – E-mail, Numbers or Rank.

      • Separating character – Enter the character that you used as a separating character in the csv file – a semicolon or comma.

      • Default order – If the file does not contain the Rank column with values and the key column is not Rank, then the Rank column of the given phone book in the database will be used to add values of an ascending series of numbers starting at this value that you specify; this value is required, otherwise you cannot continue.

      • Default block marketing usage`and :guilabel:`Default exclusion from list look-up – These settings will be used if the corresponding columns BlockMarketingUsage and ExcludeFromLookup in the file do not contain the required values.

      • File path – Click on the Select file button, look up and select a file on your computer.

    3. Click on Synchronize to start synchronization.

    4. Below the table, you will see a notification that the request was successfully created and that the file was processed in the background

    5. Click on the link Show sync progress in the bottom section to display a synchronization result form.

      The following buttons offer you the options described below:

      • Cancel synchronization if it is still in progress – This will terminate the synchronization and all changes made so far will remain in the new state.

      • Delete synchronization

      • Update the displayed synchronization result report if the batch is large.

      • Download File with defective records – If synchronization errors occurred; the file contains error descriptions.

  3. ServiceBulk performs the following steps:

    1. Check if the CSV file contains a key column.

    2. Sets the value of the iCC.PhoneNumber.Synchronized column to false for all database phone book entries.

    3. It scans the CSV file line by line and checks the validity of data in columns – see the Valid data values table.

      • If the row in the file is correct, all records in the iCC.PhoneNumber table are looked up and processed in the next step that have the following properties:

        • They are not of the template type

        • They belong to the required phone book

        • They correspond to the value in the key column.

      • If a row in the file is marked as incorrect, it is skipped and the error is written to the defect file, which can be downloaded from the administration after the synchronization is completed.

    4. The values in the key column with records in the file are compared with the records in the PhoneNumber table in the database.

      • If the PhoneNumber does not exist in the database, a new record is created according to the data from the csv file; the iCC.PhoneNumber.Synchronized column value is set to true.

      • If there is exactly one record, the data is updated according to the file; the iCC.PhoneNumber.Synchronized column value is set to true.

      • If there are multiple records, only the first record found is updated according to the key column defined, the other ones are marked for deletion; the iCC.PhoneNumber.Synchronized column value is set to true; if the column value is deleted = true, it is set to false; for other record occurrences, deleted will be set to true.

    5. Checks values in optional record columns in a csv file.

      • If a value in the BlockMarketingUsage column is missing, the default value defined in administration when defining synchronization is used.

      • If the value in the ExcludeFromLookup column is missing, the default value will be used as defined in the administration during synchronization definition.

      • If the value in the Rank column is missing, the default value will be used as defined in the administration during synchronization definition, or 0.

      • If the value in the GdprIdentity column is missing, then true will be used if a telephone number is used to determine the person’s identity in terms of GDPR (set by the GdprIdentityEntity parameter in the configuration).

    6. At the end of synchronization, the service sets the value of the iCC.PhoneNumber.Deleted column to true for all phonebook records that have iCC.PhoneNumber.Synchronized = false; therefore, it marks as deleted all phone numbers that were in the database but are no longer in the csv file.

Permissions

  • If you have the ImportPhoneNumber right at least at AllowWrite, you can perform synchronization.

  • If you have the ImportPhoneNumber right at least at AllowRead, you can download the file with defective records.

Valid data values

Data type

Possible values

Validity check result

bool

  • empty value

    • true / True / 1

    • English Yes according to the LiteralLookup table – Group 80 (Bool) / localized Yes according to the LiteralLookup table – Group 80 (Bool)

      Caution

      • It must match the culture set in the DefaultCulture parameter in the configuration (Configuration ‣ System)!

      • If the culture is changed in the parameter, the ServiceBulk service must be restarted!

    • false / False / 0

    • English No / localized No

      Caution

      • It must match the culture set in the DefaultCulture parameter in the configuration (Configuration ‣ System)!

      • If the culture is changed in the parameter, the ServiceBulk service must be restarted!

If the text does not match any of the specified Yes / No values, the row is marked as incorrect.

int

  • empty value

  • parsable number

If the number cannot be parsed, the row is marked as incorrect.

string – a phone number

  • empty value

  • A valid phone number according to the numbering plan.

If the phone number is not valid, the row is marked as incorrect.

string – e-mail address

  • empty value

  • A valid email address.

If the e-mail address is not valid, the row is marked as incorrect.

string – culture

One of the values in the iCC.Language.Culture column

  • Culture is used to determine LanguageId; if the CSV file contains both columns – Culture and LanguageId, the one more on the right in the CSV file will be used.

  • If neither value is specified, the row is marked as incorrect.

string – GUID

One of the values in the iCC.Language.LanguageId column.

  • The GUID is used to detect LanguageId; if the CSV file contains both columns – Culture and LanguageId, the one more on the right in the CSV file will be used.

  • If neither value is specified, the row is marked as incorrect.

Creating a phone number (PN) and opening the editor using a URL

By calling a URL address, it is possible to create a “phone number” (PN) record (an entry in the PhoneNumber table) and, at the same time, open the phone number editor on the just created record.

If you call the URL http://frontstage/reactclient/pages/PhoneNumberEditor.html (fill in frontstage and reactclient according to your installation), an empty phone number will be created and its editor will open.

In addition, it is possible to use several query string parameters after the URL, corresponding to the columns of the newly created phone number. None of the parameters is mandatory. Available parameters:

Parameter

Description

PhoneBookId

An ID of the telephone directory to which the newly created phone number is to be added.

ContactId

An ID of the contact to which the phone number belongs (PhoneNumber.ContactId).

Number

A valid phone number according to the numbering plan.

PhoneNumberName

A name of the new record.

Email

An e-mail of the new record.

TechnicalAddress

A technical address (similar to a phone number for chat). It will become TechnicalId of the chat.