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 | Description |
|---|---|
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. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| 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. |
getCreationDate, getLastModified, getUUID
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
- avgOrderValue: Number
(read-only) Returns the average order value of the customer, or
nullif 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
nullif 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
nullif 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
nullif 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
nullif 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
nullif there are no orders for the customer.
- orderValue: Number
(read-only) Returns the lifetime order value of the customer, or
nullif 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
nullif none has been set or the value is no longer valid.
- orders: Number
(read-only) Returns the orders of the customer, or
nullif 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. 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: 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: 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: 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: Number
(read-only) Returns the returned revenue of the customer, or
nullif none has been set or the value is no longer valid.
- returns: Number
(read-only) Returns the number of returns of the customer, or
nullif 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
nullif 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. The top category is the one for which the most orders for the customer contained at least one product found in that category.
- visitsMonth: Number
(read-only) Returns the visits of the customer, over the most recent 30 days, or
nullif 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
nullif 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
nullif none has been set or the value is no longer valid.
- getAvgOrderValue(): Number
Returns the average order value of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the average order size.
- getDiscountValueWithCoupon(): Number
Returns the discount value resulting from coupons, that has been applied to orders of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the discount value resulting from coupons.
- getDiscountValueWithoutCoupon(): Number
Returns the discount value resulting from promotions other than coupons, that has been applied to orders of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the discount value resulting from promotions other than coupons.
- getGiftOrders(): Number
Returns the number of orders for the Customer that contained at least one product unit marked as a gift, or
nullif none has been set or the value is no longer valid.Returns:
- the number of gift orders.
- getGiftUnits(): Number
Returns the number of product units in orders for the customer that were marked as a gift, or
nullif none has been set or the value is no longer valid.Returns:
- the number of gift product units.
- getLastOrderDate(): Date
Returns the date of the last order for the customer, or
nullif there are no orders for the customer.Returns:
- the date of the last order for the customer.
- getOrderValue(): Number
Returns the lifetime order value of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the lifetime value.
- getOrderValueMonth(): Number
Returns the order value of the customer, over the most recent 30 days, or
nullif none has been set or the value is no longer valid.Returns:
- the value over the last 30 days.
- getOrders(): Number
Returns the orders of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the orders.
- 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(): 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(): 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(): 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(): Number
Returns the returned revenue of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the returned revenue.
- getReturns(): Number
Returns the number of returns of the customer, or
nullif none has been set or the value is no longer valid.Returns:
- the returns.
- getSourceCodeOrders(): Number
Returns the number of orders for the customer where a source code was in effect, or
nullif none has been set or the value is no longer valid.Returns:
- the number of orders with source codes in effect.
- 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(): Number
Returns the visits of the customer, over the most recent 30 days, or
nullif none has been set or the value is no longer valid.Returns:
- the visits over the last 30 days.
- getVisitsWeek(): Number
Returns the visits of the customer, over the most recent 7 days, or
nullif none has been set or the value is no longer valid.Returns:
- the visits over the last 7 days.
- getVisitsYear(): Number
Returns the visits of the customer, over the most recent 365 days, or
nullif none has been set or the value is no longer valid.Returns:
- the visits over the last 365 days.