Skip to main content

CustomerExtraData

Customer Extra Data Synchronization The App4Sales platform allows for the enrichment of customer data through an external CSV file na...

Updated over a week ago

Customer Extra Data Synchronization

The App4Sales platform allows for the enrichment of customer data through an external CSV file named extraCustomerData.csv. This process, handled by the CustomerUpdateHandler, merges supplementary data from the CSV with existing customer records during the customer synchronization process. This document details the configuration, mapping, and logic applied when processing this extra data.

Extra Customer Data Feed

The extra customer data must be provided in a CSV file named extraCustomerData.csv, located in the directory specified by the FtpExtraDataDirectory connector setting. The system reads this file to populate a temporary data store, which is then used to update customer records.

For the data to be applied, each row in the CSV must contain a CustomerCode that corresponds to an existing customer in App4Sales. If a matching CustomerCode is found, the data from that row will be used to overwrite the customer's properties.

Property Mapping

The system automatically maps columns from the extraCustomerData.csv file to properties of the App4Sales Customer object. The mapping is based on matching column names from the CSV to the property names of the Customer object. This process is case-insensitive. If a column name in the CSV matches a property name in the Customer object, the value from the CSV will overwrite the existing value in App4Sales.

App4Sales Field

Source Field (CSV)

Logic/Notes

CustomerName

CustomerName

Overwrites the customer's name.

LanguageCode

LanguageCode

Overwrites the customer's language code.

VatLiable

VatLiable

Overwrites the VAT liability status. Expects a boolean value (true/false).

Discount

Discount

Overwrites the customer's default discount. Expects a decimal value.

CustomerManager

CustomerManager

Overwrites the assigned customer manager.

PaymentConditionCode

PaymentConditionCode

Overwrites the customer's payment condition code.

ChamberOfCommerce

ChamberOfCommerce

Overwrites the Chamber of Commerce number.

VatCode

VatCode

Overwrites the customer's VAT code.

ContactFullName

ContactFullName

Overwrites the full name of the main contact person.

ContactPhone

ContactPhone

Overwrites the phone number of the main contact person.

ContactEmail

ContactEmail

Overwrites the email address of the main contact person.

ContactFax

ContactFax

Overwrites the fax number of the main contact person.

DeliveryAddress1

DeliveryAddress1

Overwrites the first line of the delivery address.

DeliveryAddress2

DeliveryAddress2

Overwrites the second line of the delivery address.

DeliveryPostCode

DeliveryPostCode

Overwrites the postal code of the delivery address.

DeliveryCity

DeliveryCity

Overwrites the city of the delivery address.

DeliveryCountry

DeliveryCountry

Overwrites the country of the delivery address.

VisitAddress1

VisitAddress1

Overwrites the first line of the visiting address.

VisitAddress2

VisitAddress2

Overwrites the second line of the visiting address.

VisitPostCode

VisitPostCode

Overwrites the postal code of the visiting address.

VisitCity

VisitCity

Overwrites the city of the visiting address.

VisitCountry

VisitCountry

Overwrites the country of the visiting address.

UsesPriceField

UsesPriceField

Overwrites the price list ID for the customer. Expects an integer.

ActionPriceList

ActionPriceList

Overwrites the action price list ID for the customer. Expects an integer.

CustomerClassification

CustomerClassification

Overwrites the customer classification.

Filters

Filters

Overwrites the customer's filter settings.

Free Fields

The extra customer data feed can be used to populate free fields for a customer. To use this functionality, the CSV file should contain columns with a name that starts with the prefix FreeField_. The part of the column name after the prefix will be used as the caption of the free field, and the value in that column will be the content of the free field.

For example, a column named FreeField_LoyaltyID with a value of "12345" will create a free field with the caption "LoyaltyID" and the content "12345" for the customer.

These free fields are added to the customer's FreeFieldList and then serialized into the FreeFields XML property of the customer. Empty values are skipped.

Item Filters

The system can create fixed item filters for customers based on the extra data feed. This feature is only active when the CustomerItemFilter synchronization setting is enabled.

To define item filters, the CSV file should contain columns with a name starting with the prefix ItemFilter_. The part of the name after the prefix must correspond to a valid Item Class name in App4Sales. The value of the column should contain a list of Item Class values, separated by a tilde (~).

For each value provided, the system validates it against the known values for that item class (case-insensitive lookup). Valid values are then used to construct an item filter query, which is stored in the customer's ItemFilter property. If the item class name or any of the values are not found, they are silently skipped.

ItemFilter Key

ItemClass

Valid Values (example)

Resulting Query String Snippet

ItemFilter_Brand

Brand

Nike~Adidas

An item filter for the 'Brand' item class with values 'Nike' and 'Adidas'.

ItemFilter_Color

Color

Blue

An item filter for the 'Color' item class with value 'Blue'.

Related Settings & Prerequisites

Name

Purpose

Impact on extra data

CustomerItemFilter

Enables or disables the synchronization of customer-specific item filters.

When enabled, allows the ItemFilter_ prefixes in the extra customer data to create item filters.

FtpExtraDataDirectory

Specifies the FTP directory where the extraCustomerData.csv file is located.

Defines the source location for the extra customer data feed.

Did this answer your question?