Bulk response inconsistent customer order list size

Funnel
Shopify Partner
14 0 6

The bulk request 'gid://shopify/BulkOperation/90690617457' returns a list of 3 orders under a specific customer.

Another bulk request 'gid://shopify/BulkOperation/90692386929' returns a list of 2 orders under the same customer. 

The customer, that gets different amount of orders back is 'gid://shopify/Customer/2012204859505'

The only difference is that the the dates on which we filter on, the first uses 2020-08-02 to 2020-08-02, the second is 2020-08-01 to 2020-08-02, which should have no effect on the orders under the customers. The query looks like this: 

 

mutation {
  bulkOperationRunQuery(
    query:"""
{
  orders(
    sortKey: CREATED_AT,
    query: "processed_at:>='2020-08-01' processed_at:<='2020-08-02' test:false"
  ) {
    edges {
      cursor
      node {
        name
        id
        processedAt
        cancelledAt
        cancelReason
        currencyCode
        discountCode
        fullyPaid
        publication {
          name
        }
        
            customer { id
                orders {
                    edges {
                        node {
                            processedAt
                            id
                        }
                    }
                }
            }
        customerJourney {
          customerOrderIndex
          daysToConversion
          firstVisit {
            referrerUrl
            source
            utmParameters {
              term
              medium
              source
              campaign
              content
            }
          }
          lastVisit {
            referrerUrl
            source
            utmParameters {
              term
              medium
              source
              campaign
              content
            }
          }
        }
        shippingAddress {
          country
          province
        }
        totalWeight
        totalShippingPriceSet {
          shopMoney {
            amount
          }
        }
        subtotalPriceSet {
            shopMoney {
                amount
            }
        }
        totalReceivedSet {
          shopMoney {
            amount
          }
        }
        totalPriceSet {
          shopMoney {
            amount
          }
        }
        netPaymentSet {
            shopMoney {
            amount
            }
        }
        totalTaxSet {
          shopMoney {
            amount
          }
        }
        cartDiscountAmountSet {
          shopMoney {
            amount
          }
        }
        lineItems {
        edges {
            node {
                id
            }
        }
       }
      }
    }
  }
}
    """
  ) {
    bulkOperation {
      id
      status
    }
    userErrors {
      field
      message
    }
  }
}

 

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 223

If you search under here I think there are a few posts where querying orders using date/time parameters can have mixed results. I thought it was more of a REST API issue than a GraphQL API issue, but your example might point to a more prevalent issue?

0 Likes