Monitor Connector - Customer Update
This document describes the process for updating customer data from the Monitor ERP system to App4Sales. The connector retrieves an XML file containing customer information and processes it to update customers, addresses, contact persons, and related data in App4Sales.
Data Source Configuration
The connector downloads an XML file named customers.xml from a folder on the FTP server specified in the connector settings. The folder is determined by the Folder name setting.
Customer Core Fields
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
CustomerGuid | customers.customerguid | Unique identifier for the customer. If not provided, a new GUID is generated. |
CustomerCode | customers.customercode | The customer's code. This is a mandatory field. |
CustomerName | customers.customername | The customer's name. This is a mandatory field. |
ChamberOfCommerceCode | customers.chamberofcommercecode | The customer's chamber of commerce code. |
VatCode | customers.vatcode | The customer's VAT code. |
VatLiable | customers.isvatliable | Indicates if the customer is VAT liable. Parsed as a boolean. |
Discount | customers.discount | The customer's discount percentage. |
UsesPriceField | customers.usesprice | The price list to use for the customer. |
ActionPriceList | customers.actionpricelist | The action price list to use for the customer. |
HidePrices | customers.hideprices | Indicates if prices should be hidden for the customer. Parsed as a boolean. |
LanguageCode | customers.languagecode | The customer's language code. This is mapped to an App4Sales language code. |
CustomerManager | customers.customermanager | The customer's account manager. |
Sysmodified | customers.lastmodified | The date the customer was last modified. |
CustomerDashboard | customers.customerdashboard | A Base64 encoded string representing the customer's dashboard layout. |
DynamicFreeFields | customers.dynamicfreefields | XML containing extra data for the customer. |
FreeFields | customers.freefields | XML containing free fields for the customer. |
CustomerClassification | customers.customerclassification | The customer's classification. |
ItemFilter | customers.fixeditemfilter | A fixed item filter for the customer. |
CustomerNote | customers.customernote | A note for the customer. |
PaymentConditionCode | customers.paymentcondition | The customer's payment condition. |
DeliveryMethod | customers.termsofdelivery / customers.deliverymethod | The customer's delivery method. |
Filters | customers.filters | Filters for the customer. |
Addresses
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
AddressType | - | Set to 'inv', 'del', or 'vis' for invoice, delivery, and visit addresses respectively. If only one address type (delivery or visit) is provided, the other is created as a copy. |
AddressLine1 | customers.invoiceaddress1, customers.visitaddress1, customers.deliveryaddress1 | The first line of the address. |
AddressLine2 | customers.invoiceaddress2, customers.visitaddress2, customers.deliveryaddress2 | The second line of the address. |
PostCode | customers.invoicepostcode, customers.visitpostcode, customers.deliverypostcode | The postal code. |
City | customers.invoicecity, customers.visitcity, customers.deliverycity | The city. |
Country | customers.countrycode or customers.languagecode | The country. `customers.countrycode` takes precedence. |
customers.contactemail | The email address. This is applied to all address types (invoice, visit, delivery). | |
Phone | customers.contactphone | The phone number. This is applied to all address types (invoice, visit, delivery). |
Fax | customers.contactfax | The fax number. This is applied to all address types (invoice, visit, delivery). |
IsMainAddress | - | The first visit and delivery address are marked as the main address. |
Contacts
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
FullName | customers.contactfullname, or a combination of FirstName, MiddleName, and LastName from the 'contactpersons' node. | The contact's full name. If only FullName is provided, it is split into FirstName, MiddleName, and LastName. |
customers.contactemail, or from the 'contactpersons' node. | The contact's email address. | |
Phonenumber | customers.contactphone, or from the 'contactpersons' node. | The contact's phone number. |
IsMainContactPerson | - | Set to true for the contact person specified in `customers.contactfullname`, or the first contact person in the list if not specified. |
DynamicFreeFields | DynamicFreeFields node inside a contactperson node | XML containing extra data for the contact person. |
Special Logic & Filters
The update is performed in batches of 100 customers.
If a customer with the same `CustomerCode` already exists but is inactive, it will be reactivated.
The connector supports two XML formats for customer data. An older, flat format, and a newer, nested format.
Before updating, a script `BeforeUpdateCustomers` is executed. After updating, a script `UpdateCustomers` is executed.
Customer dashboards are decoded from a Base64 string and stored separately.
Customer notes are deleted and recreated with each update.
The connector can process extra customer data from a separate source, which can overwrite the data from `customers.xml`.
Related Settings & Prerequisites
Folder name: The folder on the FTP server where `customers.xml` is located.
DefaultActionPriceListCode: If set, this action price list is applied to all customers who don't have one.
EnablePriceDeduplication: If enabled, the connector will migrate customers to deduplicated price lists.
CustomerItemFilter: If enabled, the connector will process fixed item filters from extra customer data.