Enterprise cloud commerce business Demandware has agreed to buy retail software company Tomax for a total of US$75m, with the deal expected to close in January.