- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
upsertProducts - Product Module Reference
This documentation provides a reference to the upsertProducts
method. This belongs to the Product Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
upsertProducts(data, sharedContext?): Promise<ProductDTO[]>#
This method updates existing products, or creates new ones if they don't exist.
Example#
Parameters#
data
UpsertProductDTO[]The attributes to update or create for each product.
data
UpsertProductDTO[]Returns#
Promise
Promise<ProductDTO[]>The updated and created products.
Promise
Promise<ProductDTO[]>upsertProducts(data, sharedContext?): Promise<ProductDTO>#
This method updates the product if it exists, or creates a new ones if it doesn't.
Example#
Parameters#
data
UpsertProductDTOThe attributes to update or create for the new product.
data
UpsertProductDTOReturns#
Promise
Promise<ProductDTO>The updated or created product.
Promise
Promise<ProductDTO>Was this page helpful?