Loading...
Was this page helpful?
This documentation provides a reference to the findOrCreateCustomerStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step finds or creates a customer based on the provided ID or email. It prioritizes finding the customer by ID, then by email.
The step creates a new customer either if:
The step returns the details of the customer found or created, along with their email.
FindOrCreateCustomerStepInput
FindOrCreateCustomerStepInputcustomerId
null | stringOptionalemail
null | stringOptionalcustomerId
isn't specified,
find a customer with this email or create a new customer having this email.FindOrCreateCustomerOutputStepOutput
FindOrCreateCustomerOutputStepOutputemail
null | stringOptional