Develop > Presentation layer > Customize marketing > Marketing customization: Management Center > Customizing triggers, targets, and actions
Marketing activity data storage and process flow
If you are customizing triggers, targets, and actions, you should know which database tables store data about marketing activities. In addition, you should understand what is happening behind the scenes when customers are experiencing the marketing activities. This knowledge helps you understand what 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 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:
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 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 if he or she meets 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 e-mail 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, 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 containing 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 specified in 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 defined in the associated campaign element template definition. The marketing services pass the task command all the parameters 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 required trigger parameters to determine if 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 defined in the associated campaign element implementation definition. The marketing services pass the task command all the parameters 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 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 defined in the Dialog activity trigger must occur. Examples of events are:
- An event initiated by a customer, for example, a customer placing an order or posting a social commerce product review.
- An event initiated by a daily trigger check, for example, a check for customers celebrating a birthday or abandoning a shopping cart.
- An event indicating 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 defined in the associated campaign element template definition. The marketing services pass the task command all the parameters 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 required trigger parameters to determine if 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 defined in the associated campaign element implementation definition. The marketing services pass the task command all the parameters 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 required trigger parameters to perform the action for the customer.
Related concepts
Campaign element template definitions
Campaign element task commands
Process MarketingTriggers service
Related tasks
Add a new trigger, target or action
Create the campaign element task command
Related reference
List of shipped campaign element templates and task commands