- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
upsertProductVariants - Product Module Reference
This documentation provides a reference to the upsertProductVariants
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.
upsertProductVariants(data, sharedContext?): Promise<ProductVariantDTO[]>#
This method updates existing variants, or creates new ones if they don't exist.
Example#
Parameters#
data
UpsertProductVariantDTO[]The attributes to update or create for each variant.
data
UpsertProductVariantDTO[]Returns#
Promise
Promise<ProductVariantDTO[]>The updated and created variants.
Promise
Promise<ProductVariantDTO[]>upsertProductVariants(data, sharedContext?): Promise<ProductVariantDTO>#
This method updates an existing variant, or creates a new one if it doesn't exist.
Example#
Parameters#
The attributes to update or create for the variant.
Returns#
Promise
Promise<ProductVariantDTO>The updated or created variant.
Promise
Promise<ProductVariantDTO>Was this page helpful?