Skip to main content

customerPurchasedProducts

Returns the products one customer purchased, aggregated over its qualifying orders in the chosen date range, with a per-channel breakdown that adds up to each product's totals.

Business Rules​

  • The same orders qualify as for customerMetrics, and archived order lines are excluded.
  • Without date filters the range is the last twelve calendar months, unless allTime is true.
  • The per-channel split takes the same date range as its own argument. Passing a different one stops it from adding up to the product's totals.

Error Scenarios​

  • The customer does not exist.
  • createdOnOrAfter is not before createdBeforeDate.

Permissions Required​

  • customers:read_customer
customerPurchasedProducts(
after: String
before: String
customerId: ID!
filters: CustomerPurchasedProductFilterInput
first: Int
last: Int
): CustomerPurchasedProductConnection!

Arguments​

customerPurchasedProducts.after ● String scalar common​

Returns the elements in the list that come after the specified cursor.

customerPurchasedProducts.before ● String scalar common​

Returns the elements in the list that come before the specified cursor.

customerPurchasedProducts.customerId ● ID! non-null scalar common​

The customer to report on.

customerPurchasedProducts.filters ● CustomerPurchasedProductFilterInput input people​

Date range and sorting for the purchase history.

customerPurchasedProducts.first ● Int scalar common​

Returns the first _n_ elements from the list.

customerPurchasedProducts.last ● Int scalar common​

Returns the last _n_ elements from the list.

Type​

CustomerPurchasedProductConnection object common​

The connection type for CustomerPurchasedProduct.