One of the questions that appear in the group with some regularity is whether the thirteenth salary is mandatory in Switzerland. The short answer is: it depends on your contract. The most complete answer requires a little more.
The Swiss Code of Obligations does not set a thirteenth mandatory salary for all workers without distinction. What determines whether you are entitled to it is, first of all, your individual employment contract. If it appears there that you will receive a 13th salary, it is an enforceable right. If there is a collective bargaining agreement (CCT) applicable to your industry that provides for it, it is also mandatory. And there is a third lesser known assumption: if a company has paid a thirteenth salary continuously for several years without conditions or express restrictions, it can become a de facto contractual custom, which makes it equally enforceable. Swiss jurisprudence has recognized this in more than one case.
What is not mandatory by general law is that all companies pay a 13th in the absence of those conditions. A company that does not mention it in any contract, is not bound by CCT, and has not paid it on an ongoing basis, is not obligated. That said, in practice it is a fairly standard condition in the Swiss labour market, especially in medium and large companies. Not seeing it in your contract after years in the same place deserves a direct question to HR, and in writing.
A situation that should be monitored in particular is the dismissal or dismissal in the middle of the year. In these cases, the thirteenth salary corresponds proportionally to the months worked. If you go out in June, you get half of it. Whether the company calculates it and pays it spontaneously or not depends a lot on whether you ask for it and ask for it at the right time.