Hi there,
I'm setting up a DB for a typical e-commerce store and update N4J every night. It all comes down to this:
- order -> store
- order -> customer
- orderline -> order
- orderline -> product
- product -> categorie
The problem i'm having is with the order -> customer
. Ideally the customer is a logged-in
customer and not a guest
. If that is the case there is a customer_id
in the order. If not I have almost all the data on the order itself. Only properties i'm missing is the created
and updated
fields.
I was thinking to create the customer based on the email from the order itself instead of the customers endpoint. Of course it could happend that users with an account update there email. One other thing I was considering: use customer_id
if logged in and else email
as the id, then the created and updated timestamps would be empty.
Any thoughts?
Remco