The Order Statistics enricher for SAP Hybris Profile is a lambda enricher that gathers metrics for customer orders throughout the lifetime of the customer with the tenant.
The enricher gathers the following metrics:
allOrdersValuesSum- The sum of the values of all purchased items. The sum does not include the discounts or shipping costs added to the order.
allOrdersCount- The total number of orders recorded for this customer; returns do not alter this number.
avgOrderValue- The average order value of the customer.
avgOrderValueAllCustomers- The average order value of all customers of a given tenant.
discountRatio- The ratio of
allOrdersValuesSum, this value changes only if the order receives a discount.
discountFrequency- The ratio between
allOrdersCount, this value changes only if the order receives a discount.
totalDiscountValue- The total value of discounts which the customer has received with the tenant, this value changes only if the order receives a discount. This value includes the shipping costs added to the order.
discountedOrders- The total number of orders in which the customer has received a discount, this value changes only if the order receives a discount.
The system adds the statistical information to the profile as
This enricher reacts to the context/commerce/OrderCreated schema.
The following events in the Context service trigger the Order Statistics enricher:
|Event||Triggering schema||Sample payload of a context event||Profile document before event||Event outcome in the profile document|
|OrderCreated||Sample payload||Sample profile before||Sample profile after|
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.