The Commerce elements in a marketing automation campaign
This topic describes the Commerce elements available for Commerce marketing automation campaigns with a focus on:
-
Marketing actions
-
Listeners
-
Decision points
Listeners and Decision points use the rules and conditions that you define in the Rule Editor.
Marketing actions
Marketing actions are elements that you can use to, for example, to make changes to the information that is stored about a contact in the Experience Database (xDB). You can also use marketing actions to trigger an event or send a Commerce email message.
Raise abandoned cart event
Use the Raise abandoned cart event action to trigger the abandoned cart event when the customer has abandoned the shopping cart without making a purchase.
There is no configuration necessary for this action.
Send commerce email
The Send commerce email marketing action differs from the standard Send email action because it includes custom values associated with the contact in the MA campaign and passes them onto EXM as custom values. For example, shopping cart information is included as custom values in the marketing automation campaign when the customer is enrolled in the campaign and is passed to EXM when it is time to send the email message.
The action is based on a provider implementation and an interface that must be implemented for the specific scenario. By default, two provider implementations are included and, depending on the campaign, the provider passes on the following custom values:
-
The shop name and Cart ID are passed to EXM in the Abandoned Cart marketing automation campaign where the page that renders the body of the email message content can call the Commerce Engine and retrieve the cart and render the content.
-
The shop name and Order ID are passed to EXM in the New Order Placed campaign where the page that renders the body of the email message can call the Commerce Engine and retrieve the order and render the content.
Email Experience Manager adds the custom values to the email message it sends by way of the Message Bus to its mail service. When the email message is being processed, the values are included as query parameters to the page that generates the content for the body of the email message so it can consume data while the page is being rendering.
When you configure the Send commerce email action, you can only select automated email campaigns.
Do not use the Send email action in place of the Send commerce email action. When you use the Send email action the rendered email message body is missing content because there are no custom values.
Listeners
Listeners are elements that you can use to listen for specific actions. This can be, for example, an action completed by a contact such as purchasing a specific product or adding items to the shopping cart. You can also use a Listener to trigger an event based on a specific date such as the contact's birthday. And, you can also use a Listener to verify the state of data that has been updated by third-party systems such as checking to see if a product is back in stock.
Check cart activity
This custom Listener includes a rule with the condition where the contact's cart has been manipulated
. When the shopper adds, removes, or updates items in the cart, these events are recorded. When any cart activity event has been recorded, the result is true; otherwise, it is false. The condition is time-scoped to only look at cart activity starting when the contact was enrolled into the marketing automation campaign or re-entered the campaign when using the Return to start action.
Decision points
Decision point elements evaluate a rule to determine the path in the marketing automation campaign that the contact should continue along. Commerce marketing automation campaigns include one Commerce-specific decision point Is the Contact Cart Empty
, which contains the rule where the contact's cart is empty
.
where the contact's cart is empty
To determine the state of a shopper's cart, Sitecore processes the condition using the CartEmptyCondition
and does the following:
-
Examines the shopper's interaction history recorded in xDB through xConnect looking for any one of four events (Add item, Remove item, update item, and complete purchase).
-
Determines if the last event in the shopper's interaction history is the Complete purchase event, which is triggered when the shopper has completed the purchase payment. If the last event is Complete purchase then all the items in the cart are removed, the Is the
Contact Cart Empty
condition is set to True and the contact proceeds along the Yes path. If the last event is not a Complete purchase event, Sitecore examines the shopper's cart looking for products that have not yet been purchased and the contact proceeds along the No path.
the contact has an email
To determine if the contact has a valid email address, this decision point:
-
Examines the
EmailAddressList
facet for the contact. -
Determines if the preferred email is set and if the email address is valid and can be resolved (SMTPAddress).