Peculiarities, differences and work with customers and users
Users
Users are those who have access to the admin panel with different access rights. They may belong to groups of administrators, moderators, etc. to administer content, goods.
Customers
Customers are those who have registered on the site as a client to access their personal account. The personal account displays the order previously made by the client, wishlists, shopping cart, subscription to email newsletters, etc. The client can register delivery addresses for himself so as not to enter them when ordering, etc.
The site administrator can moderate clients by changing them groups, applying group or individual discounts and coupons for them, etc.
Guests
Site visitors may not register in order to place an order (if the store settings allow it). Such users belong to the "Guest" group. When registering, they need to enter information about delivery, payment, in contrast to registered users who have configured this for themselves in their personal account.
How customers and guests are displayed in our orders:
WooCommerce
Customer:
Guest:
This shows that for a customer there are filled out the ID, general information about the customer, as well as shipping address and payment information. The phone in the customer container is not filled because it does not apply to general information about the customer.
The email is also displayed by an additional field in the billing_address container.
Guest:
Here too the information that the customer has filled out during the registration gets into the customer container. In the case of a guest, the information he left when placing an order is in the billing information tab.
Similar to the Magento 1.
For a customer when placing an order the address filled in his personal account can be used or some other entered information. All the information on delivery and payment is displayed in the response from the app in the shipping_address and billing_address containers. Also, for the customer, his ID is displayed.
Additional fields are also displayed.
Phone number filled in when ordering or saved in the address in your personal account is displayed in shipping_address and billing_address containers.
The response of an order created by the guest does not display the customer ID. All information that was filled in when creating an order is displayed in the appropriate containers.
In Shopify, information about the customers is displayed in the customer container. The phone and email are also pulled from the contact information of the customer.
This phone number may be different from the one filled in by the customer when placing the order.
ID and telephone are not displayed for the guest.
All information left during registration is displayed in the appropriate containers.
In WooCommerce, order information is also displayed in the corresponding payment and delivery containers.
The email that has left the customer and guest are displayed in the billing_addres container in an additional field. The email field is also filled in the customer container, which is pulled from the field filled out by the customer in the personal account.
This is the order that the guest left:
Here you can see that the guest's ID in WooCommerce is 0.
In the customer container, email is not filled due to the lack of a personal account.
In Prestashop, information about payment and delivery of the order is also displayed in the appropriate containers.
There are additional fields in containers. For the customer, the address that he filled in in his personal account is pulled up.
There is no email in the additional fields. Email is displayed in the customer container.
The order that the guest has created looks like:
In the Prestashop, guests enter the customer table in the admin panel and get identified by email. For such customers there is the "Guests" group. They can be controlled from the admin panel - transferred or added to another group, etc.
Therefore, the guest has an ID in the container of the customer.
Methods for working with customers
There are methods for working with customers on app. You can add, retrieve lists of customers, information about the customer itself, search, add a customer group:
customer.list.json
customer.count.json
customer.info.json
customer.find.json
customer.add.json
customer.group.list.json
customer.group.add.json
customer.attribute.list.json
The model for adding a customer looks like this:
where "email", "first_name", "last_name" are required fields.
The response for customer.info looks like this:
There are additional fields that may differ depending on the platform.
The search of customers is done by such fields: 'email', 'first_name', 'last_name'.
To add customer groups with the customer.group.add.json parameter, you need to specify the following fields:
name - required
store_id або store_ids - optional.
There is also customer.attribute.list.json method for Magento (and Demandware) that displays the attributes for a customer.