I have done the nitty gritty (i.e. scoring),sat in IM RoL meetings at more than one place now, and talked to those who have done similar at other places. It's a pretty similar across the board. Applications go through a screening process where after filtering out red flags, PDs generally have some scoring system. This scoring system with subjectivity/connections sprinkled in determines interview invites. The interview is conducted and truthfully with a larger field like IM, most people have similar performance. Post-interview, the same factors are looked at...just more carefully/holistically (i.e. are those 3 publications on PubMed or are they conference abstracts? or... Yeah they 260 is nice, but what's this 3 month delay the student took to take Step 2 CK?). The top factors IM cares about are Medical School Reputation, Step 2 CK, Clerkship grades/AOA. Other factors that can be a boost are publications, particularly if you any first author ones or impactful ones. PhDs help too. In general, AOA can level the playing field for someone from a less reputed school. After that, connections and letters can have a varying impact. After that, few leadership/teaching opportunities like Class President, etc. matter can be impactful. Otherwise, most are diluted by the fact that everyone has something.
If you want to match into a top IM program your application should be well-balanced with an inconspicuous record. Any red flags like failed stuff/professionalism issues will tank you...but there's no hard and fast rule. I have seen people with Ps in medicine and no publications match, albeit this was from upper mid tier schools.
General trend illustrating above point.
Ex. 1) 260, top school - P/F grading but good comments on deans letter, 1 first author publication, 2 others -> Strongest
Ex. 2) 255, H in Med, 1 mid-author publication-> Strong
Ex. 3.) 275, P in Med (most HP/H), 1 first author publication-> Less Strong
Ex. 4.) 260, HP in Med, 1 first author publication, failed Step 1, 3 month delay -> Screened out/DNR at a top program.