- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
findOrCreateCustomerStep - Medusa Core Workflows Reference
This documentation provides a reference to the findOrCreateCustomerStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step either finds a customer matching the specified ID, or finds / create a customer matching the specified email. If both ID and email are provided, ID takes precedence. If the customer is a guest, the email is updated to the provided email.
Input#
FindOrCreateCustomerStepInput
FindOrCreateCustomerStepInputThe details of the customer to find or create.
FindOrCreateCustomerStepInput
FindOrCreateCustomerStepInputcustomerId
null | stringOptionalThe ID of the customer to find.
customerId
null | stringOptionalemail
null | stringOptionalIf the customerId
isn't specified,
find a customer with this email or create a new customer having this email.
email
null | stringOptionalcustomerId
isn't specified,
find a customer with this email or create a new customer having this email.Output#
FindOrCreateCustomerOutputStepOutput
FindOrCreateCustomerOutputStepOutputThe details of the customer found or created.
FindOrCreateCustomerOutputStepOutput
FindOrCreateCustomerOutputStepOutputThe customer found or created, if any.
email
null | stringOptionalThe email of the customer found or created, if any.
email
null | stringOptionalWas this page helpful?