Custom Fields

Deputy has the ability for third party applications to store custom fields within the product. In the Premium version of Deputy these will not be viewable but can be used for storage of data that may be useful for your application. In the Enterprise product, the system can be configured in a way where these fields do become visible to users.

The Deputy API allows you to read, update and add brand new custom fields to a Deputy install.

URL

The URL for custom fields is as follows

curl --request POST --url 'https://{install}.{geo}.deputy.com/api/v1/resource/CustomField

For details about the specific endpoints see CustomField

Example of adding a custom field

Using the above URL we are going to add a new custom field to the Deputy install. The purpose of this field will be to capture a reason why an employee might be leaving a shift late if they are clocking a while after the end of their scheduled shift.

Sample payload

{
	"System": "Timesheet",
	"Name": "Leaving Late?",
	"ApiName": "leavinglate",
	"Type": 8,
	"Validation": "nempty\nunq",
	"Valuelist": ["Yes - Personal Reason,Yes - Manager Requested"],
	"OperationUnit": [1]
}

This payload defines that it's using the timesheet part of Deputy, in the Type it has defined a multi-option list selector and defines that it cannot be empty and must be unique. In the Value list array, you can see the two options that will be presented to the employee when this field is triggered.

For more information about custom fields and custom field data usage visit:

CustomField
CustomFieldData