cancel
Showing results for 
Search instead for 
Did you mean: 

update order entry item with Impex

tarad413
Newcomer
0 Kudos
1,710

I need to write an impex to update a specific field on a on item on an order.

UPDATE OrderEntry;

I see tickets to create an order entry but not update an existing order entry.

Accepted Solutions (0)

Answers (1)

Answers (1)

mansurarisoy
Contributor
0 Kudos

You can use the following ImpEx header if you know the entryNumber of the entry you want to update:

UPDATE OrderEntry;order(code,versionId[default=''])[unique=true];entryNumber[unique=true];fieldToUpdate

fieldToUpdate is the field you want to update.

If you do not know entryNumber but know the product code, you can use the following ImpEx header. (You need to change product catalog's name with your system's catalog name.)

$productCatalog=defaultProductCatalog
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Online'])[unique=true,default=$productCatalog:Online]
UPDATE OrderEntry;order(code,versionId[default=''])[unique=true];product(code,$catalogVersion)[unique=true];fieldToUpdate

Note that, in OOTB hybris you can add same product as different entries in cart, thus this ImpEx may give you an error stating that "More than one item is found" so first ImpEx is more likely to work without issues.