appActivityCustomer
Requires permission analytics:sales:read.
App activity for one customer over a date range, for the customer drawer. A customer outside your book is refused with the same not-found a missing one gets. Needs the sales analytics read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query AppActivityCustomer($partnerId: ID!, $range: AnalyticsRangeInput!) {
appActivityCustomer(partnerId: $partnerId, range: $range) {
name
activeDays
appVersion
baseCurrency
cartAdds
lastActiveAt
buyingListNotOrdered {
listName
productName
variantName
at
count
productId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query AppActivityCustomer($partnerId: ID!, $range: AnalyticsRangeInput!) {\n appActivityCustomer(partnerId: $partnerId, range: $range) {\n name\n activeDays\n appVersion\n baseCurrency\n cartAdds\n lastActiveAt\n buyingListNotOrdered {\n listName\n productName\n variantName\n at\n count\n productId\n }\n }\n}",
"variables": {
"partnerId": "id",
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
}
EOF
Variables:
{
"partnerId": "id",
"range": {
"from": "2025-01-15T00:00:00Z",
"to": "2025-01-15T00:00:00Z"
}
}
Response:
{
"data": {
"appActivityCustomer": {
"name": "string",
"activeDays": 0,
"appVersion": "string",
"baseCurrency": "string",
"cartAdds": 0,
"lastActiveAt": "2025-01-15T00:00:00Z",
"buyingListNotOrdered": [
{
"listName": "string",
"productName": "string",
"variantName": "string",
"at": "2025-01-15T00:00:00Z",
"count": 0,
"productId": "id"
}
]
}
}
}
appActivityCustomer(
partnerId: ID!
range: AnalyticsRangeInput!
): AppActivityCustomerDetail!
Arguments
appActivityCustomer.partnerId ● ID! non-null scalar
The ID of the customer.
appActivityCustomer.range ● AnalyticsRangeInput! non-null input
The date range and, optionally, the visibility scope.
Type
AppActivityCustomerDetail object
One customer's activity in the period.