As with all reporting, Commerce Service Center reporting data collection starts with the firing of a log-worthy event. The EventListener
listens for the events, gets the appropriate object and passes it to the LogEntryQueueSink
. The EventListener
Nucleus component is configured with the property dataListeners=LogEntryQueueSink
.
The LogEntryQueueSink
property is a DataCollectorQueue
type property and ensures the correct timing of writing to the log files. The LogEntryQueueSink
component is configured with the property dataListeners=LogEntryGenerator
to ensure that message will be passed on to the LogEntryGenerator
.
The LogEntryGenerator
property is used to generate a LogEntry
object. This object is passed to the LogEntryLogger
that has been configured with the parameters dataListeners=LogEntryFileLogger
. The LogEntryLogger
component of the RotationAwareFormattingFileLogger
class logs items to the named file, and then rotates the log file based on a schedule and data threshold. It also contains a formatFields
property that is used to indicate properties that should be written to the file.
Returns and Exchanges Data Collection Properties
The returns and exchange data collection process starts with the firing of the return/exchange event. The ReturnFormHandler
fires the ReturnOrder
event. The ReturnEventListener
listens to the events.
The ReturnEventListener
file is configured as follows:
$class=atg.commerce.reporting.ReturnEventListener
enabled^=/atg/dynamo/service/DWDataCollectionConfig.enabled
dataListeners=ReturnLogEntryQueueSink
returnOrderJMSType=atg.commerce.csr.ReturnOrder
exchangeOrderJMSType=atg.commerce.csr.ExchangeOrder
The ReturnLogEntryQueueSink
listens to messages from event listener and queues the log entries to avoid performance bottleneck. Calls made to this component are queued and then passed to the ReturnLogEntryGenerator
. The ReturnLogEntryQueue
configuration file is configured as follows:
$class=atg.service.datacollection.DataCollectorQueue
dataListeners=ReturnLogEntryGenerator
The LogEntryQueue
passes the data to the ReturnLogEntryGenerator
that generates the ReturnLogEntry
and passes it to the ReturnLogEntryLogger
. The ReturnLogEntryGenerator
file is configured as follows:
$class=atg.commerce.reporting.ReturnLogEntryGenerator
dataListeners=ReturnFileLogger
enabled^=/atg/dynamo/service/DWDataCollectionConfig.enabled
The ReturnFileLogger
component is responsible for writing logs items to the named file, as well as rotating log files based on schedule and data thresholds. The ReturnFileLogger
component also has formatFields
property that indicates which properties should be written to file. The ReturnFileLoggerLogger
configuration file contains the following:
#class
$class=atg.service.datacollection.RotationAwareFormattingFileLogger
# directory and file name of log file
logFileName=csc_return_
# Rotate log files automatically every 1 hour
schedule=every 1 hour
# Or rotate when there are 10,000 records in the file
dataItemThreshold=10000
# The directory to place all the log data files
defaultRoot^=/atg/dynamo/service/DWDataCollectionConfig.defaultRoot
# The centralized Dynamo scheduler
scheduler=/atg/dynamo/service/Scheduler
# Add a timestamp to all the names of the log files
timestampLogFileName=true
# Use this extension after the timestamp
logFileExtension=.data
# Format the time stamp like so (month-day-year_hour-minute-second-
# millisecond)
timestampDateFormat=MM-dd-yyyy_HH-mm-ss-SS
# properties to log (in order)
formatFields=timestampAsDate: MM/dd/yyyy HH: mm: ss,
returnOrder.returnRequestId
enabled^=/atg/dynamo/service/DWDataCollectionConfig.enabled
# Add a Unique ID to all the names of the log files
UIDLogFileName=true
# IdGenerator
idGenerator=/atg/dynamo/service/IdGenerator
# The JMS message type
logRotationMessageType=atg.reporting.ReturnOrder
# The messageSource component to send log rotation message
messageSource=/atg/dynamo/service/LogRotationMessageSource
Returns and exchanges log files are written to the /atg/dynamo/service/
directory.
Call Data Collection Properties
When a call is initiated, a unique call ID is generated and assigned for each call. The call ID is used when starting and ending call events. The atg.agent.events.CallEvent
event extends the atg.agent.events.AgentEvent
event by adding callId
, startTime
and endTime
properties. The startTime
and endTime
properties are recorded to the database as audit logs, while the callId
is added to the audit database record.
The /atg/agent/logging/AgentAuditQueue
listens for all agent events and passes the control to the AgentAuditLogger
and provides an additional AgentFileLogger
listener. This listener writes the data item to the file system. The TypedEventDataListener
contains the AgentAuditLogger
, the AgentFileLogger
and the SelfServiceAuditLogger
components.
The CallLogEntry
and CallLogEntryGenerator
classes provide the ability to add additional data to the log processes.
The CallFileLogger
logs the data to the file system and creates an entry for the end call event. This logger will not log an entry for the start call event. When an agent ends a call the end call event is fired. Should an agent forget to end the call, when the window is closed or the CallState
component is out of scope, the doStopService
method will end the call event.
The CallFileLogger
is configured with the following:
#class
$class=atg.service.datacollection.RotationAwareFormattingFileLogger
# directory and file name of log file
logFileName=svc_end_call_
# Rotate log files automatically every 1 hour
schedule=every 1 hour
#Or rotate when there are 10,000 records in the file
dataItemThreshold=10000
# The directory to place all the log data files
defaultRoot^=/atg/dynamo/service/DWDataCollectionConfig.defaultRoot
# The centralized Dynamo scheduler
scheduler=/atg/dynamo/service/Scheduler
# Add a timestamp to all the names of the log files
timestampLogFileName=true
# Use this extension after the timestamp
logFileExtension=.data
# Format the time stamp like so (month-day-year_hour-minute-second-
# millisecond)
timestampDateFormat=MM-dd-yyyy_HH-mm-ss-SS
# properties to log (in order)
formatFields=timestampAsDate: MM/dd/yyyy HH: mm: ss, callId,
startTimeAsDate: MM/dd/yyyy HH: mm: ss, endTimeAsDate: MM/dd/yyyy
HH: mm:ss,customerId, agentId
enabled^=/atg/dynamo/service/DWDataCollectionConfig.enabled
# Add a Unique ID to all the names of the log files
UIDLogFileName=true
# IdGenerator
idGenerator=/atg/dynamo/service/IdGenerator
# The JMS message type
logRotationMessageType=atg.reporting.svc.Call
# The messageSource component to send log rotation message
messageSource=/atg/dynamo/service/LogRotationMessageSource