Custom fields can be enabled in any of our products to allow end users to add fields to the template if they need to import additional information that isn't included in the original template. The field name will be the column header in the original file.
In Portal 2.0, they can be enabled by including
in your config when implementing Flatfile Portal 2.0. Other options available can be found in our developer documentation here.
In Portal 3.0 and Workspaces, custom fields are enabled on the Template itself. To enable the Custom fields feature, navigate to the relevant data template by going to Templates in the main dashboard navigation on the left-hand side and clicking on your chosen template. In the template, go to the Settings tab. Under Custom Fields, check the checkbox to allow users to upload Custom Fields, then click the Save button on the top right of the screen to apply the change.
Now that the feature is enabled, your users can create custom fields when they import data and reach the matching step. To create a custom field, click on the drop-down menu under Template fields and select "Add as custom field" at the bottom of the list. The field will appear in the final data review step, where data can be reviewed and edited.
Custom fields are remembered in Flatfile Workspaces
Custom fields that were previously uploaded will be automatically added to the Template fields drop-down menu as optional fields. Your customer can then match to them when importing new data.
Future imports to the same template in the same Workspace will see those fields in the dropdown, with a “custom” label next to them.
How is a custom field name (label) determined? The field’s name (label) will be determined automatically from the field header in the uploaded file. For example, in the screenshot above “Phone” will be created as a custom field.
How is a custom field internal key determined? Custom fields will be created with an internal key of "custom_[label]. The label will be set in lowercase, and any spaces will be changed to underscores. For example, a custom field with the name “Phone” will appear as “custom_phone” as an internal key. See example below.
What data type is a custom field? All custom fields are created as string-type.
How will custom fields be identified when fetching data via the API? Records that contain custom fields can be identified with `custom: true`. Below is an example of phone added as a custom field: