customerPurchasedProductChannels
Returns the sales channels one product was bought through by one customer, with the totals for each. Reads the same orders and lines as customerPurchasedProducts, so passing the same date range makes these totals add up to that product's row.
Business Rules
- The same orders qualify as for customerPurchasedProducts, and archived order lines are excluded.
- Without dates the range is the last twelve calendar months, unless allTime is true.
- One row per channel, so the result is bounded by the company's sales channels.
Error Scenarios
- The customer does not exist.
- createdOnOrAfter is not before createdBeforeDate.
Permissions Required
customers:read_customer
customerPurchasedProductChannels(
after: String
before: String
customerId: ID!
filters: CustomerPurchasedProductFilterInput
first: Int
last: Int
productId: ID!
): CustomerPurchasedProductChannelConnection!
Arguments
customerPurchasedProductChannels.after ● String scalar common
Returns the elements in the list that come after the specified cursor.
customerPurchasedProductChannels.before ● String scalar common
Returns the elements in the list that come before the specified cursor.
customerPurchasedProductChannels.customerId ● ID! non-null scalar common
The customer to report on.
customerPurchasedProductChannels.filters ● CustomerPurchasedProductFilterInput input people
customerPurchasedProductChannels.first ● Int scalar common
Returns the first _n_ elements from the list.
customerPurchasedProductChannels.last ● Int scalar common
Returns the last _n_ elements from the list.
customerPurchasedProductChannels.productId ● ID! non-null scalar common
The purchased product to split by channel.
Type
CustomerPurchasedProductChannelConnection object common
The connection type for CustomerPurchasedProductChannel.