A quick and effective resolution of any conflict with a customer can actually increase their loyalty to your company. A majority of customers will continue doing business with you if they feel you have corrected the problem that instigated the complaint.
Here are some suggestions:
Empathize with their emotions. Listen carefully and let them blow off some anger or frustration. Get as many "specifics" as possible and then clearly restate the problem. Confirm that both parties agree on the details. Offer as many alternatives as possible and then allow the customer to decide on which alternative to use.
The most important part of creating a customer advocate for your company is after agreeing on a solution and solving the problem, be sure you do more than you promised.