Feature Request: Expose 'Add customer's existing orders to company' via GraphQL Admin API

Hi Shopify Support,

I’m building an internal tool (via the Admin GraphQL API) to bulk-convert a large number of existing individual customers into B2B Company contacts.

When creating a company contact manually through the Shopify Admin UI, there’s a checkbox labeled “เพิ่มคำสั่งซื้อของลูกค้าเข้าในบริษัท” (“Add customer’s orders to the company”) shown when assigning an existing customer as a company contact. Enabling this checkbox retroactively associates the customer’s past orders with the new Company/Company Location.

However, after inspecting the current Admin GraphQL API schema, I could not find any equivalent parameter or mutation that exposes this behavior:

  • `companyAssignCustomerAsContact` only accepts `companyId` and `customerId` — no option to also move/associate existing orders.
  • `orderUpdate` (via `OrderInput`) does not include any field to associate an order with a `Company` or `CompanyLocation`.
  • I could not find any dedicated mutation (e.g. something like `orderAssignCompanyLocation`) for this purpose either.

Could you please:

  1. Confirm whether this “add existing orders” behavior is currently exclusive to the Admin UI, or if there’s an existing API way to achieve it that I’m missing.
  2. If it’s UI-only, consider exposing this as a parameter on `companyAssignCustomerAsContact` (e.g. `includeExistingOrders: Boolean`) or as a standalone mutation, so it can be used for bulk B2B migrations via the API.

This would be very helpful for merchants like us who are migrating a large existing customer base (500+ customers) into the Companies/B2B structure and want their historical order data to carry over correctly.

Store: Molastic
API version in use: please let me know if you need this info from my app credentials.

Thank you for your time!

2 Likes