Configuration Files for Payload Generation
The eventpayloadconfig.txt file defines the Siebel CRM fields
whose contents are posted to Kafka. Optionally, you can also specify the partitions to
which the data should be posted. This file is located inside the eventconfig directory
under <SIEBSRVR_ROOT>
.
Example path,
<……>/ses/siebsrvr/eventconfig/eventpayloadconfig.txt
In the context of entries in this file,
-
Event represents the topic to publish to. An alternative name Event Store has been introduced for the this parameter in the Siebel 24.12 release.
Note: For now, both the parameter names Event and Event Store are supported and can be used interchangeably. However, only the parameter name Event Store will be supported in the future releases. Hence, we recommend you to transition from Event to Event Store in the configuration at the earliest. -
(Optional) Partitions represents the Kafka partition numbers to write the topic. This parameter can take comma separated integer values.
Note: The Partitions parameter must be configured immediately after the Event/Event Store parameter. Configuring the Partitions parameter elsewhere, will render the payload invalid. -
Settings Fields: All and All Except reduce data entry.
-
Context Field is used only for 2-Step or Asynchronous publish.
-
(Optional)SingleRecordAsJSONObject is only applicable to the new JSON payload structure for RTEs, and for server scripts. It determines how a single data record of a child business component is posted. In the RTE mechanism of publishing, it is applicable only to the child business component and must be configured after the Fields parameter of the child business component. You can assign one of the following values to this parameter:
true:
Posts a single data record of the child business object as a JSON object.false:
Posts a single data record of the child business object as an array. This is the default value.
setProperty
method to configure the
SingleRecordAsJSONObject parameter for a child Business Object in custom
Business Service implementations through server script as
follows:ChildBCPropertySet.SetProperty("SingleRecordAsJSONObject",”<true/false>");
Siebel Event Publication and Subscription publishes messages based on the parameter configurations in the eventpayloadconfig.txt as follows:
- If the Partitions parameter is configured for a topic, topic messages are published to the specified partitions.
- If the Partitions parameter is not configured for a topic, topic messages are published based on the Kafka configurations.
- If the topic configured through the Event Store parameter, is not available
in Kafka:
- Kafka may automatically create the topic for Kafka brokers based on the Kafka broker properties auto.create.topics.enable, num.partitions, and so on. A topic is created in Kafka when the first message for the topic is posted from Siebel CRM to Kafka.
- Messages from Siebel CRM are posted to the partitions numbers configured for the topic in the eventpayloadconfig.txt file.
Structure of eventpayloadconfig.txt for synchronous publishing
Since RTE (Run-Time Events) configurations will refer to unique Business Service names, configuring different base business components (BC) will require specific business services based on CSSEAIEventHandler or classes derived from it. For example, Account BC can use AccountEventGenBS, Contact BC can use ContactEventGenBS. and so on.
Using Fields:All
sends data in all active fields of the Business
Component to Kafka. Using Fields: All Except
sends all active fields
other than those following these words to Kafka. For MVFs (Multivalue Field), child
Business Component (on which the MVL is configured for the MVF) fields need to be
added.
This is list of fields to be mentioned in aieventpayloadconfig.txt file for synchronous publish.
Field | Description |
---|---|
Event/Event Store | Name of the Kafka topic to publish to |
Partitions | Lists the Kafka partitions to which the topic should be published to |
Business Service | A business based on class CSSEAIEventHandler or classes derived from it |
Business Service Method | Business service method name for publishing: SendEvent |
Business Object | Business object name, for example, Contact |
Primary Business Component | Event data of the primary component name to be published to Kafka |
Fields | List of active fields of primary business component, separated by commas, to be included in the payload published to Kafka |
Child Business Component | Necessary child component name that you want to publish data of |
Fields | List of active fields of the child business component, separated by commas, to be included in payload published to Kafka |
SingleRecordAsJSONObject | Determines if a single data record of a child business component is posted as a JSON object or as an array |
Samples of eventpayloadconfig.txt for synchronous publishing:
Event Store: ContactEvent
Partitions: 0, 1, 2
Business Service: ContactEventSvc
Business Service Method: SendEvent
Business Object: Contact
Primary Business Component: Contact
Fields: First Name, Last Name, Contact Id
Child Business Component: Account
Fields: Name, Location, CSN, City, City State
SingleRecordAsJSONObject: true
Child Business Component: Action
Fields: Status, Activity, Type, End, Due, Owner, Start
SingleRecordAsJSONObject: false
Child Business Component: Opportunity
Fields: Id
In the above sample file for synchronous publish, how the single data record of the child
business components (Account and Opportunity) are posted is determined by the value of
the environment variable SIEBEL_EVENT_PUBSUB_PAYLOAD_STRUCT
and the
SingleRecordAsJSONObject
property of the child business components:
In this case, if the value of SIEBEL_EVENT_PUBSUB_PAYLOAD_STRUCT
is set
to:
- 1 or empty: The configuration for the topic “ContactEvent” is rendered
invalid as the
SingleRecordAsJSONObject
parameter is configured for the child objects. Siebel Event Publication and Subscription will not perform the required publish process and will not post any ContactEvent messages to Kafka through the RTE trigger. - 2: The value of the
SingleRecordAsJSONObject
parameter is considered and the child business component is posted as follows:
-
{ "Contact":{ "Contact Id":"", "First Name":"test1", "Last Name":"outllok", "Account":{ "Name":"A. K. Parker Inc.", "Location":"HQ-Corporate", "CSN":"10-103", "City":"Menlo Park", "City State":"Menlo Park, CA" }, ………………. ………………. "Action": [ { "Status":"Unscheduled", "Type":"Appointment", "Due":"04/19/2024 01:36:06", "Start":"", "Owner":"", "End":"", "Activity":"" } ] ………………. ………………. "Opportunity": [ { "Id":”A567" } ] ………………. ………………. } }
Observe that the:
- Account child business component is posted as a JSON Object as the
SingleRecordAsJSONObject
property for it is set totrue
. - Action child business component is posted as an array as the
SingleRecordAsJSONObject
property for it is set tofalse
. - Opportunity child business component is posted as an array as the
SingleRecordAsJSONObject
property for it is not set.
Note: More than one data records are always posted as an array. - Account child business component is posted as a JSON Object as the
Sample of eventpayloadconfig.txt for asynchronous publishing:
Event:AccountSiebelInternalEvent
Business Service: AccountContextIdPubSvc
Business Service Method: SendEvent
Business Object:Account
Primary Business Component : Account
Context Field:Id
Event:AccountEvent
Business Service: AccountEventPubSvc
Business Service Method: SendEvent
Business Object:Account
Primary Business Component : Account
Fields:All
Child Business Component:Contact
Fields:FirstName
In the above sample file for asynchronous publish, the section that appears up to and including Context Field is responsible for publishing a record identifier, for example, an ID (ROW_ID of a Siebel CRM record) to the topic AccountSiebelInternalEvent. This publish is performed by the Send Event method of Business Service AccountContextIdPubSvc in the above example, where AccountContextIdPubSvc must be having CSSEAIEventHandler or a subclass as its class. Subsequently, a Business Service AccountEventPubSvc (also derived from CSSEAIEventHandler class or its subclass) will be publishing the whole payload to the topic AccountEvent. AccountEventPubSvc must be configured in the Event Subscription view to subscribe to the topic AccountSiebelInternalEvent (where Siebel ROW_ID was published) and call its Send Event method. Because subscription requires configuration in aieventconfig.txt file as well, necessary entries must be made within Events array of aieventconfig.txt.