# Problem with fulfillmentCreate

**URL:** <https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313>\
**Category:** GraphQL Admin API Troubleshooting\
**Tags:** general-gql-troubles\
**Created:** [December 14, 2024, 7:33pm UTC](https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313 "2024-12-14T19:33:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TSAppGuy](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@TSAppGuy](https://community.shopify.dev/u/TSAppGuy)\
**Post date:** [December 14, 2024, 7:33pm UTC](https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313/1 "2024-12-14T19:33:00Z")

</div>

Hi, I’m trying to create a fulfillment using GraphQL, using this page as a reference: [fulfillmentCreate - GraphQL Admin](https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/fulfillmentCreate)

Until now I’ve been pretty successful converting to GraphQL just by following the examples. But not with this one. Here is the data I’m sending to Shopify:

```auto
{
    "query": "mutation fulfillmentCreate($fulfillment: FulfillmentInput!) { fulfillmentCreate(fulfillment: $fulfillment) { fulfillment { notifyCustomer trackingInfo { number url company } lineItemsByFulfillmentOrder { fulfillmentOrderId fulfillmentOrderLineItems { id quantity }} } userErrors {field message}}}",
    "variables": {
        "fulfillment": {
            "notifyCustomer": true,
            "trackingInfo": {
                "company": "USPS",
                "url": "https://tools.usps.com/go/TrackConfirmAction.action?tRef=fullpage&tLc=1&text28777=&tLabels=9434611206224830964813",
                "number": "9434611206224830964813"
            },
            "lineItemsByFulfillmentOrder": [
                {
                    "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/7463001751613",
                    "fulfillmentOrderLineItems": [
                        {
                            "id": "gid://shopify/FulfillmentOrderLineItem/15046805979197",
                            "quantity": 1
                        },
                        {
                            "id": "gid://shopify/FulfillmentOrderLineItem/15046806011965",
                            "quantity": 1
                        }
                    ]
                }
            ]
        }
    }
}

```

When I do, I get an error that says **“Field ‘notifyCustomer’ doesn’t exist on type ‘Fulfillment’”**. Well, that message doesn’t help, as it most certainly does, at least according to the page I mentioned at the beginning.

Am I formatting this wrong? It would help if that page included a variety of good examples like so much of the rest of the GraphQL docs.

Any information or help figuring this out would be much appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![JordanFinners](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/jordanfinners/32/6616_2.png) [@JordanFinners](https://community.shopify.dev/u/JordanFinners)\
**Post date:** [December 14, 2024, 9:21pm UTC](https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313/2 "2024-12-14T21:21:28Z")

</div>

Hey, your variables look fine for the mutation, the error is from your mutation results/returns.  
In your query you are asking for the field notifyCustomer on the fulfillment return which doesn’t exist [fulfillmentCreate - GraphQL Admin](https://shopify.dev/docs/api/admin-graphql/2024-10/mutations/fulfillmentCreate#field-fulfillmentcreatepayload-fulfillment)

---

<div class="post-metadata">

**Author:** ![TSAppGuy](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@TSAppGuy](https://community.shopify.dev/u/TSAppGuy)\
**Post date:** [December 14, 2024, 9:59pm UTC](https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313/3 "2024-12-14T21:59:35Z")

</div>

Thanks for the reply. I’m having a hard time understanding the structure of mutations, which is why I’m not understanding what goes where. Mostly, I’ve made this work using the CURL examples throughout the documentation.

Can you tell me how my mutation should look? The only thing I really need returned is the fulfillment id and the userErrors.

---

<div class="post-metadata">

**Author:** ![TSAppGuy](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@TSAppGuy](https://community.shopify.dev/u/TSAppGuy)\
**Post date:** [December 14, 2024, 10:10pm UTC](https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313/4 "2024-12-14T22:10:37Z")

</div>

I figured it out. And I now understand the mutation just a little better (although not completely) I used:

```auto
mutation fulfillmentCreate($fulfillment: FulfillmentInput!) { fulfillmentCreate(fulfillment: $fulfillment) { fulfillment { id } userErrors {field message} }}

```

I don’t fully understand the “variables” ($fulfillment) in the query and the results or why they are even there. But it works and that’s all that matters.

---

<div class="post-metadata">

**Author:** ![JordanFinners](https://sea1.discourse-cdn.com/shopifycommunity/user_avatar/community.shopify.dev/jordanfinners/32/6616_2.png) [@JordanFinners](https://community.shopify.dev/u/JordanFinners)\
**Post date:** [December 15, 2024, 5:19pm UTC](https://community.shopify.dev/t/problem-with-fulfillmentcreate/4313/5 "2024-12-15T17:19:51Z")

</div>

The variables are the inputs to your mutation.  
The results are there for you to check for errors and/or use the resulting data, after the mutation is made in some way.

Think of it in database terms, you’re doing a insert which you provide variables for. The insert statement runs with those.  
Any errors are returned.  
In database world you’d then query the data if you wanted to, but in graphql you can do that all in one go.
