logEvent(ILearningContext context,
IOffer offer,
IClientArgs clientArgs,
IInteractSession session,
boolean debug)
logEvent method workflow
The logEvent method is called by the runtime server whenever the Interact API posts an event that is configured to log as a contact or response. Use this method to log contact and response data to a database or file for reporting and learning purposes. For example, if you want to algorithmically determine the likelihood of a customer accepting an offer based on criteria, use this method to log the data.
context-an ILearningContext object defining the learning context of the event, for example, contact, accept, or reject.
offer-an IOffer object defining the offer about which this event is being logged.
clientArgs-an IClientArgs object defining any parameters. Currently, logEvent, does not require any clientArgs, so this parameter may be empty.
session-an IInteractSession object defining all session data.
debug-a boolean. If true, indicates the logging level verbosity for the runtime environment system is set to debug. For best results, select this value before writing to a log.
If the logEvent method fails, it throws a LearningException.
Return value