createProductVariantsWorkflow - Medusa Core Workflows Reference

This documentation provides a reference to the createProductVariantsWorkflow. It belongs to the @medusajs/medusa/core-flows package.

This workflow creates one or more product variants.

Steps#

Input#

CreateProductVariantsWorkflowInputCreateProductVariantsWorkflowInput

Output#

object[]object[]

Hooks#

productVariantsCreated#

Example

Code
1import { createProductVariantsWorkflow } from "@medusajs/medusa/core-flows"2
3createProductVariantsWorkflow.hooks.productVariantsCreated(4	(async ({ product_variants, additional_data }, { container }) => {5		//TODO6	})7)

Input

Handlers consuming this hook accept the following input.

inputobject
Was this page helpful?