createCustomersStep - Medusa Core Workflows Reference
This documentation provides a reference to the createCustomersStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step creates one or more customers.
Example#
Input#
CreateCustomersStepInput
CreateCustomersStepInputThe data to create one or more customers.
CreateCustomersStepInput
CreateCustomersStepInputcompany_name
null | stringOptionalThe company name of the customer.
company_name
null | stringOptionalfirst_name
null | stringOptionalThe first name of the customer.
first_name
null | stringOptionallast_name
null | stringOptionalThe last name of the customer.
last_name
null | stringOptionalemail
null | stringOptionalThe email of the customer.
email
null | stringOptionalphone
null | stringOptionalThe phone of the customer.
phone
null | stringOptionalcreated_by
null | stringOptionalWho created the customer.
created_by
null | stringOptionalhas_account
booleanOptionalWhether the customer has an account.
has_account
booleanOptionalThe addresses of the customer.
Holds custom data in key-value pairs.
Output#
CustomerDTO[]
CustomerDTO[]
CustomerDTO[]
CustomerDTO[]id
stringThe ID of the customer.
id
stringemail
stringThe email of the customer.
email
stringhas_account
booleanA flag indicating if customer has an account or not.
has_account
booleandefault_billing_address_id
null | stringThe associated default billing address's ID.
default_billing_address_id
null | stringdefault_shipping_address_id
null | stringThe associated default shipping address's ID.
default_shipping_address_id
null | stringcompany_name
null | stringThe company name of the customer.
company_name
null | stringfirst_name
null | stringThe first name of the customer.
first_name
null | stringlast_name
null | stringThe last name of the customer.
last_name
null | stringaddresses
CustomerAddressDTO[]The addresses of the customer.
addresses
CustomerAddressDTO[]phone
null | stringThe phone of the customer.
phone
null | stringgroups
object[]The groups of the customer.
groups
object[]metadata
Record<string, unknown>Holds custom data in key-value pairs.
metadata
Record<string, unknown>created_by
null | stringWho created the customer.
created_by
null | stringdeleted_at
null | string | DateThe deletion date of the customer.
deleted_at
null | string | Datecreated_at
string | DateThe creation date of the customer.
created_at
string | Dateupdated_at
string | DateThe update date of the customer.
updated_at
string | DateWas this page helpful?