Way Moodle expects you to link up the columns in the Moodle gradebook with the other system is by using the idnumber column. You can put the identifier that the other system uses into that column, and that gets included in XML exports.
Gradebook
Web service to export gradebook data
This discussion has been locked so you can no longer reply to it.