Experience Profile Commerce tab - the underlying technology

Current version: 8.2

The reports that are displayed on the XProfile Commerce tab come with Sitecore Commerce Connect. For more information about installing the Commerce Connect package, see http://dev.sitecore.net.

The reports support the full Sitecore topology in scaled environments, such as cloud deployments, with separate CD, CM, processing, and reporting server roles where xDB queries are performed by the Reporting Service server role. For standalone deployments, everything is included in the core Commerce Connect package.

This topic describes some of the technology and concepts behind these reports:

The underlying data

The underlying data used for the reports comes from the page events, goals and outcomes that are triggered by Commerce Connect when a customer visits the storefront.

All the standard reports are independent of the external commerce system that is being used as they are based on and require that the standard Connect entities are present.

Commerce Connect comes with domain models for each of the service layers and for the Product Purchase and Abandoned Cart outcomes, the full order and cart domain objects are stored in their respective outcomes. Similar objects are persisted for goals and page events.

The following table contains an overview of the reports and where the underlying data comes from:

Report

Outcomes

Page events

Goals

Overview

Abandoned Cart

Visitor Order Created

Orders

Product Purchase

Orders/Order details

Product Purchase

Products/Products viewed

Visited Product Details Page

Products/Products added to cart

Lines Added To Cart

Products/Products purchased

Visitor Order Created

Missed sales opportunities

Visited Product Details Page,

Lines Added To Cart

Visitor Order Created

Abandoned carts

Abandoned Cart

Abandoned carts/Cart details

Abandoned Cart

Shopping cart activity/Cart lines removed

Lines Removed From Cart

Shopping cart activity/Cart lines added

Lines Added To Cart

Shopping cart activity/Cart lines updated

Lines Updated On Cart

Abandoned carts

Note

In Commerce Connect 9.0.2, the Abandoned Cart marketing campaign does not trigger the Abandoned Carts outcome. Therefore the Abandoned Carts report does not show any data.

The Product Purchase outcome is part of the Experience Platform while the Abandoned Cart outcome is defined in Sitecore Commerce Connect. The monetary value associated with all outcomes contains a negative value equal to the cart total for abandoned carts to indicate the missed sales opportunity.

Abandoned Cart outcomes are triggered by the Abandoned Carts engagement plan and the Trigger Abandoned Cart Outcome action by default. The Abandoned Carts engagement plan comes with Commerce Connect:

Custom domain model objects

Commerce 8.1 introduced AnalyticsData entities for every page event, goal and outcome that is triggered. This encapsulates the analytics data and makes an abstraction that is persisted and defines how to persist and retrieve the data. The AnalyticsData entities are used on both the tracking side, for examples, in the Connect API and on the reporting side.

You can create custom reports and modify the existing reports by adding custom data that is only available in customized versions of the Connect domain model objects that are used in the individual connectors for the specific external commerce systems. Only the standard Connect entities are tracked and persisted in xDB by default, but both standard and custom entities/objects can be persisted in xDB for extensibility purposes. If your solution is integrated with a commerce system like Experience Commerce 9 where extended domain models are in use, the objects are mapped back to the standard Connect entities and thereby stripped of all the custom values including properties.

Note

Before you can de-serialize an object, the object type must be registered in xDB. This can be a limitation because the Reporting Service server role cannot by default be updated with custom types in certain scenarios. For instance, on Azure, the ARM templates would have to be extended with additional custom WDPs that contain definitions of the custom object types.

The /App_Config/Include/Sitecore.Commerce.config configuration file contains the following setting:

RequestResponse
<setting name="Commerce.Analytics.EntitiesIncludedInXDB" value="Base"/>

This setting determines if the standard Connect objects, custom objects, or both standard and custom objects are persisted in xDB.

The setting takes three values:

  • Base

    The default value

  • Custom

  • Both

Note

The standard reports require that the standard Connect entities are present for the values Base or Both to work. Setting this value to Both requires more storage space in xDB.

The currency converter

The Commerce Experience Profile reports passes monetary values through a currency converter before it displays these values. The currency converter is responsible for converting the monetary values into the correct currency for the report. If your commerce site uses multiple currencies, you must implement a currency converter because the default version just returns the original value. If you do not do this, the reports will not be correct.

Note

In a distributed environment, the code and configuration will be on the content management (CM) server and the converter is called before the reporting values are returned to the UI.

Method parameter

Description

amount

Amount to be converted.

amountCurrency

Currency of the current transaction.

requiredCurrency

Currency to convert to.

To create a new currency converter, simply create a class that derives from ICurrencyConverter and implement the Convert method and change the configuration. The following configuration is defined in the Sitecore.Commerce.ExperienceProfile.config file:

RequestResponse
<settings>
    <setting name="Commerce.ExperienceProfile.ReportingCurrencyCode" value="USD"/>
</settings>

That defines the reporting currency.

To identify the implementation of the currency converter that Sitecore calls before returning the monetary values the UI:

RequestResponse
<commerce-experienceprofile>
    <currencyConverter
   type="Sitecore.Commerce.ExperienceProfile.Currency.DefaultCurrencyConverter, 
    Sitecore.Commerce.ExperienceProfile" />
 </commerce-experienceprofile>

Do you have some feedback for us?

If you have suggestions for improving this article,