Skip to content

Activities

Returns a cursor-paginated page of a customer’s loyalty activities (their stamp ledger), newest first.

NameTypeRequiredDescription
customerIdID!YesThe Shopify customer ID.
limitIntNoPage size, 1–1000, default 20.
afterStringNoCursor for the next page.
hasCountBooleanNoSet true to include the total count (slower).

Returns a non-null ActivityConnection, which wraps the page’s items and its pageInfo.

FieldTypeDescription
items[Activity!]!The records for this page.
pageInfoPageInfo!Pagination metadata (see below).

Each item is an Activity:

FieldTypeDescription
idID!Unique identifier.
labelStringHuman-readable description of the activity.
stampChangeIntStamps added or removed (negative for deductions).
createdAtDateTimeISO-8601 timestamp.

The pageInfo field is a PageInfo:

FieldTypeDescription
hasNextBoolean!Whether another page follows.
hasPreviousBoolean!Whether a previous page exists.
nextCursorStringCursor to fetch the next page (pass as after).
previousCursorStringCursor for the previous page (pass as before).
countIntTotal matching records (only when hasCount: true, otherwise null).
query ($id: ID!) {
customerActivities(customerId: $id, limit: 20) {
items { id label stampChange createdAt }
pageInfo { hasNext nextCursor }
}
}
{
"data": {
"customerActivities": {
"items": [
{
"id": "98123",
"label": "Placed an order",
"stampChange": 3,
"createdAt": "2026-06-01T10:15:00Z"
}
],
"pageInfo": {
"hasNext": true,
"nextCursor": "eyJpZCI6OTgxMjN9"
}
}
}
}

Pass the returned nextCursor back as $after until hasNext is false.