When making an entry in one entity, how to update another
I am currently designing my domain model, I have two entities Customers, containing all their data and the pricing specific to them for our products A table of all the products and specifications My question is that when we create a new product, how would I get it to automatically create a new entry in the customer entity, so that pricing could then be updated? Any advice is greatly appreciated.
Three ways out:
You can use After Commit event handler on the product entity to update the customer entity.
You can use After Commit event handler to submit asynchronous microflow to update the customer entity.
You add this functionality into the microflow which creates a new entry into product entity.