Class CustomerActiveData

Represents the active data for a Customer in Commerce Cloud Digital.

Note: this class allows access to sensitive personal and private information. Pay attention to appropriate legal and regulatory requirements when developing.

Property Summary 

PropertyDescription
avgOrderValue: Number (read-only)Returns the average order value of the customer, or null if none has been set or the value is no longer valid.
discountValueWithCoupon: Number (read-only)Returns the discount value resulting from coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.
discountValueWithoutCoupon: Number (read-only)Returns the discount value resulting from promotions other than coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.
giftOrders: Number (read-only)Returns the number of orders for the Customer that contained at least one product unit marked as a gift, or null if none has been set or the value is no longer valid.
giftUnits: Number (read-only)Returns the number of product units in orders for the customer that were marked as a gift, or null if none has been set or the value is no longer valid.
lastOrderDate: Date (read-only)Returns the date of the last order for the customer, or null if there are no orders for the customer.
orderValue: Number (read-only)Returns the lifetime order value of the customer, or null if none has been set or the value is no longer valid.
orderValueMonth: Number (read-only)Returns the order value of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.
orders: Number (read-only)Returns the orders of the customer, or null if none has been set or the value is no longer valid.
productMastersOrdered: String[] (read-only)Returns an array containing the master product SKUs of variation products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid.
productsAbandonedMonth: String[] (read-only)Returns an array containing the SKUs of products in baskets abandoned by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid.
productsOrdered: String[] (read-only)Returns an array containing the SKUs of products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid.
productsViewedMonth: String[] (read-only)Returns an array containing the SKUs of products viewed by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid.
returnValue: Number (read-only)Returns the returned revenue of the customer, or null if none has been set or the value is no longer valid.
returns: Number (read-only)Returns the number of returns of the customer, or null if none has been set or the value is no longer valid.
sourceCodeOrders: Number (read-only)Returns the number of orders for the customer where a source code was in effect, or null if none has been set or the value is no longer valid.
topCategoriesOrdered: String[] (read-only)Returns an array containing the IDs of up to the top 20 categories for customer orders, or an empty list if no categories have been set or the list of categories is no longer valid.
visitsMonth: Number (read-only)Returns the visits of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.
visitsWeek: Number (read-only)Returns the visits of the customer, over the most recent 7 days, or null if none has been set or the value is no longer valid.
visitsYear: Number (read-only)Returns the visits of the customer, over the most recent 365 days, or null if none has been set or the value is no longer valid.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
getAvgOrderValue()Returns the average order value of the customer, or null if none has been set or the value is no longer valid.
getDiscountValueWithCoupon()Returns the discount value resulting from coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.
getDiscountValueWithoutCoupon()Returns the discount value resulting from promotions other than coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.
getGiftOrders()Returns the number of orders for the Customer that contained at least one product unit marked as a gift, or null if none has been set or the value is no longer valid.
getGiftUnits()Returns the number of product units in orders for the customer that were marked as a gift, or null if none has been set or the value is no longer valid.
getLastOrderDate()Returns the date of the last order for the customer, or null if there are no orders for the customer.
getOrderValue()Returns the lifetime order value of the customer, or null if none has been set or the value is no longer valid.
getOrderValueMonth()Returns the order value of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.
getOrders()Returns the orders of the customer, or null if none has been set or the value is no longer valid.
getProductMastersOrdered()Returns an array containing the master product SKUs of variation products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid.
getProductsAbandonedMonth()Returns an array containing the SKUs of products in baskets abandoned by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid.
getProductsOrdered()Returns an array containing the SKUs of products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid.
getProductsViewedMonth()Returns an array containing the SKUs of products viewed by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid.
getReturnValue()Returns the returned revenue of the customer, or null if none has been set or the value is no longer valid.
getReturns()Returns the number of returns of the customer, or null if none has been set or the value is no longer valid.
getSourceCodeOrders()Returns the number of orders for the customer where a source code was in effect, or null if none has been set or the value is no longer valid.
getTopCategoriesOrdered()Returns an array containing the IDs of up to the top 20 categories for customer orders, or an empty list if no categories have been set or the list of categories is no longer valid.
getVisitsMonth()Returns the visits of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.
getVisitsWeek()Returns the visits of the customer, over the most recent 7 days, or null if none has been set or the value is no longer valid.
getVisitsYear()Returns the visits of the customer, over the most recent 365 days, or null if none has been set or the value is no longer valid.

Methods inherited from class ActiveData 

getCustom, isEmpty

Methods inherited from class ExtensibleObject 

describe, getCustom

Methods inherited from class PersistentObject 

getCreationDate, getLastModified, getUUID

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

avgOrderValue 

avgOrderValue: Number (read-only)

Returns the average order value of the customer, or null if none has been set or the value is no longer valid.


discountValueWithCoupon 

discountValueWithCoupon: Number (read-only)

Returns the discount value resulting from coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.


discountValueWithoutCoupon 

discountValueWithoutCoupon: Number (read-only)

Returns the discount value resulting from promotions other than coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.


giftOrders 

giftOrders: Number (read-only)

Returns the number of orders for the Customer that contained at least one product unit marked as a gift, or null if none has been set or the value is no longer valid.


giftUnits 

giftUnits: Number (read-only)

Returns the number of product units in orders for the customer that were marked as a gift, or null if none has been set or the value is no longer valid.


lastOrderDate 

lastOrderDate: Date (read-only)

Returns the date of the last order for the customer, or null if there are no orders for the customer.


orderValue 

orderValue: Number (read-only)

Returns the lifetime order value of the customer, or null if none has been set or the value is no longer valid.


orderValueMonth 

orderValueMonth: Number (read-only)

Returns the order value of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.


orders 

orders: Number (read-only)

Returns the orders of the customer, or null if none has been set or the value is no longer valid.


productMastersOrdered 

productMastersOrdered: String[] (read-only)

Returns an array containing the master product SKUs of variation products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products ordered by the customer.


productsAbandonedMonth 

productsAbandonedMonth: String[] (read-only)

Returns an array containing the SKUs of products in baskets abandoned by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products in baskets abandoned by the customer.


productsOrdered 

productsOrdered: String[] (read-only)

Returns an array containing the SKUs of products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products ordered by the customer.


productsViewedMonth 

productsViewedMonth: String[] (read-only)

Returns an array containing the SKUs of products viewed by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products viewed by the customer.


returnValue 

returnValue: Number (read-only)

Returns the returned revenue of the customer, or null if none has been set or the value is no longer valid.


returns 

returns: Number (read-only)

Returns the number of returns of the customer, or null if none has been set or the value is no longer valid.


sourceCodeOrders 

sourceCodeOrders: Number (read-only)

Returns the number of orders for the customer where a source code was in effect, or null if none has been set or the value is no longer valid.


topCategoriesOrdered 

topCategoriesOrdered: String[] (read-only)

Returns an array containing the IDs of up to the top 20 categories for customer orders, or an empty list if no categories have been set or the list of categories is no longer valid. The top category is the one for which the most orders for the customer contained at least one product found in that category.


visitsMonth 

visitsMonth: Number (read-only)

Returns the visits of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.


visitsWeek 

visitsWeek: Number (read-only)

Returns the visits of the customer, over the most recent 7 days, or null if none has been set or the value is no longer valid.


visitsYear 

visitsYear: Number (read-only)

Returns the visits of the customer, over the most recent 365 days, or null if none has been set or the value is no longer valid.


Method Details 

getAvgOrderValue() 

getAvgOrderValue(): Number

Returns the average order value of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the average order size.

getDiscountValueWithCoupon() 

getDiscountValueWithCoupon(): Number

Returns the discount value resulting from coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the discount value resulting from coupons.

getDiscountValueWithoutCoupon() 

getDiscountValueWithoutCoupon(): Number

Returns the discount value resulting from promotions other than coupons, that has been applied to orders of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the discount value resulting from promotions other than coupons.

getGiftOrders() 

getGiftOrders(): Number

Returns the number of orders for the Customer that contained at least one product unit marked as a gift, or null if none has been set or the value is no longer valid.

Returns:

  • the number of gift orders.

getGiftUnits() 

getGiftUnits(): Number

Returns the number of product units in orders for the customer that were marked as a gift, or null if none has been set or the value is no longer valid.

Returns:

  • the number of gift product units.

getLastOrderDate() 

getLastOrderDate(): Date

Returns the date of the last order for the customer, or null if there are no orders for the customer.

Returns:

  • the date of the last order for the customer.

getOrderValue() 

getOrderValue(): Number

Returns the lifetime order value of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the lifetime value.

getOrderValueMonth() 

getOrderValueMonth(): Number

Returns the order value of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.

Returns:

  • the value over the last 30 days.

getOrders() 

getOrders(): Number

Returns the orders of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the orders.

getProductMastersOrdered() 

getProductMastersOrdered(): String[]

Returns an array containing the master product SKUs of variation products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products ordered by the customer.

Returns:

  • a collection containing the master product SKUs of variation products that were ordered.

getProductsAbandonedMonth() 

getProductsAbandonedMonth(): String[]

Returns an array containing the SKUs of products in baskets abandoned by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products in baskets abandoned by the customer.

Returns:

  • a collection containing the SKUs of products that were abandoned.

getProductsOrdered() 

getProductsOrdered(): String[]

Returns an array containing the SKUs of products in orders for the customer, or an empty collection if no SKUs have been set or the collection of SKUs is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products ordered by the customer.

Returns:

  • a collection containing the SKUs of products that were ordered.

getProductsViewedMonth() 

getProductsViewedMonth(): String[]

Returns an array containing the SKUs of products viewed by the customer in the last 30 days, or an empty collection if no SKUs have been set or the collection is no longer valid. There is no specific limit on the number of SKUs that will be returned in the collection, but there is also no guarantee that it will contain the SKUs for all products viewed by the customer.

Returns:

  • a collection containing the SKUs of products that were ordered.

getReturnValue() 

getReturnValue(): Number

Returns the returned revenue of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the returned revenue.

getReturns() 

getReturns(): Number

Returns the number of returns of the customer, or null if none has been set or the value is no longer valid.

Returns:

  • the returns.

getSourceCodeOrders() 

getSourceCodeOrders(): Number

Returns the number of orders for the customer where a source code was in effect, or null if none has been set or the value is no longer valid.

Returns:

  • the number of orders with source codes in effect.

getTopCategoriesOrdered() 

getTopCategoriesOrdered(): String[]

Returns an array containing the IDs of up to the top 20 categories for customer orders, or an empty list if no categories have been set or the list of categories is no longer valid. The top category is the one for which the most orders for the customer contained at least one product found in that category.

Returns:

  • a list containing the top 20 categories.

getVisitsMonth() 

getVisitsMonth(): Number

Returns the visits of the customer, over the most recent 30 days, or null if none has been set or the value is no longer valid.

Returns:

  • the visits over the last 30 days.

getVisitsWeek() 

getVisitsWeek(): Number

Returns the visits of the customer, over the most recent 7 days, or null if none has been set or the value is no longer valid.

Returns:

  • the visits over the last 7 days.

getVisitsYear() 

getVisitsYear(): Number

Returns the visits of the customer, over the most recent 365 days, or null if none has been set or the value is no longer valid.

Returns:

  • the visits over the last 365 days.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!