The product catalog contains a set of predefined product attributes. The Product Id attribute is required, the rest are optional.
There are predefined attributes that were configured at the provisioning stage and custom attributes. Predefined attributes cannot be edited. productId
is one of them. It's the key field in any product catalog dataset that uniquely identifies the records.
Each of the predefined attributes contains an internal name that you need for queries and mutations and a user-friendly display name visible in the GUI.
Internal name | Display name | Data format |
---|---|---|
availability | Availability | Text |
brand | Brand Name | Text |
brandDescription | Brand Description | Text |
category | Category | Text |
currency | Currency | Text |
dateAdded | Date Added | Date. The following formats are supported: - YYYY-MM-DD - MM/DD/YYYY - DD/MM/YYYY - YYYY/MM/DD - DD.MM.YYYY - YYYY-MM-DDTHH:mm:ssZ |
description | Product Description | Text |
dimensions | Dimensions | Array |
discount | Discount | Number |
name | Product Name | Text |
model | Model | Text |
msrp | MSRP | Number |
price | Price | Number |
productId | Product Id | Text |
productUrls | Product URLs | Array |
quantity | Quantity | Number |
rating | Product Rating | Number |
status | Product Status | Text |
sku | SKU | Text |
To add an additional product attribute to the product catalog, use the updateDataSet
mutation. The total number of product attributes within the product catalog cannot exceed 2000.
mutation {
updateDataSet(
to: {
attributes: {
create: [
{ name: "Available Offline", type: BOOLEAN }
{ name: "Region", type: TEXT }
{ name: "Product page", type: TEXT, validateAs: URL }
{ name: "Stores", type: ARRAY, validateAs: TEXT}
]
}
}
where: { dataSetId: "1e51480c-074a-5fd7-0101-xxxxxxxxxxx" }
) {
dataSetId
}
}
{
"data": {
"updateDataSet": {
"dataSetId": "1e51480c-074a-5fd7-0101-xxxxxxxxxxx"
}
}
}
Arguments
Arguments required by the updateDataSet object
Argument | Nested field | Values | Definition |
---|---|---|---|
where | dataSetId | ID | The ID of your product catalog |
to | attributes | Object | The changes you want to make |
You must nest the create
array into attributes
and add an object for each new product attribute. Here are the fields supported by objects in the attributes.create
array.
Field | Values | Required? | Definition |
---|---|---|---|
name | String. Case-sensitive and unique within product catalog. | Required | The name of the new product attribute. It will be used both as an internal name and display name. |
type | String. Valid values: - TEXT - NUMBER - BOOLEAN - DATE - JSON - ARRAY | Required | The data format of the attribute |
validateAs | Enumeration. Valid values for text attributes: - TEXT - URL .Valid values for array attributes:- BOOLEAN - DATE - NUMBER - TEXT - URL . | Optional | Use this field to provide additional details about the data format. This will improve validation during product import (only properly formatted data according to this type will be accepted).validateAs applies only to the product attributes of the TEXT and ARRAY types. For example, you can specify that a text attribute contains URLs or that an array is an array of numeric values. |
Fields
Fields returned the updateDataSet
mutation
Field | Values | Required? | Definition |
---|---|---|---|
dataSetId | ID | Required | The ID of your product catalog |