Field customerJourneySummary doesn't exist on type Order - GraphQL API

Hi everyone,

When I ran the following query, Shopify response an error with message “Field customerJourneySummary doesn’t exist on type Order” but in the API document there is a customerJourneySummary field for the Order object.

I cant figure out why this is happened, please tell me where the problem is.

Thank you for your support!

Query:

graphQLquery = """
            query ($orderID: ID!){
                order(id: $orderID) {
                    id
                    customerJourneySummary {
                        firstVisit {
                            landingPage 
                            referrerUrl 
                            source 
                            sourceType 
                        }
                        lastVisit {
                            landingPage 
                            referrerUrl 
                            source 
                            sourceType 
                        }
                        ready 
                    }
                }
            }
        """

Response text:

{
    "errors": [
        {
            "message": "Field 'customerJourneySummary' doesn't exist on type 'Order'",
            "locations": [
                {
                    "line": 5,
                    "column": 21
                }
            ],
            "path": [
                "query",
                "order",
                "customerJourneySummary"
            ],
            "extensions": {
                "code": "undefinedField",
                "typeName": "Order",
                "fieldName": "customerJourneySummary"
            }
        }
    ]
}

Document link: https://shopify.dev/docs/admin-api/graphql/reference/orders/order?api%5Bversion%5D=2020-10

Hello, is anybody there?

Hi @manhnq94 ,

I tried the above query and I wan’t able to reproduce your results; the query returned the expected data for me. Could you please provide me with the request-id found in the response header of the query that isn’t working, and I’d be happy to look into this further for you.

Thanks,

Seth.

1 Like

Hi @syf_1 ,

Thank you for your reply, actually I found out that I use the wrong API version in my code which is 2020-07 instead of 2020-10 so that’s why I cant get the customerJourneySummary field.

Thanks.