Campaign element template parameters
Campaign element template parameters specify the pieces of data that a campaign element task command needs to perform its function. The marketing services pass the data to the task command when a customer reaches the trigger, target or action in a marketing activity.
- For triggers, campaign element template parameters are specified with the element
<Parameter>
, for example:<Parameter name = "numberOfDays" value = "MARKETING_numberOfDays"/>
- For targets and actions, campaign element template parameters are specified with the element
<Argument>
, for example:<Argument name = "numberOfDays" value = "MARKETING_numberOfDays"/>
The examples in this section use the element <Argument>
.
Campaign element template parameters are specified in the corresponding campaign element template definition. Each template definition can contain 0 or more campaign element template parameters. These parameters typically map to the data that a business user enters in the user interface, but the data can come from other places.
Format of campaign element template parameters
The format of an campaign element template parameter depends on where the data is coming from. There are two options:
- Data is coming from the user interface.If the data the task command needs is data that a business user entered when setting up the trigger, target or action, then the format looks like this:
<Argument name="paramName" value="MARKETING_paramName" />
All parameter values that come from the user interface start with this prefix:
MARKETING_
. Here is an example; in this case, it is for a target that evaluates the support level that a customer has paid for as Gold, Silver or Bronze.<Argument name="supportLevel" value="MARKETING_supportLevel" />
When a business user inputs data about a trigger, target or action used in a marketing activity, the name-value pairs for each campaign element template parameter are saved to the DMELEMENTNVP table. Here is an example of a row in the table for a target with the DMELEMENT_ID of 1000:
Sample DMELEMENTNVP table content DMELEMENT_ID NAME VALUE 1000 "supportLevel" "Gold" When the marketing activity is activated:
- The marketing services look up the paramName in the DMELEMENTNVP table, and
replace the value
MARKETING_paramName
in the implementation definition with the corresponding value. - If the paramName is not found in the DMELEMENTNVP table, then value will be set to any empty string, and that parameter will be ignored.
- The marketing services look up the paramName in the DMELEMENTNVP table, and
replace the value
- Data is specified directly in the template definition.
For certain triggers, targets and actions, the task command needs data that a business user does not enter. In this case, the parameter value does not have the prefix
MARKETING_
.For example, if a task command must check the user's behavior on the current page, then the following parameter can pass the current page data to the task command:
<Argument name="matchLocations" value="request" />
Parameters for lists captured in grid objects
For some campaign elements, business users can specify lists of things like categories, or catalog entries, or customer segments. For example, a business user can specify more than one category for the Recommend Category action. In the properties view of the campaign element, the lists are captured using a grid object. When the list is persisted in the DMELEMENTNVP table, each row in the grid corresponds to one row in the DMELEMENTNVP table, and each row refers to the same property name. For example:
DMELEMENT_ID | NAME | VALUE |
---|---|---|
1000 | "categoryIdList" | "10101" |
1000 | "categoryIdList" | "10102" |
1000 | "categoryIdList" | "10103" |
When this type of parameter is included in a campaign element template definition, the parameter needs to specify only one element. For example, the parameter for the previous example looks like this:
<Argument name="categoryIdList" value="MARKETING_categoryIdList"/>
To
get the list from the user interface, the corresponding campaign element task command must call the
method getElementParameters. The method returns a comma separated list of all the
values from the DMELEMENTNVP table. For the previous example, the code
getElementParameters().get("categoryIdList")
returns
10101,10102,10103
. To provide the values in a List object, use
the method MarketingUtil.parseList. For the previous example, the line of code
looks like this:
List categoryIdList = MarketingUtil.parseList(getElementParameters().get("categoryIdList"));
Common parameters used in campaign elements
The triggers, targets and actions shipped with the Management Center have many parameters defined. If you are creating a new trigger, target or action, you can use the parameters defined here to send user interface data to the task command, or you can create your own.
Parameter | Data it specifies, or valid values |
---|---|
MARKETING_categoryIdList | A category |
MARKETING_catalogEntryIdList | A catalog entry (a product or SKU, for example) |
MARKETING_collateralIdList | A piece of content (an advertisement, for example) |
MARKETING_promotionId | A promotion |
MARKETING_emailMessageId | An e-mail template |
MARKETING_segmentIdList | A customer segment |
MARKETING_urlValueList | A value on a name-value pair |
MARKETING_searchTermList | A search term |
MARKETING_cookieValueList | A cookie value |
MARKETING_anyOrAll | Valid values:
|
MARKETING_containsOperator | Valid values:
|
MARKETING_numberOfTimesOperator | Valid values:
|
MARKETING_numberOfTimes | An integer that is used to indicate how many times this behavior did, or did not, occur |
MARKETING_matchLocations | Valid values:
|
MARKETING_amountOperator1 MARKETING_quantityOperator1 MARKETING_daysOperator MARKETING_beforeAfterOnDate | Valid values:
|
MARKETING_amountOperator2 MARKETING_quantityOperator2 MARKETING_beforeDate | Valid value:< (less than) |
MARKETING_amountValue1 (use with amountOperator1)
MARKETING_amountValue2 (use with amountOperator2) |
Value of the customer's order |
MARKETING_quantityValue1 (use with quantityOperator1)
MARKETING_quantityValue2 (use with quantityOperator2) |
Number of the customer's orders, number of an item from a category |
MARKETING_date1 (use with beforeAfterOnDate) MARKETING_date2 (use with beforeDate) |
A specific date (on, after, before) |
MARKETING_days (use with daysOperator) | A number of days (within, prior) |
repeatSchedule | Indicates that the campaign element should be
processed by the SendMarketingTriggers scheduled job. The method forwardTriggersForProcessing will
be called on the campaign element task command. A value of runDaily sets that the
processing should occur every day. A value of runOnce sets that the processing
should only happen the first time the SendMarketingTriggers scheduled job runs after the activity
becomes active and the current time is past the activity start date. |
rankingBasedOnOrders | Indicates that this campaign element is for a best sellers list, and that the data in the campaign element should be used when an order has been placed to create the appropriate entries in the DMRANKINGSTAT database table. |