Skip to main content

Column Types

Concept

For each column of a target data model, you can define a columnType to determine which format or - in some cases - which data type the output is supposed to have. By default, the columntType equals string. If you want a different data type for the output data, you can set the key to either int, float or boolean. Suppose you prefer the enumerated type (enum). In that case, you need to set columnType to category, and in the next step, you need to define the dropdownOptions array where you determine the selectable options. The cells of a boolean- or category-column are displayed as dropdown fields inside our user interface.

Apart from defining the data type, all the options mentioned above and the other options contain pre-built data validations to ensure that the user-submitted data is in the correct format. An error message is shown if the imported data does not fit the column type's validation rule. The error messages can be customized by using our i18nOverrides prop.

On this page, you will find a collection of all available options for the columnType prop within the nuvo importer, along with examples of valid input data and the corresponding output format that is returned in the onResults function.

To use the column types, you must define the columnType property of a column within the columns object that is part of the settings class.

Here is a small implementation example:

<NuvoImporter
licenseKey="Your License Key"
settings={{
developerMode: true,
identifier: "product_data",
columns: [
{
label: "Product ID",
key: "product_id",
columnType: "string",
},
{
label: "EAN",
key: "ean_gtin",
columnType: "gtin",
},
{
label: "Price",
key: "price",
columnType: "float",
},
{
label: "Manufacturing Date",
key: "man_date",
columnType: "date",
outputFormat: "MM/DD/YYYY"
},
]
/>

List of column types

Text (default)

Type"string"
DescriptionThe cells in this column are displayed as free text fields. The output has the data type string. string is the default columnType if no columnType is defined.
Input example"Hello World", "Nuvo GmbH" or "20095 Hamburg"
Output format            
[
{
company_name: "Nuvo GmbH",
},
];

Integer number (int)

Type"int"
DescriptionThe cells in this column are displayed as free text fields that display an error message if the input is not numerical or a decimal number. The output has the data type int. The display of the value is controlled by the property numberFormat.
Input example"1", "20", "318", "1.000" or "1,000"
Output format            
[
{
counter: 100,
},
];

Decimal number (float)

Type"float"
DescriptionThe cells in this column are displayed as free text fields that display an error message if the input is not numerical. The output has the data type float. The display of the value is controlled by the property numberFormat.
Input example"1", "20,2", "318,4", "10.000,25" or "10,000.25"
Output format            
[
{
price: 10.22,
},
];

Boolean

Type"boolean"
DescriptionThe cells in this column are displayed as dropdown fields with the options "Yes" or "No". The user can map the unique values of its imported and mapped column to either one of the option within the "Match Columns" step.
Output format            
[
{
deal_ongoing: true,
},
];

Category (dropdown)

Type"category"
DescriptionThe cells in this column are displayed as dropdown fields with the options defined within the dropdownOptions array. Therefore, in order to use this column type it is required to define the dropdownOptions property. In the "Match Columns" step, the unique values of the imported and matched column are assigned to the different options. You can also enable multiselection by setting isMultiSelect to true. The documentation for the dropdownOptions setting can be found here and for isMultiSelect here.
Output format                                 
[
{
shop_category: "Smartphone",
},
];

Bank Identifier Code (BIC)

Type"bic"
DescriptionThe cells in this column are displayed as free text fields that display an error message if the input does not match the bank identifier code format (spaces are not allowed).
Input example"SOBKDEBBXXX", "GENODEF1SFD" or "NTSBDEB1XXX"
Output format            
[
{
client_bic: "GENODEF1SFD",
},
];

Country Code Alpha 2

Type"country_code_alpha_2"
DescriptionThe cells in this column are displayed as dropdown fields with all available country alpha 2 codes as selectable options. The unique values of the imported and mapped column are assigned to these options within the "Match Columns". You can find a list of all valid alpha 2 country codes here.
Output format            
[
{
origin_country: "DE",
},
];

Country Code Alpha 3

Type"country_code_alpha_3"
DescriptionThe cells in this column are displayed as dropdown fields with all available country alpha 3 codes as selectable options. The unique values of the imported and mapped column are assigned to these options within the "Match Columns" step. You can find a list of all valid alpha 3 country codes here.
Output format            
[
{
origin_country: "USA",
},
];

Currency Code

Type"currency_code"
DescriptionThe cells in this column are displayed as dropdown fields with all available currency codes as selectable options. The unique values of the imported and mapped column are assigned to these options within the "Match Columns" step.
Output format            
[
{
price_currency: "EUR",
},
];

Currency EUR

Type"currency_eur"
DescriptionThis column type combines the amount as well as the currency information for euro. Whether the input is the amount, or the amount in combination with "EUR" or "€" symbol, it will all be normalized within the "Review Entries" step. The output object contains both information in separate properties, the amount as a float and the currency "EUR" as string. The display of the value is controlled by the property numberFormat.
Input example"40,00 EUR", "42,50€" or "45,22"
Output format                    
[
{
price: {
value: 45.22,
type: "EUR",
},
},
];

Currency USD

Type"currency_usd"
DescriptionThis column type combines the amount as well as the currency information for US Dollar. Whether the input is the amount, or the amount in combination with "USD" or "$" symbol, it will all be normalized within the "Review Entries" step. The output object contains both information in separate properties, the amount as a float and the currency "USD" as string. The display of the value is controlled by the property numberFormat.
Input example"40,00 USD", "42,50$", "USD 35,09" or "$45.22"
Output format                    
[
{
price: {
value: 45.22,
type: "USD",
},
},
];

Date

Type"date"
DescriptionThe cells in this column are displayed as date fields that display an error message if the input does not match the format defined in outputFormat.
info

With date, you can cover all your preferred date and timestamp formats such as MM/DD/YYYY, DD.MM.YYYY, YYYY-MM-DD, etc. Check out the outputFormat key to see which date variables are available.


Date DMY (deprecated)

Type"date_dmy"
DescriptionThe cells in this column are displayed as date fields that display an error message if the input does not match the "dd.mm.yyyy" format.
Input example"01.10.2022", "30.4.2020" or "27.02.2022"
Output format            
[
{
order_date: "01.10.2022",
},
];

Date ISO (deprecated)

Type"date_iso"
DescriptionThe cells in this column are displayed as date fields that display an error message if the input does not match the "yyyy-mm-dd" format.
Input example"2022-10-10", "2020-5-1" or "2022-02-27"
Output format            
[
{
order_date: "2022-05-15",
},
];

Date MDY (deprecated)

Type"date_mdy"
DescriptionThe cells in this column are displayed as date fields that display an error message if the input does not match the "mm.dd.yyyy" format.
Input example"10.1.2021", "04.30.2021" or "02.27.2022"
Output format            
[
{
order_date: "12.31.2022",
},
];

Date SQL (deprecated)

Type"datetime"
DescriptionThe cells in this column are displayed as SQL datetime fields that display an error message if the input does not match the "YYYY-MM-DD HH:MM:SS" format.
Input example"2022-01-20 10:12:13", "1999-01-31 01:59:30" or "2022-02-27 11:59:33"
Output format            
[
{
order_date: "2022-01-20 12:12:12",
},
];

Email Address

Type"email"
DescriptionThe cells in this column are displayed as email fields that display an error message if the input is not a valid email address.
Input example"[email protected]", "[email protected]" or "[email protected]"
Output format            
[
{
mail_address: "[email protected]",
},
];

European VAT Number

Type"vat_eu"
DescriptionThe cells in this column are displayed as free text fields that display an error message if the input is not a valid European VAT number. If you need more information regarding European VAT numbers, have a look here.
Input example"DE999999999", "DK12345678" or "FR12345678901"
Output format            
[
{
ust_id: "DK12345678",
},
];

GTIN/EAN

Type"gtin"
DescriptionThe cells in this column are gtin/ean fields that display an error message if the input is not a valid GTIN/EAN. Further information regarding the GTIN/EAN verification can be found here.
Input example"4270002835450", "12345670" or "012345000010"
Output format            
[
{
ean: "4270002835450",
},
];

International Bank Account Number (IBAN)

Type"iban"
DescriptionThe cells in this column are displayed as IBAN fields that display an error message if the input is not a valid European IBAN.
Input example"DE89370400440532013000", "BE71096123456769" or "AT483200000012345864"
Output format            
[
{
customer_iban: "AT483200000012345864",
},
];

Percentage

Type"percentage"
DescriptionThe cells in this column are displayed as percentage fields that display an error message if the input is not a numeric value nor contains a string with only numbers and a percentage sign (%). All valid inputs are converted into percent (0,12 -> 12%), but the output is a float. The display of the value is controlled by the property numberFormat.
Input example"12%", "12", "12,8" or "12.8"
Output format                
[
{
market_share: 0.1,
},
];

Phone Number

Type"phone"
DescriptionThe cells in this column are displayed as phone number fields that display an error message if the input is not a valid phone number (spaces are not allowed). The input needs to start with "00", or with "+" and the country code.
Input example"0049123419191919" or "+49123419191919"
Output format            
[
{
customer_phone: "0049123419191919",
},
];

URL

Type"url"
DescriptionThe cells in this column are displayed as website fields that display an error message if the input is not a valid url. The input is not allowed to contain a prefix like "www" or "https".
Input example"getnuvo.com", "comdocks.com/product" or "docs.getnuvo.com/sdk/start#technical-implementation"
Output format            
[
{
website: "getnuvo.com",
},
];

URL with https

Type"url_https"
DescriptionThe cells in this column are displayed as website fields that display an error message if the input is not a valid url beginning with "https".
Input example"https://getnuvo.com", "https://www.comdocks.com/product" or "docs.getnuvo.com/sdk/start#technical-implementation"
Output format            
[
{
website: "https://getnuvo.com",
},
];

URL with www

Type"url_www"
DescriptionThe cells in this column are displayed as website fields that display an error message if the input is not a valid url beginning with "www".
Input example"www.getnuvo.com", "www.comdocks.com/product" or "www.docs.getnuvo.com/sdk/start#technical-implementation"
Output format            
[
{
website: "www.getnuvo.com",
},
];

ZIP Code AT & DE

Type"zip_code_de"
DescriptionThe cells in this column are displayed as zip code fields that display an error message if the input is not a valid German or Austrian postal code.
Input example"12345" or "1234"
Output format            
[
{
address_zip: "12345",
},
];

Full Example

Below is a code snippet of a target data model containing all column types:

columns = [
{
key: "string",
label: "Text",
description: "Normal Text field",
columnType: "string",
},
{
key: "integer",
label: "Integer",
description: "An integer number.",
columnType: "int",
},
{
key: "float",
label: "Float number",
description: "A float number. ",
columnType: "float",
},
{
key: "bool",
label: "Boolean",
description: "A yes no field",
columnType: "boolean",
},
{
key: "bic",
label: "BIC",
description: "Bank Identification Code",
columnType: "bic",
},
{
key: "iban",
label: "IBAN",
description: "Put a correct IBAN number ",
columnType: "iban",
},
{
key: "currency_code",
label: "Currency code",
columnType: "currency_code",
},
{
key: "eur_currency",
label: "EUR currency",
columnType: "currency_eur",
},
{
key: "usd_currency",
label: "US currency",
columnType: "currency_usd",
},
{
key: "date",
label: "Date",
example: "05/03/2023",
columnType: "date",
outputFormat: "MM/DD/YYYY",
},
{
key: "mail",
label: "Email Address",
columnType: "email",
},
{
key: "vat",
label: "VAT number",
description: "EU VAT number",
columnType: "vat_eu",
},
{
key: "gtin",
label: "GTIN",
columnType: "gtin",
},
{
key: "share",
label: "Percentage",
description: "Provide percentage number",
columnType: "percentage",
},
{
key: "phone",
label: "Phone number",
columnType: "phone",
},
{
key: "url",
label: "URL",
columnType: "url",
},
{
key: "example_https_url",
label: "URL HTTPS",
columnType: "url_https",
},
{
key: "example_url_www",
label: "URL WWW",
columnType: "url_www",
},
{
key: "country_code_a2",
label: "Country Code Alpha2",
columnType: "country_code_alpha_2",
},
{
key: "alpha3_code",
label: "Alpha3 country code",
columnType: "country_code_alpha_3",
},
{
key: "zip",
label: "ZIP Code",
columnType: "zip_code_de",
},
];