startSession(String
sessionID, boolean
relyOnExistingSession, boolean
debug, String
interactiveChannel, NameValuePairImpl[]
audienceID, String
audienceLevel, NameValuePairImpl[]
parameters)The startSession method creates and defines a runtime session. startSession can trigger up to five actions:
load offer suppression data into the session, if the enableOfferSuppressionLookup property is set to true.
load score override data into the session, if the enableScoreOverrideLookup property is set to true.The startSession method requires the following parameters:
sessionID—a string which identifies the session ID. You must define the session ID. For example, you could use a combination of customer ID and timestamp.
relyOnExistingSession—a boolean which defines whether this session uses a new or an existing session. Valid values are true or false. If true, you must supply an existing session ID with the startSession method. If false, you must supply a new session ID.If you set relyOnExistingSession to true and a session exists, the runtime environment uses the existing session data and does not reload any data or trigger segmentation. If the session does not exist, the runtime environment creates a new session, including loading data and triggering segmentation. Setting relyOnExistingSession to true and using it with all startSession calls is useful if your touchpoint has a longer session length than the runtime session. For example, a web site session is alive for 2 hours, but the runtime session is only alive for 20 minutes.If you call startSession twice with the same session ID, all session data from the first startSession call is lost if relyOnExistingSession is false.
debug—a boolean which enables or disables debug information. Valid values are true or false. If true, Interact logs debug information to the runtime server logs. The debug flag is set for each session individually. Therefore, you can trace debug data for an individual session.
interactiveChannel—a string defining the name of the interactive channel this session refers to. This name must match the name of the interactive channel defined in Campaign exactly.
audienceID—an array of NameValuePairImpl objects where the names must match the physical column names of any table containing the audience ID.
audienceLevel—a string defining the audience level.
parameters—NameValuePairImpl objects identifying any parameters that need to be passed with startSession. These values are stored in the session data and can be used for segmentation.If the audienceID or audienceLevel are invalid and relyOnExistingSession is false, the startSession call fails. If the interactiveChannel is invalid, startSession fails, whether relyOnExistingSession is true or false.
If relyOnExistingSession is true, and you make a second startSession call using the same sessionID, but the first session has expired, Interact creates a new session.
If relyOnExistingSession is true, and you make a second startSession call using the same sessionID but a different audienceID or audienceLevel, the runtime server changes the audience for the existing session.
If relyOnExistingSession is true, and you make a second startSession call using the same sessionID but a different interactiveChannel, the runtime server creates a new session.
The runtime server responds to startSession with a Response object with the following attributes populated:
The following example shows one way to call startSession.
processStartSessionResponse is a method which handles the response object returned by startSession.
IBM Unica Interact
8.5.0
|
Copyright IBM Corporation 2011. All Rights Reserved.
|
For more information, see our support and community site: Customer Central
|
|