Commerce
Customers
Customers, customer groups, and addresses.
A customer is a buyer. In Waylo Commerce a customer who works for a business is also an employee of a company, but the customer record is still the core one.
Registered and guest customers
has_account | How it is created | |
|---|---|---|
| Guest | false | Placing an order with an email and no sign-in. |
| Registered | true | Signing up, or created by a merchant. |
A guest and a registered customer can share an email. They are separate records.
Signing up
- Get a registration token from
POST /auth/customer/emailpass/register. - Create the customer with that token.
- Sign in with
POST /auth/customer/emailpassto get a token for later requests.
To sign up a business, use company signup instead. It creates the customer and the company together. See Authentication.
Customer groups
A customer group is a set of customers that share prices or promotions.
- Groups are managed on admin routes only. Buyers can't see or change their groups.
- Price lists and promotions target groups with the
customer.groups.idrule. - Group names are unique.
Every company has its own customer group, created with the company and named after it. Adding or removing an employee updates the group. Don't change a company group's members by hand; manage employees instead.
Addresses
- A customer has a list of addresses. One can be
is_default_shippingand oneis_default_billing. - Customer addresses are personal. Company addresses (shared by all employees) are on the company address routes.
- A cart copies an address when you set it, so later edits to the saved address don't change past orders.
Routes
- Get and update the signed-in customer, and manage addresses (store)
- Customers, customer groups, and set a customer's groups (admin)