Datastore CTI Event Relay

Integrate Mindful Datastore with other applications using the CTI Event Relay.

Mindful Datastore is accessible on the Mindful platform and seamlessly integrates with the entire suite of Mindful cloud products. However, Datastore can also be used by other applications via the CTI Event Relay.

This guide covers the steps to download, install, configure, and troubleshoot the CTI Event Relay.

Download and Install

The first step is to download the CTI Event Relay installer and run it on the server that hosts your on-premise application (for example, Cisco UCCE).

Download the installer

  1. On the Data Set Templates page, click the Edit icon for any template.

    image of the data set templates page
  2. On the Edit Data Set Template page, click Add Template Data Key.

    You do not need to actually add a key, but the download link for the CTI Event Relay is in the modal window that appears.

  3. Click the link to download the CTI Event Relay.

    image of the download link

Install the CTI Event Relay

  1. Close all applications before launching the installer.

    This prevents the need to reboot the server if there are relevant system file updates that need to occur during setup.

  2. Launch the installer file on the server hosting your on-premise application.

    You may need to grant permissions for this trusted executable file to run.

  3. Configure the first page as follows:

    image of the installer
    • IP Address and Port — Enter the IP address and port for the server on which the CTI Event Relay is being installed.

    • API Token — Enter the API Token of the Data Set Template that will be used by the CTI Event Relay connection.

  4. On the next page, enter the Destination Folder (your chosen installation location).

  5. Click Install to complete the installation.

Configure the CTI Event Relay

After installation, update the CTI Event Relay configuration as needed in the appsettings.js file (located in the CTIEventRelay folder).

The appsettings.json file contains the configurable settings for the EventParser and CTIEventRelay components. Refer to the following table for definitions of appsettings.json parameters.

SettingDescription
switch_type

Sets the default root log path for log files

Currently only supports the value of TIALICM

local_ip_hostname

The IP or hostname of the server on which to start the Application Gateway

This should be the IP or hostname of the server that contains the CTIEventRelay in most cases.

local_portThe port on which the Application Gateway server will listen
datastore_urlURL to the data_sets API of the Datastore
api_tokenAPI token that correlates to the Datastore Data Set Template
log_levelControls the verbosity of the logger (5 by default)
log_pathSets the default root path for log files
Example JSON
{
    "switch_type": "TIALICM",
    "local_ip_hostname": "10.100.61.14",
    "local_port": 3000,
    "datastore_url": "https://api-ds.getmindful.com/api/v1/data_sets",
    "datastore_api_token": "KV+xz9REqgfGpvZK31VV6UGeq78Y9oYinGCRzlvWha4=",
    "log_level": 5,
    "log_path": "C:\\EventRelay\\Logs"
}
Note: If you are using a proxy server pointed to Mindful Datastore, assign the appropriate proxy URL to the datastore_url parameter.

Logging

Startup logging

On startup, the logs will be quiet until events start coming into the system, unless there was an issue loading the TIAL DLL or an issue starting the Application Gateway server.

Log messageLikely causeNotes
TIALWrapper::TIALWrapper|Failed to load DLL: TIAL_ICM.dllMindful Datastore failed to load the TIAL dll. N/A
TIALWrapper::TIALWrapper|Failed to load DLL:[dll name](presence of dll name)An issue occurred in locating the DLL.The switch_type was set correctly.
TIALWrapper::TIALWrapper|Failed to load DLL:(no dll name)The switch type was not set correctly. N/A
TIALWrapper::TIALWrapper|Failed to initialize AppGWServer with HostName 10.100.61.14 and Port 3000
  • Mindful Datastore failed to start the Application Gateway.
  • The hostname is not correct.
  • The port is not available.
N/A

Event processing

When an event enters the system, initial checks are made, and the event may be discarded as a result of missing fields or unexpected values.

Log messageLikely causeNotes
DS_GET:1234567890N/AWe expect the subtype to be either DS_GET or DS_POST. These values can be suffixed with the customer's contact number.
TIALWrapper::process_event|Failed TEPRM_SubType missingThe subtype field is missing.N/A
TIALWrapper::process_event|Failed invalid TEPRM_SubType: Some_Other_ValueThe subtype is neither DS_GET nor DS_POST.N/A
TIALWrapper::process_event|Failed|customer contact number not set
  • The subtype is not suffixed with the customer's contact number.
  • The calling line ID is not set with the customer's contact number.
We expect either the calling line ID to be set or the contact number to be suffixed onto the subtype. The contact number in the subtype takes precedence over the calling line ID if both are set.
TIALWrapper::process_event|Failed|could not create interaction IDThe router call key and router call day values are not available.The router call key and router call day are used to generate an interaction ID for the request.
TIALWrapper::process_post|Sending POST request for interaction ID = 153288|301N/ASend a POST request to Mindful Datastore.
TIALWrapper::process_get|Sending GET request for interaction ID = 153288|301N/ASend a GET request to Mindful Datastore.

Web requests to Mindful Datastore

Log messageLikely cause
GetHandler|Failed|interaction ID = 153288|301|Datastore URL = https://qa-datastore.vhtops.net/api/v1/data_sets|HTTP Response Code = 500Unsuccessful GET request to Mindful Datastore.
PostHandler|Failed|interaction ID = 153288|301|Datastore URL = https://qa-datastore.vhtops.net/api/v1/data_sets|HTTP Response Code = 500Unsuccessful POST request to Mindful Datastore.
GetHandler|Exception|interaction ID = 153288|301|Datastore URL = not://a.valid-uriGetHandler Exception occurred: URI is not valid or network connectivity issue
PostHandler|Exception|interaction ID = 153288|301|Datastore URL = not://a.valid-uriPostHandler Exception occurred: URI is not valid or network connectivity issue

Data Keys

Call variables

Up to 10 call variables are supported. The expected key names are as follows:

call_variable1, call_variable2, call_variable3, call_variable4, call_variable5, call_variable6, call_variable7, call_variable8, call_variable9, call_variable10

Call context collection

The expected key name is:
call_context_collection