In the Ecom provider, the ProductManufacturerId is not being handled correctly. Here is the requirement from the documentation…
"If this field is set to a value that already exists in the EcomManufacturers table, a reference to the relevant row will be created. If the value does not already exist, a manufacturer with name of the value will be created, and the reference will be added"
However, what is happening …
1. If the Manufacturer doesn't exist, it will create the Manufacturer in EcomManufacturers correctly.
2. It then writes the "name" rather than the "id" to EcomProducts.ProductManufacturerID
The 2nd issue appears that it is not using the existing manufacturers by searching by name. While sometimes it's a pain for it to look up multiple database columns to find the best match, it makes sense here.
I think this order of operation would fix the issues…
• Looks first in EcomManufacturers.ManufacturerId to see if that exists. If so, use it; If not, look in EcomManufacturers.ManufacturerName for a match.
• If it finds a match, then set EcomProducts.ProductManufacturerId with that value.