Application Event Handling
It is possible to use Connect to call Application Event Handlers to allow users to execute code in response to certain events.
Application Event Handler List
The application events consist of the following:
Bounces
Called by com.kana.connect.server.cm.ComposerSyncLogHandler.createBounceEvent (checked trunk 4Nov2013)
Called by com.kana.connect.server.receiver.ProcessMailServiceHandler.handle (checked trunk 4Nov2013)
Called by com.kana.connect.server.receiver.ProcessMailboxServiceHandler.handle
Message LaunchUI
In com.kana.connect.common.bl.conversation.Interaction.launch()
Subscriptions
New subscriptions (subscribe) or activated subscription(updateSubscription) in com.kana.connect.common.biz.subscription.SubscriptionBizService
Message Open
In profiler com.kana.connect.server.profiler.DBClickHistory.update(TrackerLogEntry)
Unsubscribe Received
In profiler com.kana.connect.server.profiler.UnsubscribeMeHandler.processEntry(TrackerLogEntry)
Links Clicked
In com.kana.connect.server.profiler.DBClickHistory.update(TrackerLogEntry)
Conversion
In com.kana.connect.server.profiler.DBConversionHistory.update(ConversionLogEntry)
Survey Submission
In connectweb com.kana.connectweb.request.SurveyRequest.process()
Recurring Campaign Execution
In com.kana.connect.server.cm.InstanceExecuteServiceHandler.executeInstance(boolean)
Specifying Application Event Handlers
Action and handler parameters names are specified in each handler class in the variables actionParameters and handlerParameters
Example:
dpublic String[] actionParameters = {"subject","body","sender","recipient"};
public String[] handlerParameters = {};
Using Application Event Handlers
Actions and handlers both have properties that can be setup for each company entity in Connect. To use application event handlers:
Populate the db with actions (i.e. seeddb)
Navigate to Company Admin -> Campaigns -> Event Actions screen.
Fill in the action properties for the used action. For more information on managing event actions, please see Event Actions.
Navigate to Company Admin -> Campaigns -> Event Handlers.
Create a new event handler:
Choose the action to use
Choose the event type (i.e. when to execute the action)
Setup the properties for the handler
Activate the handler
For more information on managing event handlers, please see Event Handlers.
Execute an action that will trigger the handler. The code set up with the properties will be executed.
Note: At execution time, each ActionHandler has access to action properties, handler properties and the source object (interaction, subscription, click etc.)