Skip to main content

ExactOnlinePremium - Customer sync

Exact Online Premium Connector - Customer Update The Customer Update pipeline synchronizes customer data from Exact Online to App4Sales. T...

Updated over a week ago

Exact Online Premium Connector - Customer Update

The Customer Update pipeline synchronizes customer data from Exact Online to App4Sales. This process involves retrieving customer records, their associated addresses, and contact persons. It also handles specific logic for VAT, price lists, and dynamic free fields. Customers that no longer meet the synchronization criteria are marked for deletion in App4Sales.

Data Source Configuration

Customer data is retrieved from Exact Online via REST API calls. The connector uses the following endpoints and mechanisms:

  • Customers: Fetched using ExactOnlineCustomer.GetRoute(Settings.CurrentDivision, customerFields.Select(e => e.PropertyName).ToArray(), Settings.CustomerTimestamp). This retrieves customer records, optionally filtered by timestamp and specific custom fields.

  • Contact Persons: Fetched using ExactOnlineContactPerson.GetRoute(Settings.CurrentDivision, contactFields.Select(e => e.PropertyName).ToArray(), Settings.ContactTimestamp). This retrieves contact person records, optionally filtered by timestamp and specific custom fields. Active contacts are filtered by StartDate and EndDate.

  • Addresses: Fetched using ExactOnlineAddress.GetRoute(Settings.CurrentDivision, addressFields.Select(e => e.PropertyName).ToArray(), Settings.AddressTimestamp). This retrieves address records, optionally filtered by timestamp and specific custom fields.

  • Account Managers: Fetched using ExactOnlineAccountManager.GetRoute(Settings.CurrentDivision). These are used to map sales representatives.

  • Payment Conditions: Fetched using ExactOnlinePaymentCondition.GetRoute(Settings.CurrentDivision).

  • VAT Codes: Fetched using VatCode.GetRoute(Settings.CurrentDivision).

  • Price Lists: Fetched using ExactOnlinePriceList.GetRoute(Settings.CurrentDivision).

  • Account Classifications: Fetched using ExactOnlineAccountClassification.GetRoute(Settings.CurrentDivision).

  • Customer Notes: Fetched using CommunicationNoteUpdate.GetRoute(Settings.CurrentDivision, Settings.LastNoteSync) if SyncCustomerNotes setting is enabled.

Data is pulled from Exact Online using these API routes. Timestamps (e.g., Settings.CustomerTimestamp) are used to retrieve only modified or new records since the last synchronization, optimizing performance.

Data Mapping Table (Customers)

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

CustomerGuid

ID (Exact Online Customer)

Unique identifier for the customer.

CustomerCode

Code (Exact Online Customer)

Customer's unique code. A prefix [P] or [S] is added if the customer is a Prospect or Suspect, controlled by AddPrefixForProspectsAndSuspects setting.

CustomerName

Name (Exact Online Customer)

Customer's name. Can be prefixed with account classification description if AccountClassificationOnCustomerName is enabled.

UsesPriceField

PriceList (Exact Online Customer)

Maps to an internal price list ID in App4Sales. The Exact Online PriceList ID is converted to an internal App4Sales ID. Influenced by AutoSyncPriceLists and GenerateCurrencyPriceLists settings.

VatLiable

VATLiability, SalesVATCode (Exact Online Customer)

Determined by VatLiabilityBasedOnVatRegime setting. If true, based on VATLiability ('L' for liable). If false, based on SalesVATCode and configured VAT codes. Also influenced by UseVatLiabilityForDefaultCountry and DefaultCountryForVatLiability settings based on address country code.

CustomerClassification

Classification1 or property defined by AccountClassificationProperty (Exact Online Account Classification)

Maps the Exact Online account classification to the App4Sales customer classification.

CustomerManager

SearchCode or property defined by AccountClassificationPropertyForCustomerManager (Exact Online Customer)

Maps either the customer's SearchCode or a specific account classification to the customer manager field in App4Sales.

DynamicFreeFields

Custom fields defined in Settings.CustomCustomerFieldsMapping and UnknownElements from Exact Online Customer and Address.

Custom fields configured in the connector settings are serialized into an XML string. Includes custom fields from customer and main invoice address.

Discount

DiscountSales (Exact Online Customer)

The sales discount percentage from Exact Online. Default to 0.0M if not available.

Phone, Email

Phone, Email (Exact Online Customer)

Customer's phone number and email address. These can also be set on associated addresses and contact persons.

MaincontactpersonId

ID (Exact Online Contact Person)

The ID of the main contact person for the customer.

Hardcoded: IsActive

N/A

Set to true for all synced customers that are not filtered out.

Data Mapping Table (Addresses)

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

AddressId

ID (Exact Online Address)

Unique identifier for the address.

AddressType

Type (Exact Online Address)

Mapped from Exact Online Address Type (1: Visit, 2: Postal, 3: Invoice, 4: Delivery, 5: Other). Only Visit (1), Invoice (3) and Delivery (4) addresses are processed.

AddressLine1

AddressLine1 (Exact Online Address)

First line of the street address.

AddressLine2

AddressLine2 (Exact Online Address)

Second line of the street address.

AddressLine3

AddressLine3 (Exact Online Address)

Third line of the street address.

City

City (Exact Online Address)

City of the address.

PostCode

Postcode (Exact Online Address)

Postal code of the address.

Country

Country (Exact Online Address)

Country of the address.

Iso2

Country (Exact Online Address)

ISO 2-letter country code, derived from the Country field.

Phone

Customer's Phone

Inherited from the customer object.

Email

Customer's Email

Inherited from the customer object.

IsMainAddress

IsMain (Exact Online Address)

Indicates if this is the main address of its type for the customer.

Data Mapping Table (Contact Persons)

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

ContactId

ID (Exact Online Contact Person)

Unique identifier for the contact person.

CustomerId

Account (Exact Online Contact Person)

Links the contact person to the customer.

FirstName

FirstName (Exact Online Contact Person)

First name of the contact.

LastName

LastName (Exact Online Contact Person)

Last name of the contact.

FullName

FullName (Exact Online Contact Person)

Full name of the contact.

Email

Email (Exact Online Contact Person) or Customer's Email

Email address of the contact person. If the contact has no email, it inherits from the customer.

Phone

Phone (Exact Online Contact Person) or Customer's Phone

Phone number of the contact person. If the contact has no phone, it inherits from the customer.

IsMainContactPerson

IsMainContact (Exact Online Contact Person)

Indicates if this is the main contact person for the customer.

Data Mapping Table (Extra Data & Free Fields)

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

DynamicFreeFields

Custom properties from Exact Online Customer, Address, and ContactPerson entities

The connector maps custom fields defined in Settings.CustomCustomerFieldsMapping. These fields are extracted from the Exact Online Customer, Address, and ContactPerson entities and serialized into an XML string. If a custom field is configured as a dropdown, the BackofficeValue is mapped to the App4Sales Value. Unrecognized elements from the Exact Online entities can also be included as free fields.

Data Mapping Table (Discounts & Dashboards)

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

Customer specific Item Class Discounts

N/A

Currently, no direct mapping from Exact Online for customer-specific item class discounts was found in the analyzed code. This implies that such discounts might be managed within App4Sales or via a different integration point not covered by the Customer Update pipeline.

Customer Dashboard / Notes

CommunicationNote (Exact Online)

Customer notes are synchronized from Exact Online's CommunicationNote entity. If Settings.SyncCustomerNotes is enabled, notes created or updated in Exact Online are added to the App4Sales customer. The SalesRep for the note is mapped using MapResIdToKnownUserName(). Dashboard layouts themselves are not directly synced from Exact Online in this pipeline; this refers to the text-based notes associated with a customer.

Did this answer your question?