Unica Interact services

Unica Interact enable user to provide real-time marketing offers for inbound interactions.

BTT provides seamless integration with Unica Interact by Interact connector service and unified user session management. BTT Unica Interact integration can accelerate the application development of Interact for BTT users.

BTT Unica Marketing Service

BTT Unica Marketing Service provides the connectivity to the Unica Interact server. BTT Unica Marketing Service is based on BTT service architecture. It provides XML based configuration for Unica Interact connectivity and wrapped Interact Java API for easier usage.

The following is an example of service XML definition of Unica Interact marketing service.


<com.ibm.btt.cs.marketing.UnicaMarketingService  id="unicaDemoService"  audienceLevel = "Individual"   interactiveChannel = "DeliveryChannel"  serverURL="http://UnicaServerIP:UnicaServerPort/interact/servlet/InteractJSService" />

BTT provides the implementation of Unica Interact marketing service by classcom.ibm.btt.cs.marketing.UnicaMarketingService . The following is the property of UnicaMarketingService.


Table 1.
Property Description
serverURL URL of Unica Interact service.
interactiveChannel The name of the interactive channel which this session refers to. This name must match the name of the interactive channel defined in Campaign exactly.
audienceLevel An audience level is a collection of identifiers that can be targeted by a campaign. For example, a set of campaigns could use the audience levels "Household", "Prospect", "Customer", and "Account". Each of these levels represents a certain view of the marketing data available for a campaign. The default value is "Individual". The audience level should be defined in Unica Server.
initialDebugFlag A flag which enable or disable debug information. The valid value is true or false. If true, Interact logs put the debug information to the runtime server logs. Otherwise, it won't put the 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. The default value is "true".

BTT provides a common implement interfaceMarketingService . The UnicaMarketingServiceimplements interface MarketingService. Following is the interface definition:


public interface MarketingService {
	 
	public boolean startSession(String sessionID, NameValuePair[] initialAudienceId, NameValuePair[] initialParameters )  throws Exception;
		
	public Offer[] getOffers(String sessionID, String interactionPointName, int reqCount)  throws Exception;
	
	public boolean endSession(String sessionID)  throws Exception;
	
	public boolean postEvent(String sessionID, String eventName, NameValuePair[] eventParameters) throws Exception;
}	

Note that in the bundled BTT business template sample, there is a dummy marketing service that also implements MarketingService. The dummy service designed for an offline DEMO/sample environment. User can switch to use real Unica Interact environment by change definition in XML, no further code change needed.

Session Management Integration

In runtime, Unica Interact uses session to keep the state of the user inbound interactions. Also BTT has powerful session management. So customer can leverage BTT session management to provide session management integration between Unica Interact and BTT.

After you login BTT application, BTT creates BTT session and BTT session context. In the LoginVerificationOperation of Business Template, the Unica service is created and BTT session ID and user ID is used as the input parameter of the startSession method of Unica Marketing Service.



BTT session context keep the data and referenced service for a login user. Following is the session context definition in BTT business template.



The sessionCtx will chain to branchServer root context in runtime. So the session context can refer the Unica Marketing Service and get the singleton instance of service for current session by following code: getContext().getService("unicaDemoService").

The unified session ID is stored in the BTT session context, so when BTT application want to retrieve an offer in some contact point of a specific page. You can use following JSP code to get offer without manually maintain the unica session. Please refer unica.jsp in BTT business template sample.