JRF is right on point. FC can be a tiebreaker for upgrades etc. DL says the 3 criteria are FF status, fare, and travel problems (e.g. an earlier flight cancelled.)
Of these 3, it's not clear (at least to me) what's most important, but I suspect that FF staus comes in close to last (e.g. a GM on full fare coach probably has a higher priority than a PM on a discount.) Nevertheless, FF status does matter, particularly when the other two are tied.
Within FF , it appears to first be medallion level, then MM (unforunately, apparently without regard to the number of M's) and and then FC, which has made a difference for me on those occasions when there's been another PM/MM.