Creating products hierarchy and logic