Skip to main content

BjornLunden - Customer sync

Bjorn Lunden - Customer Update This document describes the process of synchronizing customer data from the Bjorn Lunden API to the App4Sal...

Updated over a week ago

Bjorn Lunden - Customer Update

This document describes the process of synchronizing customer data from the Bjorn Lunden API to the App4Sales platform. The connector retrieves all customers, and optionally filters them by category. It then maps the customer data, including addresses and contact persons, to the App4Sales customer model.

Data Source Configuration

Customer data is pulled from the Bjorn Lunden API. The connector retrieves a list of all customers from the customer endpoint. Authentication is handled via the REST client.

Customer Core Fields

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

CustomerCode

Id

Direct mapping.

CustomerName

Name

Direct mapping.

Email

Email

Direct mapping.

Phone

Phone

Direct mapping.

VatLiable

NoVat, VatNumber

Set to `true` if `NoVat` is `false` and `VatNumber` is not empty.

UsesPriceField

Pricelist

Direct mapping.

Currency

Currency

Direct mapping.

VatCode

VatNumber

Direct mapping.

DeliveryMethod

DeliveryTerms

Direct mapping.

Fax

Fax

Direct mapping.

City

City

Direct mapping.

Country

Country

Direct mapping.

CountryCode

CountryCode

Direct mapping.

InternalCode

EntityId

Converted to string.

CustomerNote

Comment

Direct mapping.

Website

Web

Direct mapping.

Addresses

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

AddressLine1

PostAddressLine, VisitAddressLine

`PostAddressLine` is used for the invoice address, `VisitAddressLine` for the visit address.

City

City

Direct mapping. Used for both invoice and visit addresses.

Country

Country

Direct mapping. Used for both invoice and visit addresses.

PostCode

Zip

Direct mapping. Used for both invoice and visit addresses.

Email

Email

Direct mapping. Used for both invoice and visit addresses.

Phone

Phone

Direct mapping. Used for both invoice and visit addresses.

AddressType

N/A

Hardcoded to `Invoice` or `Visit`.

IsMainAddress

N/A

Hardcoded to `true` for both addresses.

Contacts

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

FullName

ResponsiblePerson

Direct mapping.

FirstName

ResponsiblePerson

Derived from `ResponsiblePerson` using the `GetFirstNameV2` method.

Initials

ResponsiblePerson

Derived from `ResponsiblePerson` using the `GetInitialsV2` method.

LastName

ResponsiblePerson

Derived from `ResponsiblePerson` using the `GetLastNameV2` method.

MobileNumber

Mobile

Direct mapping.

Phonenumber

Phone

Direct mapping.

Email

Email

Direct mapping.

IsMainContactPerson

N/A

Hardcoded to `true`.

Discounts & Dashboards

The connector does not map any data for discounts or dashboards.

Extra Data & Free Fields

The following fields are stored as XML in the `FreeFields` property of the customer.

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

VATCode

VatCode

The `VatCode` from the API is stored as a free field with the key `vat_code`.

Special Logic & Filters

The connector allows for filtering customers based on their category. If the `SynchronizeOnlyCustomersFromCategory` setting is populated with a comma-separated list of categories, only customers belonging to one of those categories will be synchronized.

Related Settings & Prerequisites

The following settings are used by the customer update process:

  • SynchronizeOnlyCustomersFromCategory: A comma-separated list of customer categories to synchronize. If empty, all customers are synchronized.

  • CustomCustomerFieldsMapping: A JSON mapping for custom fields. This setting is used when creating or updating customers.

Did this answer your question?