Custom Fields

A custom field object includes information for custom Buyer and Provider fields. You can use the API to include a custom field value when you create a work order, return a list of custom fields available for your company, or update the visibility of a custom field by client or project. To locate custom fields from the Field Nation Platform, click MANAGE > Custom Fields.

Note: Adding or updating custom fields from the API is not supported.

Custom Field Object

Parameter Type Example Mapping/Notes
id integer "id": 129 Custom Field ID. Read-only.
role string "role": "buyer" Buyer Field or Provider Field. Read-only.
Options
name string "name": "Custom Field" Field Name. Read-only.
tip string "tip": "Custom field example." Field Tip/Description. Read-only.
value string "value": "" Field Value. Can be included when you create a work order.
flags array "flags": [
"show_in_available",
"required"
]
Advanced Options. Read-only.
Buyer Options
Provider Options
type string "type": "phone" Restrict Allowed Values. Read-only.
Options
options array "options": [ ] type > predefined values. Read-only.
Includes a "" value if you "Allow blank values options."
dependency object "dependency": {} Show only under specific circumstances. Read-only.
(e.g., display this field if the parent field equals Yes)
id integer "id": 139 Parent Field ID.
operator string "operator": "equals" Comparision Logic.
Options
value string "value": "Yes" Parent Field Value.

Examples

When you get a list of custom fields available for your company, you can locate custom field details in the results > v2object.

Custom Field Object by Company, Buyer Field
Custom Fields Response by Company

Work Order Custom Fields Response

You can locate custom field values in the work order > custom_fields object.

"custom_fields": { }

If you've indicated a custom field as an Internal Ticket Number, it's included in the internal object and the custom field results. Custom field results include one object for Buyer Fields ("id":1) and one object for Provider Fields ("id":2).

{
   "actions":[],
   "internal":{
      "id":129,
      "name":"Internal Buyer Field",
      "value":"18855",
      "role":"buyer"
   },
   "metadata":{},
   "results":[
      {
         "id":1,
         "name":"General",
         "role":"buyer",
         "metadata":{},
         "results":[]
      },
      {
         "id":2,
         "name":"General",
         "role":"assigned_provider",
         "metadata":{},
         "results":[]
      }
   ],
   "correlation_id":"3dedf6003f639a20eba350ca06c0d9e2fa83f74b"
}

The example below includes a Buyer Internal Ticket Number and a Custom Buyer Field. It also includes a conditional provider field. The conditional field will display only if the Provider Field (Parent) equals Yes.

Work Order Custom Fields Response
Custom Field Object by Work Order, Provider Field