If you have specific criteria for the reference number then it will need to be a custom thing that you generate manually based on your requirements. By default eCart uses the session id as the unique identifier for the order. This is the value you see as your order number. It will be inserted into the db for the order reference id. It is usually a good length string that contains both numbers and characters.