Regarding inventions in performance of contractual obligations, these are inventions that are closely connected to the services described in the employment contract or related contractual documents. The creativity of the employee is why the employer pay them to create these inventions. Examples of service inventions include product designs for business purposes of the employer produced by a designer whose work contract includes "producing graphics design and other visual components" as one of their duties. The key factor in determining whether an invention is a service invention is its close connection to contractual responsibilities in the employment contract, rather than the location or timing of the invention's creation.
Incidental inventions are inventions that are not created in exercise of a listed contractual duty, but are still closely connected with the employee's employment. In such cases, the employer can reserve the right to acquire the employee's incidental inventions for fair compensation. An invention is likely incidental to employment if it is created in connection with work resources or during work time. However, even if the invention is created during the employee's free time, it may still qualify as an incidental invention if it is closely related to the employee's employment generally, even if the work contract does not explicitly foresee it. For example, a salesperson at a clothing store designs a better coat hanger, whether during work time or not, may be subject to the incidental invention rules. The invention or design is owned by the employee. But if the work contract reserved the right of acquisition, the employee must notify the employer, who then have six months to declare its intention to abandon the right or acquire the invention for a fair compensation. Otherwise, the salesperson is free to do whatever they want with their invention, subject to their other obligations. For example, the salesperson cannot use their invention rights in detriment to their current employer (e.g. selling the design to a competitor) due to their duty of loyalty under employment (but once the employment ceases, the duty ceases).
The situation where an employee has similar intellectual work for multiple employers is rare in Switzerland. If a conflict of interest arises because a work can be argued to be the result of contractual obligations of more than one employer, the employee is likely in violation of their duty of loyalty to the employers unless consent was given. In the case of a service invention created pursuant to the contractual responsibilities to one employer only, that employer is the owner of the invention from the beginning. The incidental case does not apply since the first employer only has the right of acquisition from the employee, not the other employer.
In the case of incidental inventions, I did not find any cases settled by court. If an incidental invention was produced on the premises of the other employer or used the resources of the other employer, the other employer probably has the priority claim, possible conflict of interests notwithstanding. If the invention is created during the employee's free time and can be reasonably seen as within the general missions within the framework of both employers, it would be difficult to decide and the whole circumstance would need to be taken into account.
If the invention is created during the employee's free time and can be reasonably seen as within the general missions within the framework of both employers, it would be much more difficult to decide and the whole circumstance would need to be taken into account.
Just as a sidenote, softwares as such are protected by the copyright law, and do not usually qualify as an invention or design. The employer has the exclusive usage right of softwares created in employement duties. Incidental creations of softwares on the otherhand are not regulated by law, but usually dealt with in employement contracts.