the company i work for is having difficulty linking a new Epos system to our new Magento 2 website. Our previous Magento 1 website was connected to a legacy Epos system and for most of the time it worked fairly well. Given the fact that we continuously ran into costly problems with the synchronisation of the legacy system and magento 1 website, we decided to upgrade to a cloud based system called TRIMS. This provider (TRIMS) has linked with several magento 2 websites without errors.

The problem we are having is that the TRIMS (Epos Provider) connector API is failing to map the product data to the magento 2 api , and the errors being thrown back are as follows:

"Last Error""The remote server returned an error: (400) Bad Request. {"message":"Error occurred during "custom_attributes" processing. Attribute "type" has invalid value. The "COATS" value's type is invalid. The "int" type was expected. Verify and try again."}"

This error seems to be related to the epos system is sending up the value of the product Type which is "COATS" but magento2 need an integer.

Our web developers have recommended us that the epos system needs to send up an ID for the type "Coats" instead of the string value.

The developer for TRIMS is disagreeing with this recommendation and is saying that the types attribute do not use ID's , just the value is stored in the epos database. They have also suggested that the magento 2 attribute that is expecting an integer (ID) for the product type is an old practice and it can be configured to accept a string value and will also on retrieval of a new value , will assign a magento2 id to the type. I also think this makes more sense as to not clog up the epos system with un-needed data.

We are getting this error with all attributes so far i.e productBrand, productSize, productType and i expect we will get the error for other attributes such as season and any other attributes we try to push up in the future.

To boil it down to a bare question would be to ask, can the magento 2 api be configured to receive a string value to map to product attributes instead of sending an ID. Is seems the epos developer is making more sense and our web developers are unaware that magento 2 can recieve string values to map to product attributes instead of id's.

Hope this question makes sense,

Any help or advise on this is greatly appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.