Unica Interact Configuration

Unica Interact

In the Kafka configuration file, you can set the Unica Interact parameters to send the event details. The sample configuration of downstream Kafka publishing events to Unica Interact is shown below:

"eventConsumers": [
  {
    "className": "com.hcl.drive.communication.UnicaInteractEventConsumer",
    "name": "UnicaInteractEventConsumer",
    "parameters": [
      {
        "name": "audienceIdAttributeName",
        "stringValue": "ACCOUNTID"
      },
      {
        "name": "campaignIdAttributeName",
        "stringValue": "offerCode"
      },
      {
        "name": "customerKeyFieldName",
        "stringValue": "MSISDN"
      },
      {
        "name": "databaseServerIp",
        "stringValue": "127.0.0.1"
      },
      {
        "name": "databaseServerUser",
        "stringValue": "drive"
      },
      {
        "name": "databaseServerPassword",
        "stringValue": "6F2FA7F6B3CD1570F19F0A0B2636E033"
      },
      {
        "int32Value": 3306,
        "name": "databaseServerPort"
      },
      {
        "name": "databaseName",
        "stringValue": "drive_acme_core"
      },
      {
        "name": "dateTimeAttributeName",
        "stringValue": "ts"
      },
      {
        "name": "eventParamEventName",
        "stringValue": "event"
      },
      {
        "name": "eventParamInboundChannelName",
        "stringValue": "inbound_channel"
      },
      {
        "name": "eventParamInboundChannelValue",
        "stringValue": "hcl"
      },
      {
        "name": "payloadChDebugValue",
        "stringValue": "false"
      },
      {
        "name": "payloadGatewayValue",
        "stringValue": "InboundGateway"
      },
      {
        "name": "payloadIcNameValue",
        "stringValue": "testDetect"
      },
      {
        "name": "producerConfigFilePath",
        "stringValue": "${HCL_HOME}/../${HCL_SOLUTION}/etc/producer_config.properties"
      },
      {
        "name": "producerKrb5ConfigFilePath",
        "stringValue": "/etc/krb5.conf"
      },
      {
        "name": "producerTopic",
        "stringValue": "INTERACT_QUALIFIED_TRANS_TOPIC"
      }
    ]
  }
]
  1. eventConsumers.className: Name of the Java class to write the events in the pre-defined format of the downstream system. For Unica Interact, the className must be set as "com.hcl.drive.communication.UnicaInteractEventConsumer".
  2. eventConsumers.name: Name of the downstream system to be assigned.
  3. Parameters:
    1. Database related:
      1. databaseServerIp: Server IP of the database to publish downstream events to.
      2. databaseServerUser: Username of the database.
      3. databaseServerPassword: Encrypted password of the database.
      4. databaseServerPort: Port number of the database.
      5. databaseName: Name of the database.
    2. Kafka related:
      1. producerConfigFilePath: Path to the producer_config.properties file. This file would have the configuration/properties for connecting to Kafka.
      2. producerKrb5ConfigFilePath: Path to the krb5.conf file if needed to establish the Kafka connection that needs to be Kerberos authenticated.
      3. producerTopic: Name of the Kafka Topic on which events will be published, and Unica Interact will read from it.
    3. audienceIdAttributeName: Set the audience name to be passed to Unica Interact.
    4. campaignIdAttributeName: Set the event ID, if required, set multiple event IDs.
    5. customerKeyFieldName: Pass the CED attribute name, which represents the Audience in Unica Interact.
    6. dateTimeAttributeName: Set the attribute as "datetime" to pass the date information to Unica Interact. It is necessary for the attribute to be selected on the UI Event for pushing to downstream.

      Sample date format is shown below:

      events: [
        parameters: [
          {
            "t": "datetime",
            "n": "ts",
            "v": "1715581447"
          }
        ]
      ]
      
    7. dateTimeAttributeFormat: Attribute format of the datetime when time-based reminders are configured for an Event. By default, it is set as "yyyy-MM-dd HH:mm:ss". For custom patterns you are verify here.
    8. eventParamEventName: Name of the parameter on which the Event ID (which is configured from UI) is set.
    9. eventParamInboundChannelName: Attribute name of the inbound channel, which Unica Interact will use.
    10. eventParamInboundChannelValue: Value of the attribute for inbound channel, which Unica Interact will use.
    11. payloadChDebugValue: set the value of "CH_Debug" to be passed to Unica Interact.
    12. payloadGatewayValue: set the value of "gateway" to be passed to Unica Interact.
    13. payloadIcNameValue: set the value of "ICName" to be passed to Unica Interact.
    14. producerConfigFilePath: set the config file path.
Sample Message

A sample screenshot shown below within an event configured in Detect where we select the attributes and populate an event identifier to push to downstream kafka topic for Unica Interact to ingest.

Sample message output to the Kafka topic based on the configuration above.

{
  "message": {
    "parameters": [],
    "ICName": "testDetect", # Value from payloadIcNameValue
    "CH_debug": "false", # Value from payloadChDebugValue
    "CH_sessionID": "8bd6a003-8ef3-4b2e-a540-3cb936a74297",# Random unique uuid
    "audienceID": [
      {
        "t": "string",
        "n": "CUSTOMER", # Value from audienceIdAttributeName
        "v": "9881153226" # Value from tuple[customerKeyFieldName]
      }
    ],
    "events": [
      {
        "parameters": [
          {
            "t": "string",
            "n": "event", # Value from eventParamEventName
            "v": "EVNT01"
          },
          {
            "t": "string",
            "n": "inbound_channel", # Value from eventParamInboundChannelName
            "v": "hcl" # Value from eventParamInboundChannelValue
          },
          { # Profile Attribute
            "t": "string",
            "n": "cardMemberId",
            "v": "12458"
          },
          { # Profile Attribute
            "t": "string",
            "n": "country",
            "v": "USA "
          },
          { # Profile Attribute
            "t": "numeric",
            "n": "age",
            "v": "22"
          },
          { # Tuple Attribute
            "t": "string",
            "n": "sysDateTime",
            "v": "2024-05-12 07:21:31"
          },
          { # Tuple Attribute
            "t": "numeric",
            "n": "transactionAmount",
            "v": "300.0"
          },
          { # Tuple Attribute
            "t": "string",
            "n": "dataSource",
            "v": "Recharge"
          },
          { # Tuple Attribute
            "t": "string",
            "n": "feedName",
            "v": "Recharge"
          }
        ],
        "event": "EVNT01" # Value from 'Event Identifier' configured on UI
      }
    ]
  },
  "gateway": "InboundGateway" # Value from payloadGatewayValue
}