CreateCheckout GraphQL success but no abandoned checkout in shopify store

CreateCheckout GraphQL success but no abandoned checkout in shopify store

Aagam_Jain
Shopify Partner
3 0 1

I am using the graphql 2023-01 latest version for creation of an abandoned checkout using graphql mutation query. I tried passing all the query variables but still no use. Here is a sample query that I have used - (Dummy values)

 

 

 

mutation {
  checkoutCreate (input: {
    allowPartialAddresses: true,
    buyerIdentity: {
      countryCode: IN,
    },
    email: "abcd@hotmail.com",
    lineItems: [
      {
        variantId: "gid://shopify/ProductVariant/123456789",
        quantity: 10
      }
    ],
    shippingAddress: {
        address1: "Test address",
        address2: "Bangalore",
        city: "Bangalore",
        phone: "9876543210",
        province: "Karnataka",
        zip: "560100",
        country: "India",
        firstName: "Manoj",
        lastName: "Kumar"
    }
  }, queueToken: "") 
  {
    queueToken,
    checkout{
        id,
        note,
        createdAt,
        customAttributes{
            key,
            value
        },
        webUrl,
        updatedAt,
        orderStatusUrl,
        buyerIdentity{
            countryCode
        },
        completedAt
    },
    checkoutUserErrors {
        code,
        field,
        message
    }
  }
}

 

 

 

 and I get a success response with all the variables I have added like this:

 

 

 

{
    "data": {
        "checkoutCreate": {
            "queueToken": null,
            "checkout": {
                "id": "gid://shopify/Checkout/123wef456wesf789we?key=93848587sdf984wt9897",
                "note": null,
                "createdAt": "2023-01-12T11:57:13Z",
                "customAttributes": [],
                "webUrl": "https://xyz.myshopify.com/61345595545/checkouts/123wef456wesf789we?key=93848587sdf984wt9897",
                "updatedAt": "2023-01-12T11:57:13Z",
                "orderStatusUrl": null,
                "buyerIdentity": {
                    "countryCode": "IN"
                },
                "completedAt": null
            },
            "checkoutUserErrors": []
        }
    }
}

 

 

 

 So how to make this work? I am not getting any kind of abandoned checkouts using this. Is there anything that I am missing or that I am doing wrong please let me know.

Replies 0 (0)