I didn't use provisioning before 2016 so I can't comment on what it was like in 9.6 but in 2016.3 (and I assume 2017.1), you need only create the baremetal device with either serial or MAC address and the computer when built will pick that up under the correct circumstances.
The correct circumstance is typically to use an inject script action to inject an unattend.xml into c:\windows\system32\sysprep in the Post-OS installation section. The unattend.xml should be a known script either local to the template or globally (under provisioning->tools->install scripts) and the script must have the variable %ldHostname% in the computername section of the unattend.xml file (eg <ComputerName>%ldHostname%</ComputerName> ).
The injection action will cause the template to substitute variable data (device name of the baremetal device created earlier) for variable names (%ldHostname%) with your computer name.
When windows setup runs you'll get the correct computer name.