About the Learning API

Unica Interact offers a learning module which uses a naive-bayesian algorithm to monitor visitor actions and propose optimal offers (in terms of acceptance). You can implement the same Java interface with your own algorithms using the Learning API to create your own learning module.

Note: If you use External learning, the example reports regarding learning (Interactive Offer Learning Details and the Interactive Segment Lift Analysis reports) do not return valid data.

At the simplest level, the learning API provides methods to collect data from the runtime environment and to return an ordered list of recommended offers.


Learning API workflow

You can collect the following data from Unica Interact

  • Offer contact data
  • Offer acceptance data
  • All session data
  • Unica Campaign specific offer data
  • Configuration properties defined in the learning category for the design environment and the offerserving category for the runtime environment

You can use this data in your algorithms to create a list of proposed offers. You then return a list of recommended offers, in order of highest to lowest recommendation.

Although not shown in the diagram, you can also use the learning API to collect data for your learning implementation. You can keep this data in memory, or log it to a file or database for further analysis.

After creating your Java classes, you can convert them to jar files. Once you create your jar files, you must also configure the runtime environment to recognize your external learning module by editing configuration properties. You must copy your Java classes or jar files to every runtime server using your external learning module.

Besides the information in this guide, the JavaDoc for the learning optimizer API is available on any runtime server in the Interact/docs/learningOptimizerJavaDoc directory.

You must compile your implementation against interact_learning.jar located in the lib directory of your Unica Interact runtime environment installation.

When writing your custom learning implementation, you should keep the following guidelines in mind.

  • Performance is critical.
  • Must work with multi-threading and be thread safe.
  • Must manage all external resources with failure modes and performance in mind.
  • Use exceptions, logging (log4j), and memory appropriately.