Assign a variation for a product master. If the variation product does not initially exist, one is created using the body passed in.
If you would like to get a raw Response object use the other assignVariationForMasterProduct function.
An object containing the options for this method.
A promise of type Products.Variant.
Assign a variation for a product master. If the variation product does not initially exist, one is created using the body passed in.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Variant otherwise.
Assign a variation group for a product master. If the variation group product does not initially exist, one is created using the body passed in.
If you would like to get a raw Response object use the other assignVariationGroupToMasterProduct function.
An object containing the options for this method.
A promise of type Products.VariationGroup.
Assign a variation group for a product master. If the variation group product does not initially exist, one is created using the body passed in.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationGroup otherwise.
Creates a product using the information provided. If a product with the same unique identifier exists, it is cleaned and overwritten unless the header x-dw-validate-existing=true is passed in with the request.
If you would like to get a raw Response object use the other createProduct function.
An object containing the options for this method.
A promise of type Products.Product | Products.Product.
Creates a product using the information provided. If a product with the same unique identifier exists, it is cleaned and overwritten unless the header x-dw-validate-existing=true is passed in with the request.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Product | Products.Product otherwise.
Creates a local product option using the information provided or binds a shared product option to the product.
If you would like to get a raw Response object use the other createProductOption function.
An object containing the options for this method.
A promise of type Products.ProductOption | Products.ProductOption.
Creates a local product option using the information provided or binds a shared product option to the product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOption | Products.ProductOption otherwise.
Creates a local product option value using the information provided.
If you would like to get a raw Response object use the other createProductOptionValue function.
An object containing the options for this method.
A promise of type Products.ProductOptionValue | Products.ProductOptionValue.
Creates a local product option value using the information provided.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOptionValue | Products.ProductOptionValue otherwise.
Creates a variation attribute using the information provided.
If you would like to get a raw Response object use the other createVariationAttribute function.
An object containing the options for this method.
A promise of type Products.VariationAttribute | Products.VariationAttribute.
Creates a variation attribute using the information provided.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttribute | Products.VariationAttribute otherwise.
Action to create a product variation attribute value.
If you would like to get a raw Response object use the other createVariationAttributeValue function.
An object containing the options for this method.
A promise of type Products.VariationAttributeValue | Products.VariationAttributeValue.
Action to create a product variation attribute value.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttributeValue | Products.VariationAttributeValue otherwise.
Deletes the product by ID.
If you would like to get a raw Response object use the other deleteProduct function.
An object containing the options for this method.
A promise of type void.
Deletes the product by ID.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Deletes a local product option or unbinds a shared product option from the product.
If you would like to get a raw Response object use the other deleteProductOption function.
An object containing the options for this method.
A promise of type void.
Deletes a local product option or unbinds a shared product option from the product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Deletes a local product option value by ID.
If you would like to get a raw Response object use the other deleteProductOptionValue function.
An object containing the options for this method.
A promise of type void.
Deletes a local product option value by ID.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Deletes the variation attribute by ID.
If you would like to get a raw Response object use the other deleteVariationAttribute function.
An object containing the options for this method.
A promise of type void.
Deletes the variation attribute by ID.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Deletes the variation attribute value of a variation attribute bound to a master product.
If you would like to get a raw Response object use the other deleteVariationAttributeValue function.
An object containing the options for this method.
A promise of type void.
Deletes the variation attribute value of a variation attribute bound to a master product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Gets the list of allowed attributes, values, and operators for creating rule-based categorization conditions.
If you would like to get a raw Response object use the other getCategorizationAttributeDefinitions function.
An object containing the options for this method.
A promise of type Products.CategorizationAttributeDefinitonsResult.
Gets the list of allowed attributes, values, and operators for creating rule-based categorization conditions.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.CategorizationAttributeDefinitonsResult otherwise.
Action to get product information.
If you would like to get a raw Response object use the other getProduct function.
An object containing the options for this method.
A promise of type Products.Product.
Action to get product information.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Product otherwise.
Read a local or shared product option of a product.
If you would like to get a raw Response object use the other getProductOption function.
An object containing the options for this method.
A promise of type Products.ProductOption.
Read a local or shared product option of a product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOption otherwise.
Read a local product option value of a local product option in a product.
If you would like to get a raw Response object use the other getProductOptionValue function.
An object containing the options for this method.
A promise of type Products.ProductOptionValue.
Read a local product option value of a local product option in a product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOptionValue otherwise.
Read local and shared product options of a product.
If you would like to get a raw Response object use the other getProductOptions function.
An object containing the options for this method.
A promise of type Products.ProductOptions.
Read local and shared product options of a product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOptions otherwise.
Action to get variation attribute information only for master product.
If you would like to get a raw Response object use the other getVariationAttribute function.
An object containing the options for this method.
A promise of type Products.VariationAttribute.
Action to get variation attribute information only for master product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttribute otherwise.
Action to get product variation attribute value information.
If you would like to get a raw Response object use the other getVariationAttributeValue function.
An object containing the options for this method.
A promise of type Products.VariationAttributeValue.
Action to get product variation attribute value information.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttributeValue otherwise.
Reads variation attributes of a product of type variant, variation master, or variation group.
If you would like to get a raw Response object use the other getVariationAttributes function.
An object containing the options for this method.
A promise of type Products.VariationAttributes.
Reads variation attributes of a product of type variant, variation master, or variation group.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttributes otherwise.
Read a variation for a product master.
If you would like to get a raw Response object use the other getVariationForMasterProduct function.
An object containing the options for this method.
A promise of type Products.Variant.
Read a variation for a product master.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Variant otherwise.
Read a variation group for a product master.
If you would like to get a raw Response object use the other getVariationGroupForMasterProduct function.
An object containing the options for this method.
A promise of type Products.VariationGroup.
Read a variation group for a product master.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationGroup otherwise.
Reads variation groups for a product master.
If you would like to get a raw Response object use the other getVariationGroupsForMasterProduct function.
An object containing the options for this method.
A promise of type Products.VariationGroups.
Reads variation groups for a product master.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationGroups otherwise.
Reads variation for a product master.
If you would like to get a raw Response object use the other getVariationsForMasterProduct function.
An object containing the options for this method.
A promise of type Products.Variants.
Reads variation for a product master.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Variants otherwise.
Searches product variations for master product or variation group product. The query attribute specifies a complex query that can be used to narrow down the search.
This is the list of searchable attributes:
Attribute | Type |
---|---|
id | String |
productId | String |
name | String |
online | SiteSpecific Boolean |
inStock | Boolean |
searchable | SiteSpecific Boolean |
ats - Actual available quantity to sell | Double |
variationAttribute.ATTRIBUTE_ID (Ex:variation_attribute.color) | String |
Sortable Fields:
Attribute | Type |
---|---|
id | String |
productId | String |
name | String |
online | SiteSpecific Boolean |
inStock | Boolean |
searchable | SiteSpecific Boolean |
ats - Actual available quantity to sell | Double |
Note: The calculated value of "online" and "searchable" is used in the search/sort. A search/sort by the site-specific attributes require the Site ID query parameter to be set. They are "online", "inStock", "searchable" and "ats". We assume that every field that starts with variationAttribute. is searchable and dot is followed by "ATTRIBUTE_ID".
The list of expansions to retrieve product information. The expand values available are:
_base - Basic product information is retrieved. This expand is included by default.
all - All product information, including the following properties are retrieved:
image
price - siteId must be provided to see this property
priceCurrency - siteId has to be provided to see this property
availability - Information related to the availability of the product variation. This expand is not included by default.
ats - siteId must be provided to see this property
inStock - siteId has to be provided to see this property
online - siteId has to be provided to see this property
searchable
variations - Information related to product variation is retrieved. This expand is included by default.
attributes - Information related to product variation attributes is retrieved. This expand is not included by default.
If you would like to get a raw Response object use the other searchProductVariations function.
An object containing the options for this method.
A promise of type Products.VariantSearchResult.
Searches product variations for master product or variation group product. The query attribute specifies a complex query that can be used to narrow down the search.
This is the list of searchable attributes:
Attribute | Type |
---|---|
id | String |
productId | String |
name | String |
online | SiteSpecific Boolean |
inStock | Boolean |
searchable | SiteSpecific Boolean |
ats - Actual available quantity to sell | Double |
variationAttribute.ATTRIBUTE_ID (Ex:variation_attribute.color) | String |
Sortable Fields:
Attribute | Type |
---|---|
id | String |
productId | String |
name | String |
online | SiteSpecific Boolean |
inStock | Boolean |
searchable | SiteSpecific Boolean |
ats - Actual available quantity to sell | Double |
Note: The calculated value of "online" and "searchable" is used in the search/sort. A search/sort by the site-specific attributes require the Site ID query parameter to be set. They are "online", "inStock", "searchable" and "ats". We assume that every field that starts with variationAttribute. is searchable and dot is followed by "ATTRIBUTE_ID".
The list of expansions to retrieve product information. The expand values available are:
_base - Basic product information is retrieved. This expand is included by default.
all - All product information, including the following properties are retrieved:
image
price - siteId must be provided to see this property
priceCurrency - siteId has to be provided to see this property
availability - Information related to the availability of the product variation. This expand is not included by default.
ats - siteId must be provided to see this property
inStock - siteId has to be provided to see this property
online - siteId has to be provided to see this property
searchable
variations - Information related to product variation is retrieved. This expand is included by default.
attributes - Information related to product variation attributes is retrieved. This expand is not included by default.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariantSearchResult otherwise.
Searches for products. The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets.
The following is a list of searchable attributes with their corresponding buckets:
Main:
Attribute | Type |
---|---|
id | String |
name | String |
online | SiteSpecific Boolean |
searchable | SiteSpecific Boolean |
validFrom | SiteSpecfic DateTime |
validTo | SiteSpecfic DateTime |
type | ProductType |
creationDate | DateTime |
lastModified | DateTime |
Catalog:
Attribute | Type |
---|---|
catalogId | String |
Category:
Attribute | Type |
---|---|
categoryId | String |
Special:
type - {"item", "set, "bundle", "master", "partOfProductSet", "bundled", "variant", "variationGroup", "option", "retailSet", "partOfRetailSet"}
The sortable properties are:
Attribute | Type |
---|---|
id | String |
name | String |
creationDate | DateTime |
Note that catalogId is the ID of the catalog to which products are assigned to
Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining id and catalogId, only a conjunction is allowed (AND), whereas id and searchable can be joined using a disjunction because they are in the same bucket. If an attribute is used in a disjunction (OR) that violates this rule, an exception is thrown. The product search retrieves additional properties of the product when expansions are used.
The available expand attribute values are:
‘all' retrieves all the product properties. This is the default used when no expand value is included in the request.
'none' retrieves no expansion properties.
‘availability' retrieves the following properties:
ats
inStock
online
‘categories' retrieves the assignedCategories property.
‘images' retrieves the image property.
‘allImages' used with images retrieves the following properties:
image
imageGroups
'prices' retrieves the following properties:
price
priceCurrency
‘sets' retrieves the following properties:
setProducts
productSets
‘bundles' retrieves the following properties:
productBundles
bundledProduct
If you would like to get a raw Response object use the other searchProducts function.
An object containing the options for this method.
A promise of type Products.ProductSearchResult.
Searches for products. The query attribute specifies a complex query that can be used to narrow down the search. Attributes are grouped into different buckets.
The following is a list of searchable attributes with their corresponding buckets:
Main:
Attribute | Type |
---|---|
id | String |
name | String |
online | SiteSpecific Boolean |
searchable | SiteSpecific Boolean |
validFrom | SiteSpecfic DateTime |
validTo | SiteSpecfic DateTime |
type | ProductType |
creationDate | DateTime |
lastModified | DateTime |
Catalog:
Attribute | Type |
---|---|
catalogId | String |
Category:
Attribute | Type |
---|---|
categoryId | String |
Special:
type - {"item", "set, "bundle", "master", "partOfProductSet", "bundled", "variant", "variationGroup", "option", "retailSet", "partOfRetailSet"}
The sortable properties are:
Attribute | Type |
---|---|
id | String |
name | String |
creationDate | DateTime |
Note that catalogId is the ID of the catalog to which products are assigned to
Only attributes in the same bucket can be joined using a disjunction (OR). For instance, when joining id and catalogId, only a conjunction is allowed (AND), whereas id and searchable can be joined using a disjunction because they are in the same bucket. If an attribute is used in a disjunction (OR) that violates this rule, an exception is thrown. The product search retrieves additional properties of the product when expansions are used.
The available expand attribute values are:
‘all' retrieves all the product properties. This is the default used when no expand value is included in the request.
'none' retrieves no expansion properties.
‘availability' retrieves the following properties:
ats
inStock
online
‘categories' retrieves the assignedCategories property.
‘images' retrieves the image property.
‘allImages' used with images retrieves the following properties:
image
imageGroups
'prices' retrieves the following properties:
price
priceCurrency
‘sets' retrieves the following properties:
setProducts
productSets
‘bundles' retrieves the following properties:
productBundles
bundledProduct
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductSearchResult otherwise.
Unassign a variation product from a product master. The variation product is not deleted: it remains as a normal product after unsassign.
If you would like to get a raw Response object use the other unassignVariationFromMasterProduct function.
An object containing the options for this method.
A promise of type void.
Unassign a variation product from a product master. The variation product is not deleted: it remains as a normal product after unsassign.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Unassign a variation group product from a product master. The variation group product is not deleted: it remains as a normal product after unsassign.
If you would like to get a raw Response object use the other unassignVariationGroupFromMasterProduct function.
An object containing the options for this method.
A promise of type void.
Unassign a variation group product from a product master. The variation group product is not deleted: it remains as a normal product after unsassign.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type void otherwise.
Update a product using the information provided.
Fields that can be updated: name, pageDescription, longDescripton, pageTitle, pageKeywords, brand, ean, upc, manufactureSku, manufactureName, searchable, unit, searchable, onlineFlag, defaultVariantId.
If you would like to get a raw Response object use the other updateProduct function.
An object containing the options for this method.
A promise of type Products.Product.
Update a product using the information provided.
Fields that can be updated: name, pageDescription, longDescripton, pageTitle, pageKeywords, brand, ean, upc, manufactureSku, manufactureName, searchable, unit, searchable, onlineFlag, defaultVariantId.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Product otherwise.
Updates a local product option with the information provided.
If you would like to get a raw Response object use the other updateProductOption function.
An object containing the options for this method.
A promise of type Products.ProductOption.
Updates a local product option with the information provided.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOption otherwise.
Updates a local product option value with the information provided.
If you would like to get a raw Response object use the other updateProductOptionValue function.
An object containing the options for this method.
A promise of type Products.ProductOptionValue.
Updates a local product option value with the information provided.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.ProductOptionValue otherwise.
Updates the variation attribute with the specified information. name slicing
If you would like to get a raw Response object use the other updateVariationAttribute function.
An object containing the options for this method.
A promise of type Products.VariationAttribute.
Updates the variation attribute with the specified information. name slicing
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttribute otherwise.
Updates the variation attribute value of a variation attribute of a master product.
If you would like to get a raw Response object use the other updateVariationAttributeValue function.
An object containing the options for this method.
A promise of type Products.VariationAttributeValue.
Updates the variation attribute value of a variation attribute of a master product.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationAttributeValue otherwise.
Update a variation for a product master.
If you would like to get a raw Response object use the other updateVariationForMasterProduct function.
An object containing the options for this method.
A promise of type Products.Variant.
Update a variation for a product master.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.Variant otherwise.
Update a variation group for a product master.
If you would like to get a raw Response object use the other updateVariationGroupForMasterProduct function.
An object containing the options for this method.
A promise of type Products.VariationGroup.
Update a variation group for a product master.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type Products.VariationGroup otherwise.
Generated using TypeDoc
Products
Add and manage searchable products within a merchandizing system.
For instructions on how to retrieve access token for admin APIs: https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html
Example with admin auth
API Version: 0.0.33import { Product, ClientConfig } from "commerce-sdk"; // or const { Product, ClientConfig } = require("commerce-sdk"); const clientConfig: ClientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; token = { access_token: 'INSERT_ACCESS_TOKEN_HERE' }; clientConfig.headers['authorization'] = `Bearer ${token.access_token}`; const productsClient = new Product.Products(clientConfig);
Last Updated: