---
title: >-
  productSet and customerSet mutations now support upserts and custom IDs -
  Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/posts/productset-and-customerset-mutations-now-support-upserts
  md: >-
    https://shopify.dev/changelog/posts/productset-and-customerset-mutations-now-support-upserts.md
metadata:
  effectiveApiVersion: 2025-04
  affectedApi:
    - displayName: Admin GraphQL API
      handle: admin-graphql
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: New
    handle: new
  indicatesActionRequired: false
  createdAt: '2025-03-12T15:47:33-04:00'
  postedAt: '2025-04-01T12:00:00-04:00'
  updatedAt: '2025-03-26T17:18:01-04:00'
  effectiveAt: '2025-04-01T12:00:00-04:00'
---

April 1, 2025

# `productSet` and `customerSet` mutations now support upserts and custom IDs

DateApril 1, 2025

Version[2025-04](https://shopify.dev/changelog?api_version=2025-04)

FlagsNew

SurfacesAPI

Affected APIs[Admin GraphQL API](https://shopify.dev/changelog?api_type=admin-graphql)

As of version 2025-04, the [`productSet`](https://shopify.dev/docs/api/admin-graphql/2025-04/mutations/productSet) and [`customerSet`](https://shopify.dev/docs/api/admin-graphql/2025-04/mutations/customerSet) mutations of the GraphQL Admin API support upserting (creating or updating) records by `identifier`.

When `identifier` is provided, these mutations use it to check for an existing record. If an existing record is found, then the mutation updates it with the data provided in `input`. Otherwise, the mutation creates a new record.

The `identifier` gives developers a straightforward, idempotent mechanism to create and subsequently update records with the same shape of inputs, without the need for extra queries to check if records exist. For identifiers, `productSet` allows `handle`, `id`, and `customId`. `customerSet` allows `phone`, `email`, and `customId`.

This extends previously existing behaviour on `productSet`, which updates a record if `id` is provided in the `input` and otherwise creates a new record. The `customerSet` mutation was previously released only to the `unstable` version of the API.

Read more about [using Custom IDs](https://shopify.dev/docs/apps/build/custom-data/metafields/working-with-custom-ids).
