Interaction Definitions
The Salesforce Interactions SDK provides interactions names used to identify certain user interactions related to Catalog
, cart
, and order
objects.
Interactions contain a reserved name
property and value that Personalization uses to determine how to treat event data.
The Interactions documented in this article are available exclusively in the SalesforceInteractions
namespace. In the Evergage
namespace, Interactions are called Item Actions. For more information, refer to the Item Actions documentation.
An example of an event sent using the API within the Sitemap can be found in our Example ecommerce Sitemap within the "product_detail"
pageType configuration. The following code sample includes the relevant code block. In this example, a listener has been mapped containing an AddToCart
event that fires when the user clicks the DOM element referenced by the provided selector, ".add-to-cart"
.
When tracking Catalog Object Interactions, Cart Interactions, or Order Interactions, you have to reference all values assigned to the interaction.name
property from the SalesforceInteractions
object. The SalesforceInteractions
namespace provides the following objects.
SalesforceInteractions.CatalogObjectInteractionName
SalesforceInteractions.CartInteractionName
SalesforceInteractions.OrderInteractionName
SalesforceInteractions.CatalogObjectInteractionName.QuickViewCatalogObject
- Similar toCatalogObjectInteractionName.ViewCatalogObject
but stops the timer for the "background" item and starts a timer for the "foreground" item.SalesforceInteractions.mcis.CatalogObjectInteractionName.StopQuickViewCatalogObject
- Stops the timer initiated by the "Quick View Item" interaction for the "foreground" item and restarts the timer for the "background" item.
QuickViewCatalogObject
and StopQuickViewCatalogObject
are used to accurately track view time in cases where a user "views" an item while already viewing a different item. An ecommerce category page that allows users to view individual products in a window can take advantage of these interactions. In the following example, the "background" item is the category and the "foreground" item is the product. A new page load stops both timers.
Only the interactions
documented here are currently supported. Unless otherwise indicated, the following definitions apply to both the page config and Event API.
CatalogObjectInteraction
View Catalog Object
View Catalog Object Detail
Share
Comment
Favorite
Quick View Catalog Object
CartInteraction
Add To Cart
Replace Cart
Remove From Cart
OrderInteraction
Personalization accepts OrderInteractions other than the Purchase OrderInteraction but only the Purchase OrderInteraction updates a user's order in Personalization.