Marketing activity data storage and process flow

If you are customizing triggers, targets, and actions, you must know which database tables store data about marketing activities. In addition, you should understand what is happening behind the scenes when customers are experiencing your marketing activities. This knowledge helps you understand what you need to create or change to support a customized trigger, target, or action.

WebSphere Commerce ProfessionalWebSphere Commerce EnterpriseDialog activities are available only in the Professional and Enterprise editions of WebSphere Commerce.

Tip: In the context of customization, triggers, targets, and actions are also called campaign elements.

Where data about a marketing activity is stored

Business users create a marketing activity by using the Management Center user interface. The steps are:
  • Create the activity by adding the required campaign elements (triggers, targets, and actions) to the marketing activity in the Activity Builder. Then, complete the properties for the marketing activity and each campaign element. Then, save the marketing activity.
  • Activate the activity so that it is available to customers.

The following illustration shows which database tables are updated when a business user saves and then activates an activity:


Databases that are related to marketing activities

A behind-the-scenes look at an active marketing activity

After a business user activates a marketing activity, the marketing activity theoretically "waits" for the event that is defined in the trigger to occur. When this happens, the customer moves through the activity from one campaign element to the next, as shown in the following illustration:



For a marketing activity that contains a trigger, a target, and an action, the process unfolds like this:

  • 1 First, the customer reaches the trigger element and "triggers" the activity. The events that trigger the activity are defined in the trigger element.
    • A Web activity is always triggered when a customer opens a store page that contains the e-Marketing Spot specified in the e-Marketing Spot trigger.
    • For a Dialog activity, the activity is triggered by an event, such as when a customer registers with the store or places an order.
  • 2 Next, the customer reaches the target element and is evaluated to see whether they meet the criteria of the target. The criteria are specified in the target element. For example, the target can specify that the customer must belong to the Preferred Customers customer segment, or that the customer must have browsed the Furniture category five times in the last week. If the customer meets the criteria of the target, then the customer passes the target.
  • 3 Finally, the customer reaches the action element. The action to take for the customer is defined in the action element.
    • For a Web activity, the action is typically to display something relevant in the e-Marketing Spot, for example, an advertisement or category recommendation.
    • For a Dialog activity, the action can be to send the customer an email or text message, or issue the customer a coupon, or add the customer to a customer segment.

If you are customizing triggers, targets, or actions for use in a marketing activity, you must understand how the marketing services process an activity when the event that triggers the activity occurs.

For Web activities, the following diagram shows the basics of this process:



  • 1 When a customer views a store page that contains an e-Marketing Spot with an active Web activity, the marketing services call the activity. The e-Marketing Spot JSP file calls the Get MarketingSpotData service through the <wcf:getData tag to determine the data to display to the customer in the e-Marketing Spot. The marketing services pass the trigger parameters to all campaign elements in the activity flow. The trigger parameters contain:
    • The business context parameters (for example, the store ID, the customer's user ID, and the customer's personalization ID).
    • Any name-value pairs that are specified by using the <wcf:getData tag in the e-Marketing Spot JSP file (for example, cookies, number of items to display).
    • All the name-value pairs from the URL request.
  • 2 When a customer reaches the target, the marketing services call the target task command that is defined in the associated campaign element template definition. The marketing services pass the task command all the parameters that are specified in the associated campaign element implementation definition. Typically, business users define these parameters in the user interface, and the parameters are stored in the DMELEMENTNVP table as name-value pairs; however the parameters can also come from the specification in the campaign element template implementation definition. The parameters are passed to the task command as Element Parameters. The task command uses this information plus any required trigger parameters to determine whether the customer passes the criteria of the target. If so, the task command returns true, and the customer passes the target. If the customer does not pass the criteria of the target, then the task command returns false and the customer does not pass the target.
  • 3 When a customer reaches the action, the marketing services call the action task command that is defined in the associated campaign element implementation definition. The marketing services pass the task command all the parameters that are specified in the associated campaign element template definition. Typically, business users define these parameters in the user interface and the parameters are stored in the DMELEMENTNVP table as name-value pairs; however the parameters can come from the specification in the campaign element template implementation definition. The parameters are passed to the task command as Element Parameters. The task command uses this information plus any required trigger parameters to perform the action for the customer.

For Dialog activities, the following diagram shows the basics of this process:



  • 1 First, the event that is defined in the Dialog activity trigger must occur. Examples of events are:
    • An event that is initiated by a customer, for example, a customer that places an order or posting a social commerce product review.
    • An event that is initiated by a daily trigger check, for example, a check for customers who are celebrating a birthday or abandoning a shopping cart.
    • An event that indicates that a specified waiting period has elapsed for a customer (this applies to the Wait trigger shipped with Management Center).
    When the event occurs, the system that detected the event (either WebSphere Commerce or an external system) calls the Process MarketingTrigger service to notify the marketing services of the event. The marketing services pass the trigger parameters to all campaign elements in the activity flow. The trigger parameters contain the business context parameters (for example, the store ID, the customer's user ID and personalization ID), as well as any name-value pairs specified in the Process MarketingTriggers service call. If the trigger is a daily check trigger, then the marketing services call the trigger task command to forward the triggers for processing.
  • 2 When a customer reaches the target, the marketing services call the target task command that is defined in the associated campaign element template definition. The marketing services pass the task command all the parameters that are specified in the associated campaign element implementation definition. Typically, business users define these parameters in the user interface, and the parameters are stored in the DMELEMENTNVP table as name-value pairs; however the parameters can also come from the specification in the campaign element template implementation definition. The parameters are passed to the task command as Element Parameters. The task command uses this information plus any required trigger parameters to determine whether the customer meets the criteria of the target. If the customer does not meet the criteria of the target, then the task command returns false and the customer does not pass the target.
  • 3 When a customer reaches the action, the marketing services call the action task command that is defined in the associated campaign element implementation definition. The marketing services pass the task command all the parameters that are specified in the associated campaign element template definition. Typically, business users define these parameters in the user interface and the parameters are stored in the DMELEMENTNVP table as name-value pairs. The parameters, however, can come from the specification in the campaign element template implementation definition. The parameters are passed to the task command as Element Parameters. The task command uses this information plus any required trigger parameters to perform the action for the customer.