Your first thought is often one of dismay. Another sale lost to the big guy. Another customer shopping at my competitor. When you ask them what they are looking for and they tell you about buying something from another store, it is hard not to show your disappointment.
Except you shouldn't be disappointed. You should be happy. Why?
First, they came into your store. Not everyone who shops the competition is coming through your door, too. But this customer did. Celebrate her! Here's a deep dark secret... even your best customer has been to your competitor more than once.
Second, you now have access to a spy. Rather than change out of your uniform and take the time to go scout the competitor incognito, you have someone who just did that for you. And from the point of view of a customer, too (instead of your jaded, biased, store-owner mentality). Get her to talk about her experience and you'll learn far more than if you went yourself.
Third, you have the easiest opening ever into discovering what the customer likes and wants.
When you find out a customer has been to another store, simply say, "That's awesome! What did you see there that you liked?"
You've praised her, which makes her feel good.
You've asked her expertise, which makes her feel good.
You've listened intently, which makes her feel good.
You've identified what rocks her world so that you can rock her world, too, which makes her feel good.
You've gained valuable insight into both your customer's mind and what your competitor is doing, which makes you feel good.
Sometimes being second can be a real winning proposition. You just have to look at the opportunity the right way.
PS Most importantly, if you listen closely, your customer just told you how you can treat her better than your competitor, so you now have a blueprint to win her over. Sure, you may have lost the initial sale she made at the other place, but if you can win the rest, you can win her friends so that you'll be first with them.