Dynamic Fields
Extend Your Integration with Custom Scripted Fields
Dynamic Fields allow you to go beyond Getint's built-in field support and sync data that isn't natively available through the standard field mapping interface. Whether you need to surface a deeply nested API value, compute a derived field, or populate a dropdown from a live endpoint, Dynamic Fields give you the scripting flexibility to make it happen.
The scripting language used is ES5 (JavaScript).
Supported Field Types
When creating a Dynamic Field, you'll need to select one of the following types depending on the kind of data you're working with:
String: Plain text values (e.g., a summary or description excerpt).
Number: Numeric values (e.g., story points, counts).
IdLabel: A single selectable option with an ID and a display label (e.g., assignee, priority).
IdLabelArray: A multi-select list of IdLabel options (e.g., labels, components).
Boolean: True/false values.
Date: A date value without time.
DateTime: A date value with time.
Understanding the Script Structure
Every Dynamic Field script uses a switch (mode) block to handle two or three distinct operations:
case 'value': Reads the field from the item returned by the source system's API.case 'set': Writes the value back to the source system when an update comes in from the other side.case 'options': (IdLabel and IdLabelArray only) Fetches the list of available options so they can be mapped in the integration settings.
The item variable holds the full JSON payload received from the initial GET request to the source API. The propertyValue variable holds the incoming value from the mapped field on the other side of the integration.
When a Dynamic Field is set to read-only, the case 'set' block is removed by default.
Example: String Field (Summary)
This example reads and writes a plain text field — in this case, the summary field from a Jira issue.
How it Works:
case 'value': Checks that theitemobject and its nestedfields.summaryproperty exists, then it assigns the value todynamicField['String']. Theitemobject represents the full API response, for example:
case 'set': When the mapped field is updated on the other side of the integration,propertyValuecarries the new value. This case packages it intoreqObjectin the format the API expects, so it can be written back.
Example: IdLabel Field (Assignee)
IdLabel and IdLabelArray fields represent dropdown and multi-select options, respectively. They require an additional case 'options' block to fetch the available values from the source API so they can be mapped in Getint.
How it Works:
case 'value': Reads the assignee'saccountIdas theidanddisplayNameas thelabel, building theIdLabelobject Getint expects.case 'set': Sends theaccountIdback to the API when an assignee is updated from the other side.case 'options': Calls the assignable users endpoint usingapi.fetch()and maps the results into{ id, label }pairs. These options will appear in the field mapping dropdown inside Getint.
Tip: Replace YOUR_PROJECT_KEY with the actual project key you're working with.
Available API Utilities
The following helper functions are available inside Dynamic Field scripts:
Function
Description
api.fetch('URL')
Performs a GET request to the specified URL and returns the parsed response.
api.log("message")
Prints a line to the sync logs — requires DEBUG log level to be enabled.
api.getRunCacheData('name')
Retrieves a previously cached value for the current sync run.
api.setRunCacheData('name', value)
Stores a value in cache for reuse during the same sync run.
Making Write Requests: If you need to POST, PUT, or PATCH data as part of your Dynamic Field logic, use the following, depending on which side the Dynamic Field is defined:
If the Dynamic Field is on the right side of the integration:
api.rightApp.post()api.rightApp.put()api.rightApp.patch()
If the Dynamic Field is on the left side of the integration:
api.leftApp.post()api.leftApp.put()api.leftApp.patch()
Debugging Your Script
Use api.log() statements to inspect values at runtime. This is especially useful when you're unsure how the source API formats a particular field.
Once you've confirmed the structure, you can remove the log statement and write the final field assignment.
Debug-level logs must be enabled in your integration settings for the api.log() output to appear.
How to Create a Dynamic Field
Follow the steps below to set up a Dynamic Field inside your integration.
Open your integration and navigate to your issue type mappings.

Go to the Field Mappings section for the relevant issue type and click the Create Dynamic Field button.

A panel will appear where you can:
Enter a name for the Dynamic Field.
Select the field type from the dropdown list (String, Number, IdLabel, IdLabelArray, Boolean, Date, or DateTime).

Once the type is selected, add the corresponding script to define how Getint should read and write the field. Refer to the examples above for the correct script structure based on your chosen type. When everything is configured, click Create to save the Dynamic Field.

The new field will now appear in the available field mappings list on the side of the integration where it was created, ready to be mapped to a field on the other side.

Once created, the Dynamic Field behaves like any standard field — it can be mapped freely and configured with a sync direction that fits your workflow.

While the examples in this article use Jira to illustrate the concepts, Dynamic Fields work across all connectors supported by Getint — including ServiceNow, Salesforce, Azure DevOps, Monday.com, ClickUp, Asana, Zendesk, HubSpot, and more. The scripting principles, switch (mode) structure, and api utilities are the same regardless of which tools you are integrating. Always refer to the target system's API documentation to determine the correct field paths and request formats.
Important Notes
Different systems return data in different formats — this is especially common with date fields and IdLabel-type fields. Always use api.log() to inspect the raw payload before writing your field assignment, and verify that the value you're passing matches the format expected by the receiving API.
Caching with api.getRunCacheData() and api.setRunCacheData() is useful when your script needs to make the same API call multiple times in a single sync run. Store the result on the first call and retrieve it on subsequent ones to avoid redundant requests.
Conclusion
Dynamic Fields are a powerful tool for handling non-standard or deeply nested data that falls outside Getint's native field support. By combining case 'value', case 'set', and case 'options', you can fully control how a field is read, written, and presented for mapping, giving you precise control over your integration logic.
If you need assistance building a Dynamic Field script for your specific use case, don't hesitate to reach out through our Support Portal. Our team is happy to help.
Last updated
Was this helpful?
