Here's a practical suggestion from the Court of Appeal.
No. Make that a command.
When you make a CCP 998 settlement offer, you can (obviously) include a specific dollar figure that you'll accept (or pay), but you can't include the condition that the party execute "a written settlement agreement and
The Court of Appeal holds that such a condition makes the offer too indefinite. We don't know what exactly would be in the (unspecified) settlement agreement. And we don't to resolve fights about what is "normally" in such an agreement or what is atypical.
So if you make such an offer, and the other side rejects it, you're not entitled to your costs. Even if you do better at trial than your 998 offer.
So leave that stuff out.