我想将客户列表带入国家字符串。
我以前曾将实体进口到ISO守则,但我只是以翻译名称作为该国的标识符而苦苦挣扎。
我在导入配置文件中使用的字段是 defaultshippingaddress.country.translations.en-gb.name
。该字段在导出方面效果很好,但即使在先前导出的文件中也未能导入。我注意到,包含失败导入的表格中包含ID在国家列中的ID,这似乎无效。
是否有正确的方式将实体以国家的名义导入国家?还是我必须使用ID / ISO代码?
I would like to import a customer list with countries as string.
I have imported entities with the countries ISO code before, but I am struggling with just the translated names as the identifier for the country.
The field which I use in my import profile is defaultShippingAddress.country.translations.en-GB.name
. This field works perfectly fine on export, but fails on import - even with the previously exported file. I noticed, that the sheet containing the failed imports has Ids in the country column, that do not seem to be valid.
Is there a correct way to import entities with countries by the country name? Or do I have to use an Id / Iso code?
发布评论
评论(2)
这是不可能的。当您仅通过某些字段进入协会时,它将创建该实体并分配它。您需要事先解决ID,仅引用ID。
有一个问题,可以使用唯一字段来解决此类问题。但是我想这将在不久的将来无法解决
This is not possible. When you pass in an association just some fields, it will create that entity and assign it. You need to resolve the ID beforehand and reference only the ID.
There is an issue open to allow referencing using unique fields, to solve issues like this. But I guess this will be not solved in near future
我能够通过将SW国家出口到CSV来解决ID:
然后在Excel中使用Vlookup将ID与国家匹配。
I was able to resolve the ID's by exporting the SW Countries into a CSV:
And then use VLOOKUP in Excel to match the ID's to the countries.
https://support.microsoft.com/en-us/office/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1