--- title: Abandonment - GraphQL Admin description: >- Tracks a [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s incomplete shopping journey, whether they abandoned while browsing [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), adding items to cart, or during checkout. Provides data about the customer's behavior and products they interacted with. The abandonment includes fields that indicate whether the customer has completed any [orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) or [draft orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) after the abandonment occurred. It also tracks when emails were sent and how long since the customer's last activity across different abandonment types. api_version: 2025-01 api_name: admin type: object api_type: graphql source_url: html: 'https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Abandonment' md: 'https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Abandonment.md' --- # Abandonment object Tracks a [customer](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer)'s incomplete shopping journey, whether they abandoned while browsing [products](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product), adding items to cart, or during checkout. Provides data about the customer's behavior and products they interacted with. The abandonment includes fields that indicate whether the customer has completed any [orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/Order) or [draft orders](https://shopify.dev/docs/api/admin-graphql/latest/objects/DraftOrder) after the abandonment occurred. It also tracks when emails were sent and how long since the customer's last activity across different abandonment types. ## Fields * abandoned​Checkout​Payload [Abandoned​Checkout](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/AbandonedCheckout) The abandonment payload for the abandoned checkout. * abandonment​Type [Abandonment​Abandonment​Type!](https://shopify.dev/docs/api/admin-graphql/2025-01/enums/AbandonmentAbandonmentType) non-null The abandonment type. * app [App!](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/App) non-null The app associated with an abandoned checkout. * cart​Url [URL](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/URL) Permalink to the cart page. * created​At [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) non-null The date and time when the abandonment was created. * customer [Customer!](https://shopify.dev/docs/api/admin-graphql/2025-01/objects/Customer) non-null The customer who abandoned this event. * customer​Has​No​Draft​Order​Since​Abandonment [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the customer has a draft order since this abandonment has been abandoned. * customer​Has​No​Order​Since​Abandonment [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the customer has completed an order since this checkout has been abandoned. * days​Since​Last​Abandonment​Email [Int!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Int) non-null The number of days since the last abandonment email was sent to the customer. * email​Sent​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) When the email was sent, if that's the case. * email​State [Abandonment​Email​State](https://shopify.dev/docs/api/admin-graphql/2025-01/enums/AbandonmentEmailState) The email state (e.g., sent or not sent). * hours​Since​Last​Abandoned​Checkout [Float](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Float) The number of hours since the customer has last abandoned a checkout. * id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) non-null A globally-unique ID. * inventory​Available [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the products in abandonment are available. * is​From​Custom​Storefront [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the abandonment event comes from a custom storefront channel. * is​From​Online​Store [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the abandonment event comes from the Online Store sales channel. * is​From​Shop​App [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the abandonment event comes from the Shop app sales channel. * is​From​Shop​Pay [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the abandonment event comes from Shop Pay. * is​Most​Significant​Abandonment [Boolean!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) non-null Whether the customer didn't complete another most significant step since this abandonment. * last​Browse​Abandonment​Date [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) non-null The date for the latest browse abandonment. * last​Cart​Abandonment​Date [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) non-null The date for the latest cart abandonment. * last​Checkout​Abandonment​Date [Date​Time!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) non-null The date for the latest checkout abandonment. * most​Recent​Step [Abandonment​Abandonment​Type!](https://shopify.dev/docs/api/admin-graphql/2025-01/enums/AbandonmentAbandonmentType) non-null The most recent step type. * products​Added​To​Cart [Customer​Visit​Product​Info​Connection!](https://shopify.dev/docs/api/admin-graphql/2025-01/connections/CustomerVisitProductInfoConnection) non-null The products added to the cart during the customer abandoned visit. * first [Int](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * products​Viewed [Customer​Visit​Product​Info​Connection!](https://shopify.dev/docs/api/admin-graphql/2025-01/connections/CustomerVisitProductInfoConnection) non-null The products viewed during the customer abandoned visit. * first [Int](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Int) ### Arguments The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * after [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * last [Int](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Int) The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql). * before [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql). * reverse [Boolean](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * visit​Started​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) The date and time when the visit started. *** ## Map No referencing types *** ## Queries * [abandonment](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/abandonment) query Returns a `Abandonment` resource by ID. * id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) required ### Arguments The ID of the `Abandonment` to return. *** * [abandonment​By​Abandoned​Checkout​Id](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/abandonmentByAbandonedCheckoutId) query Returns an Abandonment by the Abandoned Checkout ID. * abandoned​Checkout​Id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) required ### Arguments The ID of the Abandoned Checkout ID to query by. *** *** ## \Abandonment Queries ### Queried by * \[abandonment](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/abandonment) * \[abandonment​By​Abandoned​Checkout​Id](https://shopify.dev/docs/api/admin-graphql/2025-01/queries/abandonmentByAbandonedCheckoutId) *** ## Mutations * [abandonment​Update​Activities​Delivery​Statuses](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/abandonmentUpdateActivitiesDeliveryStatuses) mutation Updates the marketing activities delivery statuses for an abandonment. * abandonment​Id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) required ### Arguments The ID of the abandonment that needs to be updated. * marketing​Activity​Id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) required The ID of the marketing activity that needs to be updated. * delivery​Status [Abandonment​Delivery​State!](https://shopify.dev/docs/api/admin-graphql/2025-01/enums/AbandonmentDeliveryState) required The new delivery status of the marketing activity for this abandonment. * delivered​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) The delivery timestamp if the activity delivered. * delivery​Status​Change​Reason [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The reason why the activity was or was not delivered. *** * [abandonment​Email​State​Update](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/abandonmentEmailStateUpdate) mutation Deprecated * id [ID!](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/ID) required ### Arguments The ID of the abandonment that needs to be updated. * email​State [Abandonment​Email​State!](https://shopify.dev/docs/api/admin-graphql/2025-01/enums/AbandonmentEmailState) required The new email state of the abandonment. * email​Sent​At [Date​Time](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/DateTime) The date and time for when the email was sent, if that is the case. * email​State​Change​Reason [String](https://shopify.dev/docs/api/admin-graphql/2025-01/scalars/String) The reason why the email was or was not sent. *** *** ## <\~> Abandonment Mutations ### Mutated by * <\~>[abandonment​Update​Activities​Delivery​Statuses](https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/abandonmentUpdateActivitiesDeliveryStatuses) *** ## Interfaces * [Node](https://shopify.dev/docs/api/admin-graphql/2025-01/interfaces/Node) interface *** ## ||-Abandonment Implements ### Implements * ||-[Node](https://shopify.dev/docs/api/admin-graphql/2025-01/interfaces/Node)