Customer Accounts

In this document, you’ll learn how registered and unregistered accounts are distinguished in the Medusa application.

has_account Property#

The Customer data model has a has_account property, which is a boolean that indicates whether a customer is registered.

When a guest customer places an order, a new Customer record is created with has_account set to false.

When this or another guest customer registers an account with the same email, a new Customer record is created with has_account set to true.


Email Uniqueness#

The above behavior means that two Customer records may exist with the same email. However, the main difference is the has_account property's value.

So, there can only be one guest customer (having has_account=false) and one registered customer (having has_account=true) with the same email.

Was this page helpful?
Edit this page
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break