allow product reference to be automatically calculated in create function

useful for import modules