Trigger parameters

When a customer triggers a web or dialog activity, the marketing services pass trigger parameters to the task commands of all campaign elements within the activity flow. Trigger parameters are name-value pairs that contain the current context information for the activity. Campaign element task commands can then extract the relevant trigger parameters to perform their work.

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

The sources of trigger parameters include the following parameters:
  • The business context parameters (for example, the store ID, user ID, external site).
  • For web activities, any parameters that are defined in the getData tag on the e-Marketing Spot JSP snippet (for example, cookie parameters).
  • WebSphere Commerce EnterpriseWebSphere Commerce ProfessionalFor dialog activities, any parameters that are passed to the Process MarketingTrigger service.

Methods for processing trigger parameters

Use the following method in your campaign element task command. Use the method to get the context information from the trigger parameters that the task command needs to do its work:

MarketingUtil.getDataFromTriggerParametersString

Tip: In custom code, if you need to create a trigger parameter string to pass to a marketing service, then you can use this method:

MarketingUtilClient.createTriggerParametersString

List of trigger parameters

The following table lists some of the parameters that the marketing services pass to the campaign elements when the event specified in the trigger occurs:

Additional request parameters
The current command request parameters. These parameters are used to match against behavior rules. These parameters include the following:
  • All the name-value pairs in the URL.
  • All name-value pairs that are specified in the e-Marketing Spot JSP snippet.
catalogId
The current catalog that is being viewed.
categoryId
The current category that is being viewed.
WebSphere Commerce Version 7.0.0.1 or laterDM_ActivityOrder
WebSphere Commerce Version 7.0.0.1 or laterDetermines the order that recommended data (BaseMarketingSpotActivityDataType objects) returns. You can set the following values for the parameter:
true
The recommended data returns in the same order that is specified within the web activities.
false
The recommended data is reordered by the recommendation type; the catalog entries are listed first, followed by categories, content, and then other custom types.
WebSphere Commerce Version 7.0.0.6 or laterDM_BehaviorMustBeStatic
WebSphere Commerce Version 7.0.0.6 or laterSets whether all content that returns to an e-Marketing Spot must be static content. You can set the following values for the parameter:
true
The marketing runtime ensures that only static content returns, such as returning the same recommendation to show for all customers. If the e-Marketing Spot currently has any dynamic web activities scheduled (for example, activities that contain targets, branches, experiments) or dynamic content (content with customized tags) then no results return.
false
The marketing services can return content other than only static content.
WebSphere Commerce Version 7.0.0.7 or laterDM_contextPath
WebSphere Commerce Version 7.0.0.7 or laterThe context path for marketing content. If you include the text [contextPath] to dynamically set the context path in URL links in a piece of marketing content, you must pass in the context path.
DM_DisplayCategories
The number of categories that the marketing services attempts to retrieve from the active web activities for an e-Marketing Spot. This parameter also defines the maximum number that the marketing services returns to an e-Marketing Spot.
DM_DisplayContent
The number of marketing content that the marketing services attempts to retrieve from the active web activities for an e-Marketing Spot. This parameter also defines the maximum number of marketing content to return.
DM_DisplayProducts
The number of products that the marketing services attempts to retrieve from the active web activities for an e-Marketing Spot. This parameter also defines the maximum number of products to return.
DM_EmsName
The name of the e-Marketing Spot for which the marketing services retrieves content.
WebSphere Commerce Version 7.0.0.7 or laterIn certain situations, multiple e-Marketing Spot names can be associated with one location on a page. The marketing services evaluate the e-Marketing Spots in sequence, and returns the recommendations from the first e-Marketing Spot that return any results. For example, one location on a grocery store page can be associated with a category e-Marketing Spot, an aisle e-Marketing Spot, and a department e-Marketing Spot. If the category e-Marketing Spot has results, then the page displays those results. Otherwise, the marketing services checks whether the aisle e-Marketing Spot has results. If not, then the marketing services check the department e-Marketing Spot.
<wcf:param name="DM_EmsName" value="Milk" />
<wcf:param name="DM_EmsName1" value="Aisle1" />
<wcf:param name="DM_EmsName2" value="Dairy" />

WebSphere Commerce Version 7.0.0.8 or laterThe Commerce Composer tool has situations where multiple e-Marketing Spots should be considered to be at the 'same level' - the results should be used from the e-Marketing Spot at that level that has the highest priority activity. If multiple e-Marketing Spots should be considered to be at the 'same level', then duplicate DM_EmsName parameters can be set for the e-Marketing Spots at the same level.

For example, e-Marketing Spot A has parent e-Marketing Spots B and C that are at the same level. Both e-Marketing Spots are set in parameter DM_EmsName1
<wcf:param name="DM_EmsName" value="A" />
<wcf:param name="DM_EmsName1" value="B" />
<wcf:param name="DM_EmsName1" value="C" /> 
<wcf:param name="DM_EmsName2" value="D" />
The marketing services looks at the activities that are scheduled for e-Marketing Spot A first. If nothing is returned, then the activities for e-Marketing Spots B and C are compared. If B has an activity with the highest priority, it is evaluated first. If nothing is returned from B, then the activities for spot C run. If C has an activity with the highest priority, it is evaluated first. If nothing is returned from C, then the activities for spot B run. If B and C have an equal highest priority activity, B is evaluated first, followed by C (the order that is passed in).
Note: The marketing services do not mix the activities across multiple e-Marketing Spots. For example,
  • B has activity A100 with priority 100, and activity A10 with priority 10
  • C has activity A90 with priority 90, and activity A80 with priority 80
B has the highest priority activity, so evaluation order is: A100, A10, A90, A80. The marketing services do not mix the activities across the two e-Marketing Spots (it does not evaluate the order A100, A90, A80, A10).
WebSphere Commerce Version 7.0.0.2 or laterDM_Emspot_Usage
WebSphere Commerce Version 7.0.0.2 or laterSets the type of the e-Marketing Spot that is being evaluated. If this parameter is not set, the default value is MARKETING. Other e-Marketing Spot types include SEARCH, STOREFEATURE, STOREFILEREF, and PAGELAYOUT.
WebSphere Commerce Version 7.0.0.7 or laterDM_imagePath
WebSphere Commerce Version 7.0.0.7 or laterThe path to an image. When marketing content contains the text [imagePath] to dynamically set the image path in image tags, then the client needs to pass in the image path.
WebSphere Commerce Version 7.0.0.6 or laterDM_marketingSpotBehavior
WebSphere Commerce Version 7.0.0.6 or laterThis parameter informs the marketing services of the current behavior that is determined for the e-Marketing Spot. When the value is set to 0 (static), then the marketing services do not cache the results from the command cache entries (FilterCatalogEntryCmdImpl, FilterCategoryCmdImpl, FilterContentCmdImpl)
0
Static.
1
Dynamic.
WebSphere Commerce Version 7.0.0.2 or laterDM_PreviewReport
WebSphere Commerce Version 7.0.0.2 or laterIndicates whether, the MarketingSpotData response contains information that can be used to understand the evaluation that occurred on the e-Marketing Spot. You can set the following values for the parameter:
true
The MarketingSpotData response contains the information as a list of strings in the PreviewReport variable. This information can be used to understand the evaluation that occurred on the e-Marketing Spot.
false
The response does not contain the information within the PreviewReport variable.
DM_PznId
The personalization ID that uniquely identifies a customer. The marketing services determine the customer's personalization ID from the Audit Context.
DM_ReqCmd
The current command. This parameter is used to match against behavior rules.
DM_RefUrl
The current referral URL. This URL is used to match against behavior rules.
WebSphere Commerce Version 7.0.0.8 or laterDM_resolvedParentCategories
WebSphere Commerce Version 7.0.0.8 or laterThe Commerce Composer tool uses the value for this parameter to control the behavior of the Current Page target. You can set the following values for the parameter:
true
The Current Page target always returns true when the target must check whether the current category is a child of the category that is specified within the target.
false
The Current Page target evaluates the conditions that are set in the target against the current context.
WebSphere Commerce Version 7.0.0.1 or laterDM_ReturnCatalogEntryId
WebSphere Commerce Version 7.0.0.1 or laterIndicates whether the MarketingSpotData response contains only the unique ID of the recommended catalog entries. Otherwise, the marketing services call the catalog services to return the CatalogEntryType object for recommended catalog entries. You can set the following values for the parameter:
true
The MarketingSpotData response contains only the unique ID of the recommended catalog entries.
false
The marketing services calls the catalog services to return the CatalogEntryType object for recommended catalog entries.
WebSphere Commerce Version 7.0.0.1 or laterDM_ReturnCatalogGroupId
WebSphere Commerce Version 7.0.0.1 or laterIndicates whether the MarketingSpotData response contains only the unique ID of recommended categories. Otherwise, the marketing services call catalog services to return the CatalogGroupType object for recommended categories. You can set the following values for the parameter:
true
The MarketingSpotData response contains only the unique ID of recommended categories.
false
The marketing services calls catalog services to return the CatalogGroupType object for recommended categories.
WebSphere Commerce Version 7.0.0.3 or laterDM_ReturnDefaultContentOnly
WebSphere Commerce Version 7.0.0.3 or laterIndicates whether the marketing services ignore any web activities that are scheduled to the e-Marketing Spot. If the marketing services ignore the web activity, the MarketingSpotData response contains only the default content that is associated with the e-Marketing Spot. You can set the following values for the parameter:
true
The marketing services ignores the web activities and the MarketingSpotData response contains only the default content that is associated with the e-Marketing Spot.
false
The marketing services do not ignore the web activities. The MarketingSpotData response can contain content from the web activities that are associated with the e-Marketing Spot.
WebSphere Commerce Version 7.0.0.1 or laterDM_ReturnMarketingContentId
WebSphere Commerce Version 7.0.0.1 or laterIndicates whether the MarketingSpotData response contains only the unique ID of recommended content. Otherwise, the marketing runtime calls the marketing services to return the MarketingContentType object for recommended content. You can set the following values for the parameter:
true
The MarketingSpotData response only contains the unique ID of recommended content.
false
The marketing runtime calls the marketing services to return the MarketingContentType object for recommended content.
WebSphere Commerce Version 7.0.0.8 or laterDM_ReturnTimeLimit
WebSphere Commerce Version 7.0.0.8 or laterWhen this parameter is set to true the MarketingSpotData response contains the information in the variableNextTimeLimit of the number of seconds the returned data can be cached when the results are static. If the number of seconds is -1, there is no specific time limit required. The allowed value for the DM_ReturnTimeLimit parameter is true.
WebSphere Commerce Version 7.0.0.7 or laterDM_storeIdentifier
WebSphere Commerce Version 7.0.0.7 or laterIndicates that when marketing content contains the text [storeIdentifier] to dynamically set the store identifier in URL links and image tags, the client needs to pass in the store identifier.
DM_SubstitutionName
DM_SubstitutionValue
Substitution parameters allow for marketing text to be dynamically updated. If the marketing content that returns to an e-Marketing Spot contains the text that is specified in the DM_SubstitutionName parameter, the text is replaced. The text that return is replaced with the text that is specified in the DM_SubstitutionValue parameter.
Set any substitution variables in pairs within the e-Marketing Spot JSP snippet. For example, the following code sets two pairs of substitution variables:
<wcf:param name="DM_SubstitutionName1" value="[firstName]" />
<wcf:param name="DM_SubstitutionValue1" value="abc" />
<wcf:param name="DM_SubstitutionName2" value="[lastName]" />
<wcf:param name="DM_SubstitutionValue2" value="def" />
If the marketing text is "Hello [firstName] [lastName]", the variables are used to change the text to be "Hello abc def"
productId
The current product that is being viewed.