If you are in a service industry......:
Show the customer that you value his business....do what you promise to do.
Don't tell him after he has cancelled the contract due to non performance. Show him before he leaves.
Afterwards, don't apologize and tell him how much you value his business and want to make it up to him. Don't make promises to do better. He won't believe you.
Do better first, before you lose that customer. At least do your job.
When he calls you and tells you why he is unhappy, don't blow it off. Don't ignore him until he leaves, address his concerns before you get notice of cancellation of contract.
It is a LOT harder to fix things you should have dealt with after the customer gets mad and leaves.
And especially don't ask how you could have done better. He told you BEFORE he left.
Yes, I am pissed. (Cintas)