Use the updateDataSet mutation to add custom attributes to the product catalog. The total number of product attributes within the product catalog cannot exceed 2000.
Typical usage:
- Add business-specific attributes for inventory tracking
- Create attributes for regional product variations
Before you begin
The product catalog includes predefined attributes that were configured at provisioning. These predefined attributes cannot be edited. The Product ID attribute is required and serves as the key field that uniquely identifies products. All other predefined attributes are optional.
Before you start adding custom attributes to the product catalog, review the predefined list.
| Name | Description | Data format |
|---|---|---|
availability | Availability status. Examples: "In stock", "Out of stock", "Preorder". | Text |
brandName | The product brand or manufacturer | Text |
brandDescription | Brief description of the brand | Text |
category | Product classification. Examples: "Electronics" or "Electronics/Cables". | Text |
currency | The currency in which the price is represented. We recommend using ISO 4217 currency codes. Examples: "USD", "EUR", "GBP". | Text |
dateAdded | Shows when the product was added to the catalog or became available to clients. 💡There is a related meta attribute in Connect that is populated automatically when you add a product to the catalog - tracking.createdAt. | Date. Required format: ISO 8601 timestamp. Example: 2025-08-16T14:20:54.574Z. |
discount | Discount amount or percentage applied to the price | Number |
imageUrls | Product image URLs | Array of text values. The text values must be full URLs starting with "http". |
inventoryQuantity | Number of units available in stock | Number |
model | Model name or number | Text |
msrp | Manufacturer's Suggested Retail Price | Number |
productDescription | Product description | Text |
productId | Unique identifier for the product (required) | Text |
productName | Product name | Text |
productRating | Average customer rating | Number |
productStatus | The current status of the product. Examples: Active, Active Mature, Inactive, Discontinued, Obsolete. | Text |
productUrls | URLs of product pages | Array of text values. The text values must be full URLs starting with "http". |
sku | Stock Keeping Unit (internal tracking ID for inventory) | Text |
tags | Keywords or tags for searchability and custom categorization | Array of text values |
unitPrice | The current price of the product | Number |
Running the mutation
If you haven't used our API before, see Using the Connect API for instructions. It explains how to authenticate your calls and suggests some tools for testing.
Basic mutation structure
mutation {
updateDataSet(
where: { dataSetId: "CAT-2025YG" }
to: {
attributes: {
create: [
{ name: "Available Offline", type: BOOLEAN }
{ name: "Region", type: TEXT }
]
}
}
) {
dataSetId
}
}
Mutation arguments
where(required): Object - Identifies the product catalog to updatedataSetId(required): String - The ID of your product catalog. If you don't have it, run thedataSetsquery.
to(required): Object - Contains the updates to applyattributes: Object - Attribute operations (see Attributes object below)
Attributes object
create(required): Array of objects - Add new attributes to the product catalog. Each object represents a single attribute (see Create attribute object below).
Create attribute object
name(required): String - The name of the new product attribute. Case-sensitive and unique within the product catalog.type(required): Enum - The data type. Valid values:TEXT,NUMBER,DATE,BOOLEAN,JSON,ARRAY.validateAs: Enum - Specifies validation rules for attributes of theTEXTandARRAYtypes. Required for arrays. When you import products to Connect, only properly formatted data will be accepted. Valid values for text attributes:TEXT(default),URL. Valid values for array attributes:TEXT,NUMBER,BOOLEAN,DATE,URL.
Mutation fields
dataSetId(required): String - The ID of your product catalog
Response structure
The mutation returns a JSON response with this structure:
data: Object - Root response objectupdateDataSet: Object - Contains all fields from the mutation
Example
Add custom attributes for offline store availability and regional tracking.
mutation {
updateDataSet(
where: { dataSetId: "CAT-2025YG" }
to: {
attributes: {
create: [
{ name: "Requires Assembly", type: BOOLEAN }
{ name: "Ships From", type: TEXT }
{ name: "Compliance Documents", type: TEXT, validateAs: URL }
{ name: "Offline Stores", type: ARRAY, validateAs: TEXT }
]
}
}
) {
dataSetId
}
}
{
"data": {
"updateDataSet": {
"dataSetId": "CAT-2025YG"
}
}
}
