We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Can you use customer-accounts metafieldSet on an Order?

Solved

Can you use customer-accounts metafieldSet on an Order?

ShaunStarttin
Shopify Partner
20 3 4

I'm trying to use metafieldsSet on an Order from the OrderStatus page. According to this tutorial, it seems possible. If I perform the exact same steps with a Customer metafield (create definition with READ_WRITE access, set it from the OrderStatus page with a button click), it works, but when using an Order metafield, I receive the generic "access" error:

 

"extensions": {
                "code": "ACCESS_DENIED",
                "documentation": "https://shopify.dev/api/usage/access-scopes",
                "requiredAccess": "access defined by each metafield input `ownerId` scalar's type in a `MetafieldsSetInput` field.\nFor example, setting a metafield on a `CUSTOMER` requires the same access as mutating a `CUSTOMER`.\n"
            }

I've tried debugging by confirming the metafield definition, getting and display the metafield etc.

 

Maybe I'm just making a simple mistake, but I wanted to confirm if anyone has successfully done this!

Accepted Solution (1)

ShaunStarttin
Shopify Partner
20 3 4

This is an accepted solution.

It requires the `customer_write_orders` scope (missing from the scope list) as well! Tyty JR Rafols 🤗

View solution in original post

Reply 1 (1)

ShaunStarttin
Shopify Partner
20 3 4

This is an accepted solution.

It requires the `customer_write_orders` scope (missing from the scope list) as well! Tyty JR Rafols 🤗