Hi guys,
I have been helping to launch a site for a bookstore, and part of the service they need is to have organisation accounts. As a bookstore, they’re not going to have the income currently to warrant a B2B app or plan, so we have been developing a workaround by creating custom metafields in the customer section.
What we need to do is create dynamic metafields in the draft order section that will pull in the created fields from the customer section (so we don’t have to fill out the registration form twice). I am unable to find a way to pull the data - does anyone have any suggestions or solutions?
Many thanks in advance
Hello @Thepaddylad
Shopify doesn’t currently sync customer metafields into draft orders out of the box—you’ll need a bit of custom logic or a third-party connector to copy them over. Here’s what to do:
1. Define your customer metafields
In Shopify Admin → Settings → Custom data → Customers, create the metafields you need (e.g. “Organization Name,” “Account Level,” etc.).
These will live on the customer object and hold your org-account data.
2. Choose your automation method
- Custom private app / theme app extension (most flexible)
- Zapier / Make (Integromat) workflow (no-code)
- Shopify Flow (Shopify Plus only)
3. Fetch customer metafields at draft-order creation
If you’re building a private app or theme extension, use the Admin API or GraphQL:
// GraphQL example to get customer metafields
{
customer(id: “gid://shopify/Customer/1234567890”) {
metafield(namespace: “org”, key: “account_level”) {
value
}
}
}
- In Zapier/Make, set up a trigger on “New Draft Order” → action “Get Customer” → retrieve the metafields.
4. Copy those values into the draft order
- Via API: include a metafields array in your DraftOrderCreate or DraftOrderUpdate mutation:
mutation {
draftOrderUpdate(id: “gid://shopify/DraftOrder/987654321”, input: {
metafields: [
{
namespace: “org”,
key: “account_level”,
value: “Gold”,
type: “single_line_text_field”
}
]
}) { draftOrder { id } }
}
- In Zapier/Make, add an action “Update Draft Order” and map the customer metafield values into the draft order’s metafields.
5. Test the flow
- Create a test customer with your org fields filled in.
- Trigger a draft order (via API or the UI).
- Verify the draft order’s “Custom data” section shows the same metafield values.
That setup will let you register your organization fields once on the customer, then automatically inject them into every new draft order—no double data entry required.