Hi. We are using ServiceApi to get order details through a http request (episerverapi/commerce/orders/orderGroupId). We added some meta fields on LineItem but they are not present in the response. We decompiled the endpoint and found that Properties property is present on the LineItem model but is not populated in ConvertToLineItemModel method (OrderGroupModelConverter class) (it is populated on OrderGroup, OrderForm, Payment, Shipment).
Is this known issue and will be included in next releases? What are your suggestions to workaround this issue?
Thank you for bringing this into our attention. I will file a bug for Commerce (which they might turn in to a story), but it might take a while for them to do this.
There is one line of code to add: Properties = lineItem.ConvertToPropertiesModel() nothing more and it is more related to EPiServer.ServiceApi.Commerce nugget then Commerce itself. Do you have any suggestion how to workaround this issue?
I see. Looks like a quick fix - unfortunately it is not possible to easily do that on your side, but I will push for a fix soon.
Could you check again? I have tried reproduce on Service API 5.4.4 and checked code.
GetOrder endpoint returns LineItem's metafields properly.
I tried again but I still don't get the metafields. I also tried to uninstall and then install again EpiServer.ServiceApi and EpiServer.ServiceApi.Commerce nugget packages (v 5.4.4) and nothing changed.
I'm sorry. You are right.
Yep, this is a bug and we have already fixed that and I have checked in the lastest branch.
It will be resoved in the next release of Service API.
Got it, cuvu.
Do you have any idea when the next version will be released?
I think next week, because in the next release it contains only this bug :D
It will be great.
Have a nice day,
Service API 5.4.5 has been released :)
Thank you for the update, we already upgraded the packages yesterday and tested them. It works as expected now.
Thank you for the quick response and fix.
Have a nice day.