national delegates are elected at district or state conventions, by delegates elected at either the precinct level or some other lower level. For example, when Minnesota used the caucus system, delegates to the state senate district convention were elected at the precinct causues. Then, at the state senate district convention, delegates were elected to the congressional district convention, where state convention delegates were elected. At each stage, proportionality for candidates was maintained. Delegates at each stage are firmly pledged to candidates.
It's complicated, but it works. In Minnesota, now, delegates will be elected at the congressional district convention,and statewide delegates will be elected at the state convenion. Again proportionality from the lower level will be preserved in those elections, and delegates will be pledged to specific candidate.
All of those things can be hard to understand unless you're in there at those lower-level conventions. The rules and how things are carried out vary from state to state. Some states use congressional districts. Others use state legislative districts. It depends on how many delegates to the national convention need to be allocated, and that varies based on how the state voted in the last presidential election.
Confusing? Yes, it is, especially in a state that's unfamiliar to you. It's confusing in your own state, unless you're involved in the allocation process.
What's important is that the proportionality, based on actual individual voter's votes, is preserved. The 15% viability rule, however, applies at all levels.