Enhanced custom fields use metadata endpoints to understand and access the custom fields of an API and implement them within Cyclr dynamically. To implement custom fields within Cyclr, the API must have metadata endpoints that return information about custom fields.
There are two requirements which these metadata endpoints must have:
- The metadata endpoints must be fixed and not require parameters.
- The metadata endpoint must return at least a unique identifier for each custom field. In most cases this will be a field ID.
Cyclr Fields
Cyclr stores enhanced custom fields in an array of objects with possible fields shown in the table below.
These are used to standardize metadata endpoint responses into a singular format that Cyclr can understand and dynamically translate into enhanced custom fields.
The below fields need to be added to Response Fields of metadata methods when they are set in script. For example, if only cyclr_field_location and cyclr_display_name are set in script, then only these fields need to be mapped.
| Connector field | System field | Data type | Required? | Description |
|---|---|---|---|---|
| [].cyclr_field_location | cyclr_field_location | String | ✓ | The location of the custom field in either the request or response of the method the metadata is used for. |
| [].cyclr_display_name | cyclr_display_name | String | ✓ | The display name of the custom field in the Cyclr UI. |
| [].cyclr_data_type | cyclr_data_type | Integer | The data type of the custom field. This will impact how Cyclr handles the data in method requests and/or responses. |
A more detailed description of the possible Cyclr fields can be found in our Documentation.
The Metadata Method
In order to create enhanced custom fields, the first step is to identify the metadata endpoint from the API. This endpoint should be fixed and should not require parameters as well as returning an ID for each custom field.
Scripting
Each 3rd Party API has it’s own data structure for handling metadata. For this reason, in order to implement custom fields, you will need to manipulate the response to fit with Cyclr’s standardized data structure as detailed in the table above.
Therefore, you will need to add connector level script to get the enhanced custom fields.
Please note that changing or amending custom fields script or the method will require you to delete and reinstall the connector to trigger the lookup again. Just like any connector level change.
You can find more resources on Custom Fields in our Documentation: