Analytics Annotation Mutations and Inventory Count Update

7/22/2026, 12:00:14 AM

Shopify now supports creating, updating and deleting analytics annotations, a new set of mutations that let apps mark events on shop analytics charts. Annotation creation requires a non‑null locationId for inventoryCountCreate, making the field mandatory. The new payload types expose detailed user errors, including LIMIT_REACHED for annotations and COMPARE_QUANTITY_STALE for inventory counts. Apps can query a shop’s annotations via the added analyticsAnnotations field, supporting pagination, sorting by date/time and filtering by title, type, source and date ranges. Annotation objects deliver metadata such as createdByApp, source (SHOPIFY or APP), and timestamps; app‑created annotations have 75‑character title and 150‑character description limits. The ShopifyqlQueryResponse type gained parseWarnings to surface non‑fatal parse messages without blocking results. All new objects, input types, and enums are documented and errors now return standardized codes like NOT_FOUND, INVALID, SHOPIFY_EMPLOYEE_IMPERSONATING.

Mutation Changes

➕ Added Mutations (3)

analyticsAnnotationCreate

Creates an analytics annotation
on the shop. Annotations are notable events that can be overlaid on analytics charts to provide context for
changes in metrics. The annotation is attributed to the app that calls the mutation.

Shopify limits how many annotations an app can have for a shop. If the app reaches this limit, then the
mutation returns a LIMIT_REACHED error. Delete existing annotations or contact Shopify Support to request
a higher limit.

Use analyticsAnnotationUpdate
to modify existing annotations or
analyticsAnnotationDelete
to remove them.

The type field must specify a supported type for app-created annotations. Refer to the list of
supported types.

analyticsAnnotationDelete

Deletes an analytics annotation.
An app can delete only annotations that it created. If an app attempts to delete an annotation that it
didn't create, then the mutation returns a NOT_FOUND error.
Use analyticsAnnotationCreate
to create a new annotation, or
analyticsAnnotationUpdate
to modify existing ones.

analyticsAnnotationUpdate

Updates an existing analytics annotation.
Only the fields provided in the input argument are modified; omitted fields remain unchanged.
Setting endedAt to null makes the annotation open-ended.

An app can update only annotations that it created. If an app attempts to update an annotation that it
didn't create, then the mutation returns a NOT_FOUND error.

Use analyticsAnnotationCreate
to create a new annotation, or
analyticsAnnotationDelete
to remove it.

If provided, the type field must specify a supported type for app-created annotations. Refer to the list of
supported types.

🔄 Modified Mutations (1)

inventoryCountCreate

Creates an inventory count for auditing and adjusting stock levels at a specific location.

Note:
This mutation is available only in the unstable API version and to development stores
that have enabled the Physical inventory feature preview.

~ Modified argument: locationId

Type Changes

➕ Added Types (16)

🏗️AnalyticsAnnotation➕ AddedOBJECT

An annotation for a notable event on a shop's analytics timeline.

Fields: createdAt, createdByApp, description, endedAt, id ... +5 more
🏗️AnalyticsAnnotationConnection➕ AddedOBJECT

An auto-generated type for paginating through multiple AnalyticsAnnotations.

Fields: edges, nodes, pageInfo
📥AnalyticsAnnotationCreateInput➕ AddedINPUT_OBJECT

The input fields for creating an analytics annotation.

🏗️AnalyticsAnnotationCreatePayload➕ AddedOBJECT

Return type for analyticsAnnotationCreate mutation.

Fields: analyticsAnnotation, userErrors
🏗️AnalyticsAnnotationCreateUserError➕ AddedOBJECT

An error that occurs during the execution of AnalyticsAnnotationCreate.

Fields: code, field, message
📋AnalyticsAnnotationCreateUserErrorCode➕ AddedENUM

Possible error codes that can be returned by AnalyticsAnnotationCreateUserError.

Values: LIMIT_REACHED, SHOPIFY_EMPLOYEE_IMPERSONATING, INVALID
🏗️AnalyticsAnnotationDeletePayload➕ AddedOBJECT

Return type for analyticsAnnotationDelete mutation.

Fields: deletedId, userErrors
🏗️AnalyticsAnnotationDeleteUserError➕ AddedOBJECT

An error that occurs during the execution of AnalyticsAnnotationDelete.

Fields: code, field, message
📋AnalyticsAnnotationDeleteUserErrorCode➕ AddedENUM

Possible error codes that can be returned by AnalyticsAnnotationDeleteUserError.

Values: NOT_FOUND, SHOPIFY_EMPLOYEE_IMPERSONATING, INVALID
🏗️AnalyticsAnnotationEdge➕ AddedOBJECT

An auto-generated type which holds one AnalyticsAnnotation and a cursor during pagination.

Fields: cursor, node
📋AnalyticsAnnotationSortKeys➕ AddedENUM

The set of valid sort keys for the AnalyticsAnnotation query.

Values: CREATED_AT, ENDED_AT, ID, STARTED_AT, UPDATED_AT
📋AnalyticsAnnotationSource➕ AddedENUM

Identifies who or what created an analytics annotation.

Values: SHOPIFY, APP
📥AnalyticsAnnotationUpdateInput➕ AddedINPUT_OBJECT

The input fields for updating an analytics annotation. Only the fields you provide are changed.

🏗️AnalyticsAnnotationUpdatePayload➕ AddedOBJECT

Return type for analyticsAnnotationUpdate mutation.

Fields: analyticsAnnotation, userErrors
🏗️AnalyticsAnnotationUpdateUserError➕ AddedOBJECT

An error that occurs during the execution of AnalyticsAnnotationUpdate.

Fields: code, field, message
📋AnalyticsAnnotationUpdateUserErrorCode➕ AddedENUM

Possible error codes that can be returned by AnalyticsAnnotationUpdateUserError.

Values: NOT_FOUND, SHOPIFY_EMPLOYEE_IMPERSONATING, INVALID

🔄 Modified Types (3)

🏗️InventoryCountCreateUserErrorCode🔄 Modified
Enum value added: COMPARE_QUANTITY_STALE
🏗️Shop🔄 Modified
Field added: analyticsAnnotations

Returns a paginated list of analytics annotations
for the shop, including Shopify-generated annotations and annotations created by any app. Annotations are
markers that can be overlaid on analytics charts to give merchants context for changes in their metrics.

Supports filtering by title, type, source, start date and time, end date and time, creation date and time, and
update date and time. Results can be sorted by ID or by any of the supported date and time fields. Use the
analyticsAnnotationCreate
mutation to add new app-created annotations.

🏗️ShopifyqlQueryResponse🔄 Modified
Field added: parseWarnings

A list of non-fatal parse warnings, such as use of a deprecated field. Unlike parseErrors, warnings are returned alongside results.