The vWork website promotes the use of templates for web users to create and manage their jobs.
This makes it easy for web users to create the same job type over and over again.
The Jobs API
The use of templates is not supported via our standard API. You define what a job looks like when you send the job XML to the API.
However, in vWork, the template name is used for reporting and search filters. It can be handy to add the template name to all jobs created via the standard API. There is a field in the API called "template_name" that you can use as a free text field to describe the job. It shows the template name clearly on both the website and the mobile app.
If you include a template name when creating a job via the API, we will attempt to include this job in any alerts or reports that are run for that template name. (This assumes that you have a matching template present in your account.)
However, we may not always be able to include these jobs. For example, when a user creates an alert for a step, or custom field, that exists in the web template but is not included in the job created by the API.
Best practice when using the standard API is to create the job template in vWork, run a GET command to pull out the XML for the template, then strip out all of the unwanted detail, and use this XML as the basis for creating jobs via the API. This will overcome the majority of situations where you may have inadvertently excluded a job, created by the API, from a report.
We are happy to assist with this process by providing sample XML on request once your templates have been created.
The Templated Jobs API
The Templated Jobs API does use templates saved in your vWork account to create jobs via the API. You supply us with the template name (or template ID) that you wish to use to create a job. We then inherit everything we can from the template including step names, custom field labels, custom field logic, job duration, tags, and time windows, among others.
You may also supply us with other values that you want to include with the job that aren’t part of the template such as a customer ID, customer name, job address, custom field values, or invoice line items.
The Templated Jobs API works well for the initial job creation and our standard API can then be used to manage every other aspect of the job such as when you update, cancel, download or delete jobs.
You can read more about the API and job templates in our API Documentation which you can find at www.vworkapp.com/api.