Disclaimer - This KB give you examples/ tips how to facilitate filtering criteria.
As this is just an example, it does not mean there is no any other way possible to achieve the goal.
CASE 1 - Use naming for criteria.
CAUTION - This applies to all devices that meets device filtering rule in template.
In this example, template is applied on all interfaces which ifDescription contains "Vlan".
(*) Value is case sensitive in this example.
Therefore, if the naming criteria is unique from device to device, this example may not fit your needs.
CASE 2 - Use 'User Tag' (Component User Defined Property 1)
CAUTION - You need to tag the same value to all interfaces you want to apply the template.
In this example, template is applied to the interface which has the same value in Component User Defined Property 1.