The order I would follow would be to root it, then install Clockwork ROM Manager onto it, then do a full backup of the current setup, then install the new ROM. That way if anything does go wrong which IME is unlikely, or if you just don’t like the change, you have a full backup to restore which will put the phone back into exactly the same state as at backup.
Edit – Clockwork also makes switching, managing, installing and dealing with recovery and ROMs far easier. Get that on there first after rooting.