younifyd
Menu

abandonedCheckouts

Returns a list of abandoned checkouts. A checkout is considered abandoned when a customer adds contact information but doesn't complete their purchase.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the abandonedCheckouts action (under Abandoned).
  3. Fill in the fields below, then reference the result from later steps as {{abandonedcheckouts.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query AbandonedCheckouts($first: Int, $after: String, $last: Int, $before: String, $reverse: Boolean, $sortKey: AbandonedCheckoutSortKeys, $query: String, $savedSearchId: ID) {
  abandonedCheckouts(
    first: $first
    after: $after
    last: $last
    before: $before
    reverse: $reverse
    sortKey: $sortKey
    query: $query
    savedSearchId: $savedSearchId
  ) {
    edges {
      cursor
      node {
        abandonedCheckoutUrl
        billingAddress
        completedAt
        createdAt
        customAttributes
        customer
        defaultCursor
        discountCodes
        id
        lineItemsQuantity
        name
        note
        shippingAddress
        subtotalPriceSet
        taxLines
        taxesIncluded
        totalDiscountSet
        totalDutiesSet
        totalLineItemsPriceSet
        totalPriceSet
        totalTaxSet
        updatedAt
      }
    }
    nodes {
      abandonedCheckoutUrl
      billingAddress {
        address1
        address2
        city
        company
        coordinatesValidated
        country
        countryCode
        countryCodeV2
        firstName
        formattedArea
        id
        lastName
        latitude
        longitude
        name
        phone
        province
        provinceCode
        timeZone
        validationResultSummary
        zip
      }
      completedAt
      createdAt
      customAttributes {
        key
        value
      }
      customer {
        amountSpent
        canDelete
        companyContactProfiles
        createdAt
        dataSaleOptOut
        defaultAddress
        defaultEmailAddress
        defaultPhoneNumber
        displayName
        email
        emailMarketingConsent
        firstName
        hasTimelineComment
        id
        identityProviderSubjects
        lastName
        lastOrder
        legacyResourceId
        lifetimeDuration
        locale
        market
        mergeable
        multipassIdentifier
        note
        numberOfOrders
        phone
        productSubscriberStatus
        smsMarketingConsent
        state
        statistics
        tags
        taxExempt
        taxExemptions
        taxSettings
        unsubscribeUrl
        updatedAt
        validEmailAddress
        verifiedEmail
      }
      defaultCursor
      discountCodes
      id
      lineItemsQuantity
      name
      note
      shippingAddress {
        address1
        address2
        city
        company
        coordinatesValidated
        country
        countryCode
        countryCodeV2
        firstName
        formattedArea
        id
        lastName
        latitude
        longitude
        name
        phone
        province
        provinceCode
        timeZone
        validationResultSummary
        zip
      }
      subtotalPriceSet {
        presentmentMoney
        shopMoney
      }
      taxLines {
        channelLiable
        price
        priceSet
        rate
        ratePercentage
        source
        title
      }
      taxesIncluded
      totalDiscountSet {
        presentmentMoney
        shopMoney
      }
      totalDutiesSet {
        presentmentMoney
        shopMoney
      }
      totalLineItemsPriceSet {
        presentmentMoney
        shopMoney
      }
      totalPriceSet {
        presentmentMoney
        shopMoney
      }
      totalTaxSet {
        presentmentMoney
        shopMoney
      }
      updatedAt
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

firstnumber

The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

afterstring

The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

lastnumber

The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

beforestring

The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

reverseboolean

Reverse the order of the underlying list.

sortKeystring

Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

One ofCHECKOUT_IDCREATED_ATCUSTOMER_NAMEIDRELEVANCETOTAL_PRICE

querystring

A filter made up of terms, connectives, modifiers, and comparators. | name | type | description | acceptable_values | default_value | example_use | | ---- | ---- | ---- | ---- | ---- | ---- | | default | string | Filter by a case-insensitive search of multiple fields in a document. | | | - `query=Bob Norman`<br/> - `query=title:green hoodie` | | created_at | time | The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was created. | | email_state | string | Filter by `abandoned_email_state` value. Possible values: `sent`, `not_sent`, `scheduled` and `suppressed`. | | id | id | Filter by `id` range. | | | - `id:1234`<br/> - `id:>=1234`<br/> - `id:<=1234` | | recovery_state | string | Possible values: `recovered` and `not_recovered`. | | status | string | Possible values: `open` and `closed`. | | updated_at | time | The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) when the abandoned cart was last updated. | You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).

savedSearchIdstring

The ID of a [saved search](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch#field-id). The search’s query string is used as the query argument.

json
{
  "first": 0,
  "after": "string",
  "last": 0,
  "before": "string",
  "reverse": false,
  "sortKey": "CHECKOUT_ID",
  "query": "string",
  "savedSearchId": "string"
}

Response

Read the result with {{abandonedcheckouts.response.data.data.abandonedCheckouts}}. If the API returns errors, the step fails and they are at {{abandonedcheckouts.response.data.errors}}.

edgesarray<object>
cursorobject
nodeobject
nodesarray<object>
abandonedCheckoutUrlobject
billingAddressobject
completedAtobject
createdAtobject
customAttributesobject
customerobject
defaultCursorobject
discountCodesobject
idobject
lineItemsQuantityobject
nameobject
noteobject
shippingAddressobject
subtotalPriceSetobject
taxLinesobject
taxesIncludedobject
totalDiscountSetobject
totalDutiesSetobject
totalLineItemsPriceSetobject
totalPriceSetobject
totalTaxSetobject
updatedAtobject
pageInfoobject
endCursorstring
hasNextPageboolean
hasPreviousPageboolean
startCursorstring

Need more? See the Shopify guide for connection setup and behaviour shared by every action.

Was this page helpful?