Session cartridge

The Session cartridge enables you to use session attributes as criteria for promotions in Experience Optimization to target users based on certain characteristics.

The Session cartridge converts session attribute Claims into new Claims with a simplified Claim URI so that you can easily use these session attributes as criteria for promotions in Experience Optimization and target users based on certain characteristics. The session attributes added to the Claim Store are derived from HTTP request headers and session variables.

In addition to its core function of enabling triggers based on user session data, the Session cartridge can also serve as an example for you to follow and create your own custom cartridges.

Claim Processor

The Claim Processor used in the session cartridge is packaged in the session_cartridge.jar. The Claim Processor converts the session attributes into Output Claims with simplified URIs. These Claim URIs are available through the SessionProcessor class where they are stored as the following constants:

AUTHORIZATION_TYPE
The authorization mechanism that is used for communication.
Possible values (String):
  • BASIC
  • DIGEST
  • FORM
  • CLIENT-CERT
  • NTLM
AUTHORIZATION_IS_AUTHENTICATED
Whether the user has been authenticated (they are who they claim to be).
Possible values (Boolean):
  • true
  • false
REFERER_DOMAIN
The domain name of the referrer (String).
SESSION_ID
The ID of the user HTTP session (String).
SESSION_CREATION_TIMESTAMP
The timestamp when the session was created (long).
SESSION_LIFETIME
The maximum duration of the session in minutes (integer).
USER_AGENT_BROWSER
The Web browser used when making the HTTP request.
Possible values (String):
  • Camino
  • Chimera
  • Chrome
  • Communicator
  • Firebird
  • Firefox
  • Galeon
  • Gecko
  • KHTML
  • Konqueror
  • LotusNotes
  • MSIE
  • NetFront
  • NS
  • NS7
  • Opera
  • Phoenix
  • Safari
A null value is returned for web browsers not in the list.
USER_AGENT_BROWSER_VERSION
The version of the web browser used when making the HTTP request (String).
USER_AGENT_ISBOT
Whether the client application making the request is a web robot.
Possible values (Boolean):
  • true
  • false
Robots are detected by looking at the User-Agent HTTP header of requests. The session cartridge looks for the signature of the following well-known robots and, if it finds such a signature, assumes that the client is a robot:
  • GoogleUser-Agent contains googlebot
  • MicrosoftUser-Agent contains msnbot
  • Yahoo!User-Agent contains yahoo and slurp
  • BaiduUser-Agent contains baiduspider
USER_AGENT_OS
The operating system used by the client application making the HTTP request.
Possible values (String):
  • *BSD
  • BeOS
  • BlackBerry
  • FreeBSD
  • IRIX
  • Linux
  • Mac
  • Nintendo Wii
  • Nokia
  • OpenBSD
  • SonyEricsson
  • SunOS
  • SymbianOS
  • Windows
A null value is returned for operating systems not in the list.
USER_AGENT_OS_VERSION
The version of the operating system used when making the HTTP request (String).

Cartridge XML file

The session cartridge XML file session_cartridge_conf.xml links the session cartridge together and specifies the Input and Output Claims for each processor. The session_cartridge_conf.xml is packaged in the session_cartridge.jar and is preconfigured in the Ambient Data Framework cd_ambient_conf.xml configuration file.