Provisioning Template Variables

Is there a document that describes all the variables available to provisioning templates?

I can not find such a thing in the official documentation. Thus far all my templates have been based upon variables i have found in the provided templates.

Im particularly interested in how "Contacts" are exposed to the template files
 
I'm not sure if I'm answering your question, but basically you can make your own variables.

For example under devices and settings, this is my custom variable for a Cisco SPA ring tone
settings.png

So after putting that in the GUI you'd insert the variable {$spa_ringtone} into the appropriate spot in your template.

There are also variables that seem to get pulled from postgres. like this one {$row.device_key_type} , etc..

I know this probably isn't what your looking for but maybe it will give you a clue that will point you in the right direction.
 
If you look at the "inbuilt" variable {$row.device_key_type} and you do a little spelunking into the database you'll see it matches a column in table v_device_keys labeled: device_key_type. This is how that particular variable is populated (or at least it matches the form field being populated).

Now if I had to guess you might find the same variable syntax works for the v_contact tables as well. Obviously you'll have to do some trial and error to find out for sure.

Please report back what you find out as I do a lot of template customization as well.