File Format - Customer / Customer Patch

Customer File Format

The first line of a Customer CSV file must be the header row.

A customer instance is a group of rows in the CSV file that are sequential and include the same required fields. Data relating to fields specified under Base Headers and Multi-Column Headers must be specified in the first row of a customer instance. Additional rows of a customer instance may only include fields specified under Multi-Row Headers.

Customer Patch File Format

The Customer Patch file allows users to PATCH partial data for a given customer. This means that the integrator does not need to populate every field in the .csv to update a single field. If an integrator wants to remove / set a field as NULL or empty string in Tulip, they can simply provide the string ‘SET_AS_NULL" in the appropriate field and that field will be emptied.

The customer patch file format is the same as the Customer File format and all rules should be followed when providing a Customer Patch file, with the exception of the following.

  • Important Date (N) Type / Important Date Type - Must be a string which corresponds to ImportantDateTypes.externalId.
  • Address (N) Type / Address Type - String Enum: one of address-billing, address-Home, address-mailing, address-shipping, address-vacation
  • Social Profiles (N) Type / Social Profiles Type - String Enum: one of whatsapp, wechat, line
  • Phone Numbers (N) Type / Phone Numbers Type - String Enum: one of phone-home, phone-mobile, phone-work, phone-other
  • Loyalty Tier ID - Must be a string identifier and not an integer

Spec

The following table shows the accepted CSV columns for the customers entity. Note that any columns including N denote a dynamic integer. A column specified as Field N signifies that you can use columns Field 1, Field 2, …, Field N to allow for multiple values per record of the given field, similar to an array.

CSV HeaderData TypeGroupRequiredDescription
UUIDstringNoUUID of an existing customer. This can be used to target an existing customer that has not been assigned an externalId. This record import will fail if a customer with a matching UUID is not found.
Customer IDstringYesExternal identifier of the record
First NamestringNoCustomer’s first/given name
Last NamestringNoCustomer’s last/family name
DisabledbooleanNoWhether or not the Customer is disabled
ImagestringNoURL of an image to use for this Customer
EmailstringEmail AddressesNo
Email DisabledbooleanEmail AddressesNoWhether or not the Customer is disabled
Email IDstringEmail AddressesNoExternal identifier of the record
Email is PrimarybooleanEmail AddressesNo
Email NstringEmail Addresses NNo
Email N DisabledbooleanEmail Addresses NNoWhether or not the Customer is disabled
Email N IDstringEmail Addresses NNoExternal identifier of the record
Email N is PrimarybooleanEmail Addresses NNo
Email N TypestringEmail Addresses NNo
Phone Number IDstringPhone NumbersNoExternal identifier of the record
Phone NumberstringPhone NumbersNoThe Phone Number (using E164 format)
Phone Number TypestringPhone NumbersNoType of this Phone Number
Phone Number DisabledbooleanPhone NumbersNoWhether or not this Phone Number is disabled
Phone Number is PrimarybooleanPhone NumbersNoWhether or not this is a primary Phone Number
Phone Number Country IDintegerORstringPhone NumbersNoCountry ID of this Phone Number (externalId resolvable)
Phone Number N IDstringPhone Numbers NNoExternal identifier of the record
Phone Number NstringPhone Numbers NNo
Phone Number N TypestringPhone Numbers NNo
Phone Number N DisabledbooleanPhone Numbers NNoWhether or not the Customer is disabled
Phone Number N is PrimarybooleanPhone Numbers NNo
Phone Number N Country IDintegerORstringPhone Numbers NNo
Address IDstringAddressesNoExternal identifier of the record
Address TypestringAddressesNo
AddressstringAddressesNo
Address Zone IDintegerORstringAddressesNo
Address SuburbstringAddressesNo
Address PostcodestringAddressesNo
Address CitystringAddressesNo
Address Country IDintegerORstringAddressesNo
Address DisabledbooleanAddressesNoWhether or not the Customer is disabled
Address is PrimarybooleanAddressesNo
Address Phone NumberstringAddressesNo
Address First NamestringAddressesNoCustomer’s first/given name
Address Last NamestringAddressesNoCustomer’s last/family name
Address N IDstringAddresses NNoExternal identifier of the record
Address N TypestringAddresses NNo
Address NstringAddresses NNo
Address N Zone IDintegerORstringAddresses NNo
Address N SuburbstringAddresses NNo
Address N PostcodestringAddresses NNo
Address N CitystringAddresses NNo
Address N Country IDintegerORstringAddresses NNo
Address N DisabledbooleanAddresses NNoWhether or not the Customer is disabled
Address N is PrimarybooleanAddresses NNo
Address N Phone NumberstringAddresses NNo
Address N First NamestringAddresses NNoCustomer’s first/given name
Address N Last NamestringAddresses NNoCustomer’s last/family name
Important Date IDstringImportant DatesNoExternal identifier of the record
Important DatestringImportant DatesNo
Important Date TypeintegerImportant DatesNo
Important Date TitlestringImportant DatesNo
Important Date N IDstringImportant Dates NNoExternal identifier of the record
Important Date NstringImportant Dates NNo
Important Date N TypeintegerImportant Dates NNo
Important Date N TitlestringImportant Dates NNo
Customer TierintegerORstringLoyalty TiersNo
Customer Tier NintegerORstringLoyalty Tiers NNo
Custom Attribute IDstringAttribute ValuesNoAttribute to be used as key in the key/value pair (externalId resolvable)
Custom Attribute ValuestringAttribute ValuesNoValue to appear in this key/value pair
Custom Attribute Language IDintegerORstringAttribute ValuesNoLanguage ID for the language in which this value appears; use 0 if it is not localized (externalId resolvable)
Custom Attribute N IDstringAttribute Values NNo
Custom Attribute N ValuestringAttribute Values NNo
Custom Attribute N Language IDintegerORstringAttribute Values NNo
Customer Preference Value IDintegerCustomer PreferencesNo
Customer Preference Is DislikebooleanCustomer PreferencesNo
Customer Preference N Value IDintegerCustomer Preferences NNo
Customer Preference N Is DislikebooleanCustomer Preferences NNo
Social Profile DisabledbooleanSocial ProfilesNoWhether or not the Customer is disabled
Social Profile IDstringSocial ProfilesNoExternal identifier of the record
Social Profile PrimarybooleanSocial ProfilesNo
Social Profile TypeintegerSocial ProfilesNo
Social Profile ValuestringSocial ProfilesNo
Social Profile N DisabledbooleanSocial Profiles NNoWhether or not the Customer is disabled
Social Profile N IDstringSocial Profiles NNoExternal identifier of the record
Social Profile N PrimarybooleanSocial Profiles NNo
Social Profile N TypeintegerSocial Profiles NNo
Social Profile N ValuestringSocial Profiles NNo
Privacy RegionsstringPrivacy RegionsNo
Privacy Regions NstringPrivacy RegionsNo

Groups

A group is a class of headers that relate to one another, and may allow for multiple pieces of information to be presented. For example, a customer can have multiple emails, addresses, phone numbers, and more.

Emails

There are two ways that emails can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Emails group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoEmail IDEmail N IDIdentifier of an email.
If any part of an Email is present then this field must be present
string
Yes*EmailEmail NThe email address itselfstring
NoEmail DisabledEmail N DisabledWhether or not the email is disabled. Send False if active.boolean
NoEmail is PrimaryEmail N is PrimaryWhether or not this is the primary email address. If multiple email addresses are provided and primary is not specified, the first email address instance will be set to primary.boolean

Where N is some positive integer.

Note: * means the field is required if the group is being sent in the file.

Phone Numbers

There are two ways that phone numbers can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Phone Numbers group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoPhone Number IDPhone Number N IDIdentifier of a phone number.
If any part of a Phone Number is present then this field must be present
string
Yes*Phone NumberPhone Number NThe phone number. Format: E.164. Must be E.164 Format for SMS functionality within Tulipstring
Yes*Phone Number TypePhone Number N TypeType of Phone Number: Home, Mobile, Work, etc (case-insensitive)string
NoPhone Number DisabledPhone Number N DisabledWhether or not this phone number is disabledboolean
NoPhone Number is PrimaryPhone Number N is PrimaryWhether or not this is a primary phone number. If multiple phone numbers are provided and primary is not specified, the first phone number instance will be set to primary.boolean
Yes*Phone Number Country IDPhone Number N Country IDCountry of this phone number (ISO 3166 Code Format)
Integers will be resolved to internal identifiers
integer, string

Where N is some positive integer.

Note: * means the field is required if the group is being sent in the file.

Addresses

There are two ways that addresses can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach**

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Addresses group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoAddress IDAddress N IDIdentifier of this address.
If any part of an Address is present then this field must be present
string
Yes*AddressAddress NStreet number and namestring
Yes*Address CityAddress N CityCity namestring
NoAddress SuburbAddress N SuburbAddress line 2, typically used for Unit #, Apt#, etc.string
Yes*Address Zone IDAddress N Zone IDID of the State/Province/County in ISO 3166-2:2020 format. Examples here
Integers will be resolved to internal identifiers
integer, string
Yes*Address PostcodeAddress N PostcodePostal code of the addressstring
Yes*Address Country IDAddress N Country IDCountry of the address (ISO 3166 Format)
Integers will be resolved to internal identifiers
integer, string
NoAddress Phone NumberAddress N Phone NumberPhone number relating to this addressstring
NoAddress DisabledAddress N DisabledWhether or not this address is disabledboolean
NoAddress is PrimaryAddress N is PrimaryWhether or not this is the primary address. If multiple addresses are provided and primary is not specified, the first address instance will be set to primary.boolean
Yes*Address TypeAddress N TypeType of Address: Home, Work, etc (case-insensitive)string
NoAddress First NameAddress N First NameFirst/given name to be used with the addressstring
NoAddress Last NameAddress N Last NameLast/family name to be used with the addressstring

Where N is some positive integer

Note: * means the field is required if the group is being sent in the file.

Important Dates

There are two ways that important dates can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Important Dates group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Yes*Important Date IDImportant Date N IDIdentifier of an important date.
If any part of an Important Date is present then this field must be present
string
Yes*Important DateImportant Date NThe date in YYYY-MM-DD formatstring:datetime
Yes*Important Date TypeImportant Date N TypeType of important date. 1 - Birthday and 2 - Wedding Anniversaryinteger
NoImportant Date TitleImportant Date N TitleTitle of the important datestring

Where N is some positive integer.

Note: * means the field is required if the group is being sent in the file.

Customer Tiers

There are two ways that customer tiers can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Customer Tiers group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
NoCustomer TierCustomer Tier NCustomer tier valueinteger

Where N is some positive integer.

Social Profiles

There are two ways that social profiles can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Social Profiles group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Yes*Social Profile DisabledSocial Profile N DisabledWhether or not this social profile is disabled. Send False if active.boolean
Yes*Social Profile IDSocial Profile N IDIdentifier of this social profilestring
Yes*Social Profile PrimarySocial Profile N PrimaryWhether or not this is the primary social profileboolean
Yes*Social Profile TypeSocial Profile N TypeType of the social profile. 1 - whatsapp , 2 - wechat , 3 - lineinteger
Yes*Social Profile ValueSocial Profile N ValueValue of the social profilestring

Where N is some positive integer.

Custom Attributes

There are two ways that custom attributes can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Custom Attributes group.

The following columns may be included:

RequiredMulti-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Yes*Custom Attribute IDCustom Attribute N IDIdentifier of the custom attributestring
Yes*Custom Attribute ValueCustom Attribute N ValueValue of the attributestring
Yes*Custom Attribute Language IDCustom Attribute N Language IDLanguage of the attribute.
Integers will be resolved to internal identifiers
integer, string

Where N is some positive integer.

NOTE: Out of the box, Tulip leverages the following custom attributes for optin values:

  • allow_email
  • allow_mail
  • allow_sms
  • allow_call
  • allow_whatsapp
  • allow_line
  • allow_wechat
  • allow_kakaotalk

For instance, sending the below would allow the the associate to communicate with a client via whatsapp:

Custom Attribute 1 IDCustom Attribute 1 ValueCustom Attribute 1 Language ID
allow_whatsappTRUEen

Privacy Regions

There are two ways that privacy regions can be formatted in your CSV file: A Multi-Row Approach or Multi-Column Approach.

Multi-Row Approach

In this approach, one set of column headers is used alongside multiple rows of data. To allow for multiple rows of data, additional rows must include the same Required Headers fields.

Multi-Column Approach

In this approach, multiple sets of column headers may be used alongside one row (the first row) of a customer instance. To use these columns multiple times, an identifying number must exist for N and be unique for every new set of columns.

Columns from the Multi-Row Approach cannot be mixed with columns from the Multi-Column Approach in a CSV file for the Custom Attributes group.

The following columns may be included:

Multi-Row Approach
Column Name
Multi-Column Approach
Column Name
DescriptionType
Privacy RegionsPrivacy Regions NPrivacy Region associated to the customerstring, integer

Where N is some positive integer.

Customer CSV Example

See the following Customer CSV sample.

Customer Sample 1