I think Robin and Paul have covered this off well, but I’ll add and re-iterate a few points. It is worth noting that this is the same process as is used for deep sky imaging. The main difference is that you can’t use “sky flats” or just any kind of flat lamp. Instead you need a flat lamp that produces a nice smooth continuous spectrum. The LHIRESIII, ALPY, and LISA all have such a flat lamp built in.
I’ll add that your calibration frames need to be taken at the same CCD temperature, and this should be as cold as possible, whilst ensuring that your CCD can easily maintain this temperature. I find that my SXVR-H694 can hold -20C during the Summer as well as the Winter months.
Best practice is to take of the order of 20+ frames of each type. I was actually taking a new set of darks and bias frames last night. Long overdue as over time the performance of a CCD can change. I try to retake darks and bias frames every 6-12 months. Flats I retake about once a month if I don’t touch the spectrograph. If I change anything on the spectrograph then the flats have to be retaken. This includes focusing the spectrograph collimator lens, but not refocusing the telescope.
I know that John Paraskeva is writing some new calibration routines for BASS. Though MaxImDL has perfectly good calibration routines which work fine for spectroscopy.