CatalogItemVariants
Lists all item variants for a given catalog item, including variant attributes such as color or size.
Select
The add-in uses the Klaviyo API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the add-in.
- Id supports the following operator: =
- Sku supports the following operator: =
For example, the following queries are processed server-side:
SELECT * FROM CatalogItemVariants WHERE Id = 'catalogItemVariantId'
SELECT * FROM CatalogItemVariants WHERE Sku = 'variant-sku'
Insert
You can create a new catalog item variant by using an INSERT statement.
Note: To create a new record, you must specify the ItemId of the catalog item that the variant belongs to.
INSERT INTO CatalogItemVariants (
ExternalId, Description, InventoryQuantity, Price, Sku, Title, Url, ItemId
)
VALUES (
'variant-external-id',
'The description for this variant',
5,
50,
'variant-sku',
'The title for this variant',
'https://cdata.com',
'$custom:::$default:::testingpurpose'
)
Update
You can update a catalog item variant by specifying the Id of the variant and setting the fields you want to change.
UPDATE CatalogItemVariants
SET Description = 'The description for this variant was changed'
WHERE Id = 'variant-id'
Delete
You can delete a catalog item variant by specifying the Id of the record you want to remove.
DELETE FROM CatalogItemVariants
WHERE Id = 'variant-id'
Columns
| Name | Type | ReadOnly | References | Description | |
| Id [KEY] | String | True |
The unique identifier for the catalog item variant. This compound Id uses the format {integration}::: {catalog}::: {external_Id}. Currently, only the $custom integration type and the $default catalog are supported. | ||
| ItemId | String | False |
CatalogItems.Id |
The unique identifier of the catalog item to which this variant belongs. Use this value to link each variant to its parent item. | |
| Created | Datetime | True |
The date and time when the catalog item variant was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). | ||
| Description | String | False |
A detailed description of the catalog item variant, typically including size, color, or other distinguishing attributes. | ||
| ExternalId | String | False |
The identifier of the catalog item variant in an external system, used to synchronize variant data between Klaviyo and external product sources. | ||
| ImageFullUrl | String | False |
The URL of the full-size image representing the catalog item variant. | ||
| ImageThumbnailUrl | String | False |
The URL of the thumbnail image associated with the catalog item variant. | ||
| Images | String | False |
A comma-separated list of URLs for all images linked to the catalog item variant. | ||
| InventoryPolicy | Int | False |
Defines the visibility of the catalog item variant in product feeds or recommendation blocks. Supported values include: 1: the variant will not appear in dynamic product recommendation feeds or blocks if it is out of stock. 0 or 2: the variant can appear in feeds or blocks regardless of inventory quantity. | ||
| InventoryQuantity | Int | False |
The current quantity of the catalog item variant available in stock. | ||
| Price | Double | False |
Specifies the price displayed for the catalog item variant in Klaviyo emails or campaigns. | ||
| Published | Bool | False |
Indicates whether the catalog item variant is published and available in the account's catalog. | ||
| Sku | String | False |
The stock keeping unit (SKU) identifier assigned to the catalog item variant. | ||
| Title | String | False |
The title or display name of the catalog item variant as it appears in the catalog or storefront. | ||
| Updated | Datetime | True |
The date and time when the catalog item variant was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). | ||
| Url | String | False |
The URL directing to the catalog item variant's page on the organization's website. |