Configure Sales Center events
You can configure the batch size and frequency of Sales Center events sent to Coremetrics.
Procedure
- Ensure that Coremetrics analytics for Sales Center is enabled.
- Edit the WebSphere Commerce configuration file:
- Update the event configuration:
- Search the file for the following string: "Analytics Event Processor".
- Scroll down to find the event elements. The code segment will look similar to the following:
<supportedEvents processState="-10" purgeState="-20" mapper="mapCommonEvents.xml" maxBatchSize="250"> <event type="Member" listen=" true" mapper="mapMemberEvent.xml"/> <event type="OrderCreation" listen=" true" mapper="mapOrderCreation.xml"/> <event type="OrderItemCreation" listen=" true" mapper="mapOrderItemCreation.xml"/> <event type="OrderItemUpdate listen=" true" mapper="mapOrderItemUpdate.xml"/> <event type="OrderItemShipment" listen=" true" mapper="mapOrderItemShipment.xml"/> <event type="OrderCancellation" listen=" true" mapper="mapOrderCancellation.xml"/> <event type="OrderSubmission" listen=" true" mapper="mapOrderSubmission.xml"/> </supportedEvents>
- Configure the maxBatchSize. This value determines the maximum number of events to process per transaction. This value must be set as large as possible while still ensuring that the EventMapper completes the processing in less than the maximum WebSphere Application Server transaction timeout setting (20 minute default). However, this value should not be too small because of the additional performance overhead of starting and stopping transactions.
- Enable individual events by setting their listen attribute to true. This is the attribute in bold in the preceding code sample.
- Disable events by setting their listen attribute to false.
- Configure the information about the store:
- Scroll down from the code segment edited in step 2a, to the stores element. Update the store element with data that reflects the store. The code segment will look similar to the following:
<store enabled="false" storeId="-1" > <configuration transmitEnabled="false" transmitClassName="com.ibm.commerce.bi.events.transmit.CMWebServiceTransmitter" cmClientID="assignedID" username="store1user" password="encrypted_store1pass" sslKeyStore="/usr/WebSphere/AppServer/profiles/demo/etc/DummyServerKeyFile.jks" sslKeyPassphrase="WebAS" sslTrustStore="/usr/WebSphere/AppServer/profiles/demo/etc/DummyServerTrustFile.jks" sslTrustPassphrase="WebAS" serviceURL="https://wscreceiver.coremetrics.com/Receiver/sendEventData" /> </store>Notice the information highlighted in bold in the preceding sample. These are the places that update with the store information:
- enabled
- A boolean flag which indicates whether Coremetrics analytics is enabled for the store identified by the storeId.
- storeId
- The ID of the store in the WebSphere Commerce database.
- transmitEnabled
- A boolean flag which specifies whether the events should be transmitted to Coremetrics using the Web service transmitter. The transmitEnabled attribute must be set to false to manually send the event data to Coremetrics which is generated by the EventFileGeneration utility. If the value is set to true, the events are transmitted to Coremetrics using the Web service transmitter.
- cmClientID
- A Coremetrics client ID. This should be provided by Coremetrics when you negotiate the service contract.
- username
- The username used to access Coremetrics.
- password
- The password associated with the username.
- sslKeyStore
- The fully qualified path and file name of the store's Secure Sockets Layer (SSL) key database file.
For testing purposes, you can create self-signed certificates. The Dummy key and trust file certificate are expired and should not be used. See the WebSphere Application Server Security Guide for more information about the Dummy key and trust file certificate and how to replace them. The WebSphere Application Server Security Guide can be accessed through the WebSphere Application Server InfoCenter.
- sslKeyPassphrase
- The password for the key database file.
- sslTrustStore
- The fully qualified path and file name of the store's SSL trust database file.
- sslTrustPassphrase
- The password for the truststore database file.
- serviceURL
- The URL of the Web service that the event data is sent to. This should be provided by Coremetrics when you negotiate the service contract.
- Deploy the updated file to the application server.
- Restart WebSphere Commerce.
- Optional: Configure the scheduled job to set the frequency of the event processing. By default, the job is scheduled to run every hour. However, if this negatively affects performance, you may want to change the time interval.
To configure the job, refer to Edit the configuration for a scheduled job, and edit the EventProcessor job.
Related concepts
Sales Center reports in Coremetrics
Related tasks
Generate an event file
Configure the Secure Sockets Layer
Customize Coremetrics analytics for WebSphere Commerce Sales Center
Related reference
EventFileGeneration utility
Troubleshoot: Coremetrics for Sales Center