The moment of greatest leverage in any technology relationship is the week before signature. After that, the vendor holds your data, your configuration and much of your institutional knowledge. Yet exit terms are often left as a placeholder: "to be agreed."
Four things to settle in writing
First, who owns the data, and in what format and timeframe it comes back. Second, whether source code and configuration sit in escrow, and exactly what releases them. Third, what the vendor must do to help a successor take over, and at what price. Fourth, what events allow you to terminate without penalty.
Price the transition assistance now, as a schedule to the agreement. A vendor that is losing your business has little reason to be generous.
Treat transition as its own agreement where you can. Keeping it separate from the master agreement lets you negotiate exit terms without reopening liability, pricing and change mechanisms you have already settled.
