How to calculate it
You ask “how would you rate the service you received?” on a short scale, often 1 to 5. The top scores count as positive: 4 and 5. With 200 responses and 160 positive ones, CSAT is 80%.
What it measures and what it does not
It measures how that interaction went. It does not measure loyalty: a customer can rate every visit highly and still leave because the price or the product does not work for them. That is what NPS is for.
When to ask
Right at closing, while the customer still remembers what happened. A survey that arrives a week later measures something else: what they remember of a service they have nearly forgotten.
The usual mistake
Looking only at the percentage. An 85% CSAT says little if you do not know who the other 15% are. Every low score is a case to handle: who helped them, what happened and what you do about that customer. And checked against reopened tickets, it tells you whether the problem was really solved.