METHODS FOR NAMING MACOS COMPUTERS
While I'm training customers on how to manage their computers with Jamf | Pro, I'm often asked "How can I rename my computers based on a specific naming convention?" My answer often is that, while we do have several ways to rename computers through the GUI, it's probably not going to fit your needs. However, leveraging the API and a bash script, we can easily achieve what you're looking for.
I'd like to note that, although most admins want a specific naming convention, upon further questioning it becomes clear that with the power of Jamf Pro at their fingertips, they no longer need a strict naming convention for their computers. Let the users name their computers whatever they want, this is a great step for them to feel that they have ownership of their computer. For instance, at Jamf we do not enforce naming conventions for our computers, and mine is called Photography Raptor, which goes well with my old SLR decal I have on the front of my laptop.
However, there are use cases for strict naming conventions for computers. Maybe you're binding to AD, and want to know who has what computer based on the computer name from your AD Server. Setting the hostname can also allow you to see which computers are on the network without having to log into Jamf Pro to check. Whatever the case is, here are some options you have available to you (hint, if you want to just know the best way, skip to Scripting a Solution)