- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
createCustomerGroupsWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the createCustomerGroupsWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow creates one or more customer groups. It's used by the Create Customer Group Admin API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to create customer groups within your custom flows. For example, you can create customer groups to segregate customers by age group or purchase habits.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
CreateCustomerGroupsWorkflowInput
CreateCustomerGroupsWorkflowInputThe data to create customer groups.
CreateCustomerGroupsWorkflowInput
CreateCustomerGroupsWorkflowInputcustomersData
CreateCustomerGroupDTO[]The customer groups to create.
customersData
CreateCustomerGroupDTO[]Output#
CreateCustomerGroupsWorkflowOutput
CreateCustomerGroupsWorkflowOutputThe created customer groups.
CreateCustomerGroupsWorkflowOutput
CreateCustomerGroupsWorkflowOutputid
stringThe ID of the customer group.
id
stringname
stringThe name of the customer group.
name
stringThe customers of the customer group.
metadata
Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
Record<string, unknown>Optionalcreated_by
null | stringOptionalWho created the customer group.
created_by
null | stringOptionaldeleted_at
null | string | DateOptionalThe deletion date of the customer group.
deleted_at
null | string | DateOptionalcreated_at
string | DateOptionalThe creation date of the customer group.
created_at
string | DateOptionalupdated_at
string | DateOptionalThe update date of the customer group.
updated_at
string | DateOptionalWas this page helpful?