There are various steps the system takes to choose a template.