Also add 'affiliate_id' in the user session : the param contains the id of the saleperson to assign if the current user create an SO. This param is passed by the URL query param, then stored in the session.