The Contact History (CH) Streaming Agent enables users to stream CI360 events into an on-premise database in real time enabling users to immediately sync both the online and offline customer contact history. CH events are received by the agent, then messages are parsed and then written into the target table in the on-premise database.
-
Java 17 or newer (java-17-openjdk)
-
Apache Maven 3.9.6 or newer (apache-maven-3.9.6-bin.tar.gz)
-
mkt-agent-sdk
-
Connectivity between the on-premise database, agent server and CI360
-
Access Point & gateway Host for SAS Customer Intelligence 360
- From the user interface, navigate to General Settings > External Access > Access Points
- Create a new access point if one does not exist
- Get the following information from the access point:
External gateway host: extapigwservice-/marketingGateway
Access Point Name: CH Agent
Tenant ID: abc123-ci360-tenant-id-xyz (sample) Client secret: ABC123ci360clientSecretXYZ (sample)
-
Database connection details
- url=jdbc:postgresql://localhost:5432/postgres
- username=postgres
- password=pw
-
Pre-defined ContactHistory on-premise table with the following attributes:
- datahub_id varchar(36)
- subject_id varchar(18)
- contact_id varchar(36)
- contact_dttm_utc timestamp(6) without time zone
- task_id varchar(36)
- channel_type varchar(36)
- insert_ts timestamp WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
Should there be changes in the attributes of the tables, updates should be made in the project code to accommodate the change in attributes.
- Define the access point in the CI360 UI. Take note of the credentials in the access point since these will be used in the agent configuration.
- Ensure maven and mkt-agent-sdk are installed in the on-premise server. You can install Maven using the following:
curl -O https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar xzvf apache-maven-3.9.6-bin.tar.gz
For reference on downloading and installing SAS CI360 Agent SDK, please refer to Deploying CI360 Agents section of repository README.
-
Download the project files to the on-premise server. Update the /src/main/resources/application-properties file with the credentials obtained in step 1. Depending on the project approach, other properties files may also be used which are available under /src/main/resources/. Recompile and repackage the agent files as needed.
-
Run the agent in the on-premise server using the following command:
Gradle:
gradlew bootRun
CH Agent may also be packaged and run directly with java.
-
Check and verify the agent logs if agent is running.
-
Once agent is running, events in CI360 may be associated to the defined access point to stream these events to the agent. Configuration for this can either be done through the Access Point configuration page under Associations (i.e. Access Point Properties > Associations > Associated Events > add Contact Standard Event as a selected Event), or through individual events on their respective Orchestration pages (under External Availability). API calls may be posted to trigger the associated events and test the agent.
-
Updates may be applied to reflect project specific requirements in the asset. This can include but are not limited to the following:
-
Additional attributes for the ContactHistory table. The following files must be updated to reflect the updated attributes of the ContactHistory table:
- /src/main/resources/schema.sql
- /src/main/java/com/sas/incubation/ci/agent/entities/ContactHistory.java
- /src/main/java/com/sas/incubation/ci/agent/repository/BatchContactHistoryRepository.java
- /src/main/java/com/sas/incubation/ci/agent/impl/EventProcessor.java
-
Additional filtering logic for event processing. Logic may be added to the following file: /src/main/java/com/sas/incubation/ci/agent/impl/EventProcessor.java by uncommenting and updating the IF block in line 60.
Once done, the package needs to be recompiled and downloaded to the on-premise server with the proper configuration details.
-