mutation productOptionsCreate only creates one option value per option

Topic summary

Issue: Using productOptionsCreate to add multiple values (e.g., Size: Small, Medium, Large) only created the first value (“Small”) under the 2024-04 API.

Context: A suggestion to populate option values via product->variants->options was made, but those fields are deprecated in API 2024-04 and not applicable to the new product model.

Resolution (new product model, API 2024-04):

  • First create the product with a standalone variant via productCreate.
  • Then bulk add/replace variants using productVariantsBulkCreate.
  • Use strategy: REMOVE_STANDALONE_VARIANT to replace the initial standalone variant and correctly establish all option values/variants.
  • Reference: Shopify migration doc for the new product model (add data flow).

Outcome: Multiple participants confirmed this two-step approach works and resolves the single-value issue. The thread is effectively resolved with a clear migration-compatible workflow.

Summarized with AI on December 24. AI used: gpt-5.

I found the solution so I’m posting it here in case anyone else faces the same issue.

First, create a standalone variant using the productCreate mutation, then overwrite it using the productVariantsBulkCreate mutation as explained in this doc. https://shopify.dev/docs/api/admin/migrate/new-product-model/add-data

2 Likes