Catalog Products
A Catalog Product is a custom product definition for your organization. These products will be available to your organization (and only your organization) when searching through the catalog in Kojo, on both web and mobile.
Schema​
CatalogProduct
​
Name | Type | Description | Example |
---|---|---|---|
id | ID | Unique identifier for product | "clktd7c1s0001ruj55b7gfuyh" |
createdAt | DateTime | When this product was created | "2023-08-02T06:46:29.056Z" |
updatedAt | DateTime | When this product was updated | "2023-08-02T06:46:29.056Z" |
alsoKnownAs | string[] | Array of strings for alternate terms to identify this product | ["goggles"] |
categories | Category[] | Categories this product is associated with | See Category docs |
description | string | Primary description/title for this product | "Tinted Safety Glasses" |
detailedDescription | string? | Additional details for this product | "These performance safety glasses are designed with high impact, fog-free lenses." |
facets | Facet[] | List of properties associated with this product | See Facet docs |
manufacturer | string? | Manufacturer name for this product | "Milwaukee" |
mpn | string? | Manufacturer Part Number for this product | "48-73-2025" |
unitsOfMeasure | string? | Units of Measure (UOM) for this product | "EA" |
upc | string? | Universal Product Code for this product | "045242552436" |
Category
​
Name | Type | Description | Example |
---|---|---|---|
id | ID | Unique identifier for category | "clktd7c1s0001ruj55b7gfuyh" |
createdAt | DateTime | When this category was created | "2023-08-02T06:46:29.056Z" |
updatedAt | DateTime | When this category was updated | "2023-08-02T06:46:29.056Z" |
name | string | Name of the category | "Eyewear" |
path | string | Newline-separated heirarchical category taxonomy path | "Safety Products\nEyewear" - "Safety Products" is the primary category; "Eyewear" is the subcategory |
Facet
​
Name | Type | Description | Example |
---|---|---|---|
id | ID | Unique identifier for facet | "clktd7c1s0001ruj55b7gfuyh" |
createdAt | DateTime | When this facet was created | "2023-08-02T06:46:29.056Z" |
updatedAt | DateTime | When this facet was updated | "2023-08-02T06:46:29.056Z" |
name | string | Name of the facet type | "Color" |
value | string | Value of the facet property | "Green" |
Mutations​
getOrCreateCatalogProduct
​
Finds or Creates and returns a custom Catalog Product for your organization. These products are considered unique by description/manufacturer/mpn/unitsOfMeasure/upc.
Parameters​
Name | Type | Description | Example |
---|---|---|---|
alsoKnownAs | string[] | Array of strings for alternate terms to identify this product | ["goggles"] |
categoryPath | string? | Newline-separated category hierarchy names. This path can have at most four levels of categories/subcategories. | "Safety Products\nEyewear" |
description | string | Primary description/title for this product | "Tinted Safety Glasses" |
detailedDescription | string? | Additional details for this product | "These performance safety glasses are designed with high impact, fog-free lenses." |
facets | Facet[] | List of properties associated with this product | [{ name: "Color", value: "Tinted" }] |
manufacturer | string? | Manufacturer name for this product | "Milwaukee" |
mpn | string? | Manufacturer Part Number for this product | "48-73-2025" |
unitsOfMeasure | string? | Units of Measure (UOM) for this product | "EA" |
upc | string? | Universal Product Code for this product | "045242552436" |
Example Mutation​
mutation {
getOrCreateCatalogProduct(
alsoKnownAs: ["tinty lens", "MW48-73-2025"],
categoryPath: "Safety Products\nEyewear",
description: "Tinted Safety Glasses",
detailedDescription: "These performance safety glasses are designed with high impact, fog-free lenses.",
facets: [
{ name: "Color", value: "Tinted" },
{ name: "Size", value: "Large" },
],
manufacturer: "Milwaukee",
mpn: "48-73-2025",
unitsOfMeasure: "EA",
upc: "045242552436",
) {
id
createdAt
updatedAt
alsoKnownAs
categories {
name
path
}
description
detailedDescription
facets {
name
value
}
manufacturer
mpn
unitsOfMeasure
upc
}
}
Example Response​
Returns the Catalog Product record with associated categories and facets.
{
"id": "clktd7c1s0001ruj55b7gfuyh",
"createdAt": "2023-08-02T06:46:29.056Z",
"updatedAt": "2023-08-02T06:46:29.056Z",
"alsoKnownAs": [
"tinty lens",
"MW48-73-2025"
],
"categories": [
{
"name": "Eyewear",
"path": "Safety Products\nEyewear"
}
],
"description": "Tinted Safety Glasses",
"detailedDescription": "These performance safety glasses are designed with high impact, fog-free lenses.",
"facets": [
{
"name": "Size",
"value": "Large"
},
{
"name": "Color",
"value": "Tinted"
}
],
"manufacturer": "Milwaukee",
"mpn": "48-73-2025",
"unitsOfMeasure": "EA",
"upc": "045242552436"
}