Customer Identification in Import Files
The Generic XML Import file format used by eShopCONNECTED contains 2 XML elements which can be used to identify the target customer for an imported Order, Invoice or Credit Note. These are the ISCustomerCode andSourceCustomerID and they provide the means of matching customer records between Connected Business and the external system from which orders etc. are being imported.
How they are used depends on how customers are identified in the external system.
- If the Connected Business Customer Code is used by the external system, then the ISCustomerCode element is the only one needed to identify a customer in the import file. More usually however, the external system will have its own ID for each customer and have no record of the Connected Business Customer Code. In this case, the SourceCustomerID element should be included in the import file.
- If the ISCustomerCode element is populated, it must contain a valid Connected Business Customer Code which exists in the target database. If a marching Customer record is not found, the import file will be rejected.
- If the ISCustomerCode element is blank, the SourceCustomerID will be used to identify the target customer. If it is populated, the Order Importer will query the Connected Business Customer table for a customer record with the ImportSourceID_DEV000221 field set to the name of the import source e.g. Generic XML Web Import and the ImportCustomerID_DEV000221 field set to the SourceCustomerID value.
- If a matching record is found, the imported order, invoice or credit note will be created for that customer, otherwise a new customer record will be created.
- If both the ISCustomerCode and SourceCustomerID elements are blank, then the Order Importer will not be able to match the imported record to an existing customer. In this case, the RequireSourceCustomerID configuration setting comes into play. If this is set to Yes, then the imported file is rejected. If it is set to No, the imported file will be processed and a new customer record created, unless the imported record is a Credit Note.
If RequireSourceCustomerID is set to No and both the ISCustomerCode and SourceCustomerID elements are blank, a new customer record will ALWAYS be created for each new order or invoice.
Credit Note imports will ALWAYS be rejected if RequireSourceCustomerID is set to No and both the ISCustomerCode and SourceCustomerID elements are blank.