@ Mike
Install and activate this. It is a custom Names templates with the format you need. It’s also a basic example of how to use the Template API.
I hope that helps!