Cyclr Community
  • Forums
  • Tutorials
  • Documentation
    • User Documentation
    • Connector Guides
  • Resources
    • New Features
    • Blog
    • Changelog
    • Support Portal
    • Newsletter Archive
    Sign in
    Cyclr Logo
    Cyclr Logo
    • Forums
    • Tutorials
    • Documentation
      • User Documentation
      • Connector Guides
    • Resources
      • New Features
      • Blog
      • Changelog
      • Support Portal
      • Newsletter Archive

    About Cyclr

    6
    • Introduction to Cyclr
    • Minimum requirements
    • Glossary
    • Errors
    • IP Allow List
    • Legal notices

    Cyclr Console

    14
    • Partner Console Dashboard
    • The Builder
    • Reports
    • Console Configuration
    • General Settings
    • Notifications
    • Embedding Customization
    • Security settings
    • Data retention settings
    • Custom Service Domains
    • Handle transaction errors
    • Payload Size Limitations
    • Performance tips
    • GitHub Integration

    Connectors

    33
    • Introduction to Connectors
    • Connectivity Comparison
    • Connector Guides
    • Application Connectors
      • Introduction to Application Connectors
    • Utility Connectors
      • Introduction to Utility Connectors
      • Counter Storage
      • Cross Updating Preventer
      • Data Tools
      • Entity Cross Ref Storage
      • Generic File
      • Generic File Downloader
      • Generic Form
      • Generic Webhook
      • Data Storage
        • Introduction to Data Storage Connectors
        • Global Data Storage
        • Global Object Storage
        • Cycle Data Storage
        • Cycle Object Storage
    • Custom Connectors
      • Introduction to Custom Connectors
      • Methods
      • Triggers
      • Last Successful Run Date
      • Parameters
      • Scripting
      • Data Types
      • Paging
      • Custom Objects
      • Dynamic Custom Fields
      • Automatically Install Webhooks
      • Connector Standards
      • Settings
      • Authentication
      • Rate Limits

    Templates

    17
    • Introduction to Templates
    • Template Settings
    • Create a Template
    • Tools
    • Connectivity Tools
    • Map fields
    • Add Custom Fields
    • Custom Object Method Categories
    • Test Scripts
    • Collection splitting
    • Pass data between two steps
    • Test a template
    • Template versioning
    • Introduction to Cycles
    • Stop a cycle
    • Copy Cycles as Templates
    • Import or Export Templates

    Accounts

    5
    • Introduction to Accounts
    • Account Users
    • Sub Accounts
    • Connector Authentication Link
    • Export or Import Cycles

    Embedding

    17
    • Introduction to Embedding
    • ORBIT
    • Installing a Partner Connector
    • Embed Cyclr in an iFrame
    • Launch
      • Introduction to Launch
      • User Experience
      • Customize Appearance
      • Build Compatible Templates
      • Handle LAUNCH callbacks
      • Deploy LAUNCH
    • Marketplace
      • Introduction to Marketplace
      • Set up a Marketplace
      • Styling Marketplace
      • Deploying a Marketplace
      • Marketplace Callback
      • Marketplace Webhook Callback
      • Marketplace Settings

    API

    19
    • Introduction to the Cyclr API
    • Authentication
    • Authorize Account API calls
    • Install Connectors into an Account
    • Install a Cycle from a Template
    • Step Setup
    • Activate a Cycle
    • Install Connectors
    • Create an Account
    • API Example Walkthrough
    • Connector Authentication
      • Introduction to Connector Authentication
      • API Key Authentication
      • HTTP Basic Authentication
      • OAuth Authentication
    • Data on Demand
      • Introduction to Data on Demand
      • Get Account Connectors
      • Get Connector Methods
      • Call a Connector Method
      • IP Restriction

    Release Notes

    28
    • Introduction to Release Notes
    • 2025
      • 2025-06
      • 2025-05
      • 2025-04
      • 2025-03
      • 2025-02
      • 2025-01
    • 2024
      • 2024-12
      • 2024-11
      • 2024-10
      • 2024-09
      • 2024-08
      • 2024-07
      • 2024-06
      • 2024-05
      • 2024-04
      • 2024-03
      • 2024-02
      • 2024-01
    • 2023
      • 2023-12
      • 2023-11
      • 2023-10
      • 2023-06
      • 2023-05
      • 2023-04
    • Archive
      • Archive
      • 2022
      • 2021
    View Categories
    • Home
    • Documentation
    • Connectors
    • Custom Connectors
    • Dynamic Custom Fields

    Dynamic Custom Fields

    4 min read

    Adding Custom Fields Dynamically #

    Cyclr can add custom fields automatically to an authenticated Connector’s Methods, removing the need to add them manually for each installation.

    There are 2 ways to do this:

    1. If the API you are accessing has methods for retrieving object metadata, these can be used to define the fields.
      See Enhanced Dynamic Custom Fields below.
    2. If the API does not have such methods, Cyclr can parse an example response from an existing method.
      See Basic Dynamic Custom Fields below.

    Warning: The Method you select to retrieve custom fields will only be called once and without paging being performed. You should therefore set any paging parameters manually on that Method (e.g. “100” rather than using Cyclr values such as CYCLR_PAGE_SIZE) to ensure all fields are retrieved.

    Enhanced Dynamic Custom Fields #

    • Identify the method within the API that will return the metadata for your object. You will then need to create this method within the connector.

    Your goal now is to reshape the response of the method using connector script – to Cyclr’s required format:

    [
      {
        "cyclr_field_location": "CustName",
        "cyclr_display_name": "Customer Name"
      },
      {
        "cyclr_field_location": "CustomerId",
        "cyclr_display_name": "Customer ID"
      }
    ]
    • How you restructure the data into the above format will depend on the shape of your source data, but your connector script may look something like this:
    function after_action_paging() {
      if (method_response == null) return true;
      var original = method_response.data;
      var tempResponse = [];
      for (var i = 0; i < original.length; i++) {
        tempResponse.push({
          cyclr_field_location: "[data]." + original[i].id,
          cyclr_display_name: original[i].text,
        });
      }
      method_response = tempResponse;
      return true;
    }
    • Having set the Connector Fields to match the example in step 2…
      • [].cyclr_field_location
      • [].cyclr_display_name
      • etc

    …you now need to set the System Fields appropriately.

    If you used the “Generate Fields” functionality to create the above fields, the system field names will be incorrect so you will now need to update them.

    • In the Response of the method, set the System Fields to match the table below so that Cyclr can access the various parts of each field description. In the above example, the mappings would look like this:
    • The only required fields are [].cyclr_field_location and [].cyclr_display_name.

    If you are mapping data types from the object description, you will need to add some scripting to the method.

    This will vary depending on the structure of your method response, but as an example:

    // Example method response
    
    [
      {
        "cyclr_field_location": "CustName",
        "cyclr_display_name": "Customer Name",
        "cyclr_is_readonly": false,
        "cyclr_data_type": 1
      }
    ]
    // Example method response containing field values
    
    [
      {
        "cyclr_field_location": "Regions",
        "cyclr_display_name": "Regions",
        "cyclr_is_readonly": false,
        "cyclr_data_type": "string",
        "cyclr_field_values": [
          { "value": "UK", "label": "United Kingdom" },
          { "value": "US", "label": "United States" },
          { "value": "AUS", "label": "Australia" }
        ]
      }
    ]
    // Example method-level script
    
    function after_action() {
      // Check for a response
      if (method_response == null) return;
      // Remap fields to values that Cyclr will understand
      for (var i = 0; i < method_response.length; i++) {
        method_response[i].cyclr_data_type = select_dt(
          method_response[i].cyclr_data_type
        );
      }
      return true;
    }
    
    function select_dt(item) {
      /* The case values here will need to be changed to the values returned by your method, so
       instead of "string" it might be "str", and instead of "integer" it might be "int32".*/
      switch (item) {
        case "string":
          return 1;
          break;
        case "integer":
          return 2;
          break;
        default:
          return 1;
      }
    }
    

    • You should now update the response fields to look similar to this example:Opens image in full screen
    • Ensure that the For Enhanced Custom Fields option has been checked.
    • Now all you need to do is go to the method where you want to pick up custom fields, and select this method from the Custom Fields Lookup Method dropdown menu. You can do this for the Request, the Response, or both as required:
      Opens image in full screen
    • Cyclr should now automatically create custom fields on this method once it is installed.

    Table of System Fields #

    System FieldDescription
    cyclr_field_locationLocation of the custom field, e.g. [items].custom_field (required)
    cyclr_display_nameThe name to display the custom field as (required)
    cyclr_data_typeThe data type of the custom field: (optional)
    0=Not Defined
    1=Text
    2=Integer
    3=Float
    4=Boolean
    5=Date Time
    cyclr_data_type_formatCustom data type format for the custom field (optional)
    cyclr_default_valueThe default value to use for the custom field (optional)
    cyclr_descriptionThe description of the custom field (optional)
    cyclr_is_optionalIndicates if the custom field is optional when part of a request (optional)
    cyclr_is_readonlyIndicates if the custom field is read-only, if it is it won’t be added to any requests (optional)
    cyclr_is_hiddenIndicates if the custom field should be hidden when part of a request. Often used in conjunction with a default value (cyclr_default_value) (optional)
    cyclr_field_valuesA list of values and their labels for a field (optional)

    cyclr_field_values

    There are 2 formats supported for cyclr_field_values:

    A list of the value to be used by the connector, and its readable counterpart

    [
      { "value": "UK", "label": "United Kingdom" },
      { "value": "US", "label": "United States" },
      { "value": "AUS", "label": "Australia" }
    ]

    Or just a list of the values

    ["UK", "US", "AUS"]

    Basic Dynamic Custom Fields #

    • Select a method which is able to be called without any field or parameter values being set. This will be your “Source” method.
    • The response of this method should be in the same structure as your “Target” method (the method for which Cyclr will dynamically map custom fields).
    // Example:
    // Source method "List All Orders" response
    {
      "orders": [
        {
          "id": 1,
          "name": "John",
          "added": "2020-01-01",
          "customfield1": "abcd"
        }
      ]
    }
    
    // Target method "List New Orders" Response
    {
      "orders": [
        {
          "id": 29,
          "name": "Dave",
          "added": "2020-09-09",
          "customfield1": "wxyz"
        }
      ]
    }
    • Now all you need to do is go to the method where you want to pick up custom fields, and select this method from the Custom Fields Lookup Method dropdown menu. You can do this for the Request, the Response, or both as required:
      Opens image in full screen

    Cyclr will then attempt to determine the correct Display Name and Data Type of the fields found in the response object.

    For more control of the custom fields generated you will need to make use of Enhanced Dynamic Custom Fields at the top of this article.

    Share This Article :
    • Facebook
    • X
    • LinkedIn
    • Pinterest
    Custom ObjectsAutomatically Install Webhooks
    Page Contents
    • Adding Custom Fields Dynamically
    • Enhanced Dynamic Custom Fields
      • Table of System Fields
    • Basic Dynamic Custom Fields

    Company

    • Company
    • About Us
    • Security and Compliance
    • Pricing
    • Blog
    • Branding
    • Embedded iPaaS

    Legal

    • Website Terms
    • Privacy Policy
    • Terms and Conditions
    • Data Protection Agreement
    • SLA
    • GDPR

    UK Office

    +44 (0) 3300 102 525

    US Office

    +1 (646) 585-2525


    White labelled API integration framework for creating & managing in-app SaaS integrations.

    © 2025 Cyclr. All rights reserved.