On the sign up form an additional field can be added so that the customer can insert a code / reference to relevant to them, this could be a salesman code. The information is then stored against the customer account. The data can be exported.