Name tags are the easiest, but sometimes you may need to ask their name if your report does not allow a name OR description. Tags hidden under long flowing hair are the worst and some companies allow you to report they had on a name tag but it was covered by their apron or hair or jacket. Look at your report to determine how aggressively you need to go after a name.
If you 100% MUST have the name, I am a ballsy old lady who will push hair aside and then comment (with a smile of course), "Gina, what a lovely name. I had hoped my grand daughter would be named Gina." Or without moving the offending locks you can try, "Are you Gina? You look like Gina who went to school with my son David." The employee is likely to say, "No, I'm Beverly." Then there is the direct approach of asking what their name is because you want to check when you get home and [give them a call if you have more questions] or [make sure you get credit for the sale if I decide to buy it because you have been so helpful]. This of course depends on the nature of your inquiry.
The toughest ones to deal with are when you are dealing with an obvious male (note Adam's apple) wearing a name tag saying "Beverly" or a very obvious female wearing a name tag saying "Eric" with no 'a' at the end of it.