Whether you knew you wouldn’t be going back to work the second that first pregnancy test read positive or you made the decision while on parental leave, you still have to go through the process of formally resigning from your job. You should consider several factors prior to submitting your letter of resignation. When it comes to parental leave, timing is everything, which means you need to know exactly when it is the right time to leave your job.

Consider your timing, advises Parenting Magazine. While you may want to resign as soon as possible so that your employer can find someone to replace you, don’t turn in that letter of resignation just yet. Many employers have been known to revoke your employment privileges the moment you make it known you will not be back after your maternity leave, which could mean revoking your health care and benefits. Your boss may have to scramble to find a replacement, but it’s more cost effective after having a baby to ensure your health benefits remain intact as long as possible after you give birth, or you might be out a significant amount of money covering the cost of childbirth.

Talk to your boss, advise professionals at Life After Maternity Leave, a company designed to help women transition from the workplace to parenthood. Make sure you tell your employer that you will miss your company and that the decision wasn’t easy for you but that you have decided full-time parenthood is what is in store for your future. You will still need to provide a letter of resignation, but it may help to save your relationship with your boss if you talk to her prior to resigning. You never know when you might need a professional recommendation or network.

Offer to tie up loose ends, help find a replacement and help get that replacement settled, if you can do that while still taking care of your new baby, advises Eileen Doughty, who works at the Family and Home Network, which helps moms transition from work to motherhood. You can do that by offering your time over the phone to your replacement and organizing your job duties and contacts for her so that the transition is as seamless as possible for all involved.

Write and provide your boss with a short letter of resignation. According to Life After Maternity Leave, your letter should state that after a difficult decision, you’ve ultimately decided not to return to work. Thank your employer for the time you spent at the company and the experience you gained working there. Add a sentence that states that the letter serves as your formal resignation, list the date that your resignation is effective and sign the letter.