Boiler/water heater venting.

I had the chimney inspected on my home, and I have a gas boiler and gas water heater both venting into a single fireplace flue. I am contracting to have the fireplace sealed and proper venting installed.

My question is, how should the boiler and the water heater vent together prior to entering the newly lined flue? Should the water heater vent into the boiler vent, or the other way around? Should one be above the other?

Typically, the smaller appliance would vent above the other with a wye.

So the boiler would vent towards the main flue, then the water heater’s vent would join into that before going up the chimney? Is that correct?