When you detect that an incorrect agent is paid you have the option to (re) assign the Rep ID to the correct agent. You can also transfer the account if the value you are using / importing for Rep ID and Account is the same.
An easy way to know which Rep ID you need to assign is to have a second window open with the items, if you view an individual item you will find the Rep ID in the Info area showing in the screenshot below.
Top menu >> Reps >> View the rep
Click Assign located in the Rep ID box
Choose Assign existing Rep ID
Select the supplier by clicking on the supplier name
Leave the radio button From assigned Rep IDs and find the Rep ID in the dropdown or paste the ID if you have copied it.
Finish when done.