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, ensure that you understand what is happening behind the scenes when customers are experiencing your marketing activities. This knowledge can help you understand what you need to create or change to support a customized trigger, target, or action.

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 with the Management Center user interface by using the following steps:
  • 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 event occurs, 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 following process occurs:
  • 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 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, which indicates the action to take for the customer.
    • 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 send to the customer an email or text message. The action can also 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:
web activity 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 following settings:
    • 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. 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. 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 perform the action for the customer.
For dialog activities, the following diagram shows the basics of this process:
dialog activity process.
  • 1 First, the event that is defined in the dialog activity trigger must occur. The following events are examples of events that can trigger a dialog activity:
    • 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 elapsed for a customer. This applies to the Wait trigger that is shipped with Management Center.
    When the event occurs, the system that detected the event (either HCL 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. 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 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 perform the action for the customer.