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


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:

  1. Populate the db with actions (i.e. seeddb)

  2. Navigate to Company Admin -> Campaigns -> Event Actions screen.

    images/download/attachments/56624887/ApplicationEventHandling.PNG

  3. Fill in the action properties for the used action. For more information on managing event actions, please see Event Actions.

  4. Navigate to Company Admin -> Campaigns -> Event Handlers.

    images/download/attachments/56624887/ApplicationEventHandling2.PNG

  5. Create a new event handler:

    1. Choose the action to use

    2. Choose the event type (i.e. when to execute the action)

    3. Setup the properties for the handler

    4. Activate the handler

      For more information on managing event handlers, please see Event Handlers.

  6. 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.)