JDEdwardsE1 Connector - CustomerUpdate
The CustomerUpdate function syncs customer data from JDEdwardsE1 to App4Sales. It retrieves customer information, including addresses and contacts, and processes it in batches. The connector fetches data from two different customer views, likely representing different customer types or hierarchies.
Data Source Configuration
The connector fetches customer data from a JDEdwardsE1 ERP system using POST requests to the /data/view endpoint. The specific views used are determined by the CustomerIdentifier and CustomerIdentifier2 connector settings. The requests are authenticated using a token provided in the settings.
Data Mapping Table (Customer)
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
CustomerCode | CustomerCode | Direct mapping. |
CustomerName | CustomerName | The value from the |
CustomerManager | CustomerManager | Direct mapping. |
LanguageCode | LanguageCode | The ERP language code is mapped to an App4Sales language code via the MappedLanguages table. |
VatCode | VatNumber | Direct mapping. |
CustomerClassification | Derived | Set to "NotAllowedToOrder" if the customer's ParentId is in the list of customers from the first view. |
Data Mapping Table (Address)
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
AddressType | Hardcoded | A "Visit" address is created for each customer. |
AddressLine1 | AddressLine1 | Direct mapping. |
AddressLine2 | AddressLine2 | Direct mapping. |
AddressLine3 | AddressLine3, AddressLine4 | Concatenation of AddressLine3 and AddressLine4 with a space in between. |
City | City | Direct mapping. |
PostCode | PostalCode | Direct mapping. |
Country | Country | Direct mapping. |
Data Mapping Table (ContactPerson)
App4Sales Field | Source Field (API/Excel/DB) | Logic/Notes |
FullName | ContactName | Direct mapping. Records with a |
Special Logic & Filters
The connector first retrieves a list of customers using the
CustomerIdentifiersetting. Then, it retrieves a second list usingCustomerIdentifier2, and any customer from the second list whoseParentIdis present in the first list is marked as "Not allowed to order".Customers with an empty
CustomerNameorCustomerCodeare considered invalid and skipped.Customer data is processed in batches of 100.
The system executes
BeforeUpdateCustomersandUpdateCustomersscripts, allowing for custom modifications.
Domain Specifics / Extension Section
Customer Core Fields
GUID Handling: The system attempts to reuse existing
CustomerGuids for inactive customers to preserve history. If a GUID is not found, a new one is generated.Price Lists: If price deduplication is enabled, the connector migrates customers to deduplicated pricelists based on mappings in
KeySettings.GenericPriceListMigrations. A default action pricelist can be set via theDefaultActionPriceListCodesetting.Payment Conditions: Empty payment condition codes are set to null to prevent foreign key issues.
Addresses
The system ensures that each customer has both a "Visit" and a "Delivery" address. If one is missing, it's created by copying the other. If no addresses are provided, a dummy address may be created.
Address country codes are normalized using the
MappedCountriestable and ISO standards.The first "Visit" and "Delivery" addresses are marked as the main address for their respective types if no main address is specified.
Contacts
A main contact person is designated for each customer. If not specified, the first contact in the list is chosen.
Contact names are parsed to populate First Name, Middle Name, and Last Name fields if they are not provided individually.
Extra Data & Free Fields
The connector can enrich customer data with information from an external CSV file (
ExtraCustomerData). Fields from the CSV file overwrite existing customer data if the property names match.Custom fields prefixed with
FreeField_in the extra data file are added to the customer's free fields.Item filters can be applied to customers based on columns prefixed with
ItemFilter_in the extra data file, if theCustomerItemFiltersetting is enabled.
Discounts & Dashboards
Discounts per item class value (
DiscountsPerItemCLassValue) are saved for each customer.Customer-specific dashboards are processed from a Base64 encoded string and stored separately.
Customer notes are deleted and re-inserted to ensure they are up-to-date.
Related Settings & Prerequisites
CustomerIdentifier: The identifier for the primary customer view in JDEdwardsE1.CustomerIdentifier2: The identifier for the secondary customer view in JDEdwardsE1.Token: The authentication token for accessing the JDEdwardsE1 API.EnablePriceDeduplication: Enables the price list migration logic.DefaultActionPriceListCode: Sets a default action pricelist for all customers.CustomerItemFilter: Enables the processing of fixed item filters from extra customer data.