Skip to Content
0

Upload products with translations with CUAN_IMPORT_SRV

Mar 06 at 03:58 PM

64

avatar image

Dear,

I'm struggling to create products in hybris marketing via CUAN_IMPORT_SRV and immediately add their translated Name and Description.

(I use hybris marketing onpremise version 1702)

I'm trying the following load via odata but this gives me an error:

{
          "Id" : "",
          "Timestamp" : "2017-07-17T12:00",
          "UserName" : "VVINCKJO",
          "SourceSystemType" : "EXT",
          "SourceSystemId" : "ANY",
          "Products" : [
 {
               "IdOrigin" : "SAP_HYBRIS_PRODUCT",
               "Id" : "TESTLANGU5",
               "Name" : "TESTLANGU5_ENG",
               "Description" : "Language5 Test English",
               "Language":"EN",
               "ImageUrl" : "",
               "CategoryId" : "LVT",
               "HierarchyId" : "FLOORTYPE",
               "ZZ1_Brand_MPR" : "TST"
 },
  {
               "IdOrigin" : "SAP_HYBRIS_PRODUCT",
               "Id" : "TESTLANGU5",
               "Name" : "TESTLANGU5_DUT",
               "Description" : "Language5 Test Nederlands",
               "Language":"NL"
 } ,
  {
               "IdOrigin" : "SAP_HYBRIS_PRODUCT",
               "Id" : "TESTLANGU5",
               "Name" : "TESTLANGU5_GER",
               "Description" : "Language5 Test German",
               "Language":"DE"
 }
 ]
}

error-excerpt:

<code>CUAN_PRODUCT/052</code>


<message>Product SAP_HYBRIS_PRODUCT TESTLANGU5 multiple times in one request; resend without duplicates</message>

So I'm wondering how I can maintain a product AND his different translated name/description.

(If I do the executions one by one, so one load with only EN, then with NL and then with DE, it does work, but that way of working is impossible to inteface as we have many products and many languages)

Can anyone help?

Kr,

Joyca

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Vineet Kaul Mar 06 at 04:57 PM
0

Hi Joyca,

Its the expected behavior of ODATA that it will reject multiple entries for same ID. This is valid for all imports more or less.

You will have to in the first call make ID Creation and in the next one do translation.

Also what you can try to do if possible is following.

PRD ID TRANSLATION

P1 NULL

P2 P1-Translations

P3 P2-Translations

You will be loading data in chunks so make sure you load the first chunk without translations and in the second one create translation of first batch if that is possible, this way you will only have 1 extra load for the last translation to run.

I am not data expert so you will have to check with your Data Service expert if something like this is even possible.

Thanks

Vineet

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Vineet,

The thing is, there is more than two languages so for "P1 translations" I still get the error...

So let's say I create Product1 in EN in a first run,

And then I create Product2 in a second run and want to translate P1 in NL and DE (and some other languages). Then I still have multiple times P1 and it's still throwing error "duplicate entries" ...

Our product source system gives an outgoing message flow with P1 including all its translations.

So it's hard AND not efficient to split that one dataflow into a separate call to hybris marketing for each language...

0

On top of this, there is a second problem even if we split into multiple calls...

CUAN_IMPORT_SRV does not understand "delta"...

I do first this data load:

{
          "Id" : "",
          "Timestamp" : "2017-07-17T12:00",
          "UserName" : "VVINCKJO",
          "SourceSystemType" : "EXT",
          "SourceSystemId" : "ANY",
          "Products" : [
 {
               "IdOrigin" : "SAP_HYBRIS_PRODUCT",
               "Id" : "TESTLANGU5",
               "Name" : "TESTLANGU5_ENG",
               "Description" : "Language5 Test English",
               "Language":"EN",
               "ImageUrl" : "",
               "CategoryId" : "LVT",
               "HierarchyId" : "FLOORTYPE",
               "ZZ1_Brand_MPR" : "TST"
 }
 ]
}


and then this one;

{
          "Id" : "",
          "Timestamp" : "2017-07-17T12:00",
          "UserName" : "VVINCKJO",
          "SourceSystemType" : "EXT",
          "SourceSystemId" : "ANY",
          "Products" : [
 {
               "IdOrigin" : "SAP_HYBRIS_PRODUCT",
               "Id" : "TESTLANGU5",
               "Name" : "TESTLANGU5_DUT",
               "Description" : "Language5 Test Nederlands",
               "Language":"NL"
 }
 ]
}

Then the ZZ1_Brand_MPR of my first run is blanked out again!!

Note that I have about 25 custom fields.

So it would mean a performance issue if I need to send the FULL product details with all 25 custom fields for EACH language...

0

Hi Joyca,

since you are using 1702 on prem- can you try to first test the product creation and multiple descriptions in one go via the FM CUAN_PRODUCTS_POST. If the FM supports multiple translations in single call then i would suggest you try to create products via the FM itself to proceed while you can think of other options to explore on the odata side. If the same is not allowed then we know the reason why ODATA does not support it.


Thanks

Vineet

0