>> it cant check the condition because it was never told what number was.
Think about it in English. You have to check the condition first, then get the information about the salesman, then check the condition again. You want to ask the user for the Salesperson ID just before you check the condition because you don't want to ask for the rest of the information if they choose to terminate. So you should ask for the ID, then check the condition, then get the rest of the data, then ask for the ID, then check the condition, then get the rest of the data... and so on.
Now just find out where the while loop fits into that sequence (the check condition must be in the while part). Don't be afraid to put code before or after the loop to get it to work correctly.