Development Resources

createProductsWorkflow - Medusa Workflows API Reference

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

This workflow creates one or more products.

Steps#

Input#

CreateProductsWorkflowInputCreateProductsWorkflowInput

Output#

ProductDTO[]ProductDTO[]

Hooks#

productsCreated#

Example

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

Input

Handlers consuming this hook accept the following input.

inputobject
Was this page helpful?