Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

EPiServer.ServiceApi.Commerce.5.4.5 GetOrganization endpoint does not return meta fields (properties)

Vote:
 

Hello.

We are using ServiceApi to get organization details through a http request (/episerverapi/commerce/customers/organization/). We added some fields on the Business object Organization but they are not present in the response.

We decompiled the endpoint and found that we do not have e field Properties on OrganizationModel class (like we have on OrderGroup for example on the episerverapi/commerce/orders/orderGroupId call).

We would like to get/set some custom fields on the OrganizationModel business object using the ServiceAPI  (and not a custom endpoint) like ExtOrganizationId field.

The serviceAPI response for /episerverapi/commerce/customers/organization/:

Is there a workaround to get and set those custom fields untill (if) this feature will be done?

Thank you!

#227534
Sep 07, 2020 11:19
Vote:
 

Reasonable request - I will file a bug to Commerce team. Thanks for bringing this into our attention.

#227546
Sep 07, 2020 15:40
Vote:
 

Thanks for the response Quan Mai!

Is there possible to to the same for ContactModel object on the /episerverapi/commerce/customers/contact/{contactId} call (the Contact Business object)? We are creating both Contacts and Organizations in epiServer and want to get/set some custom fields using the ServiceAPI so we can sync with external systems like ERPs (without using a custom implementation).

#227569
Sep 08, 2020 5:50
Vote:
 

Hi! 

Do you have a response for the latest question? Also an aproximative due date for the changes will be very helpful.

Thanks! 

#228193
Sep 21, 2020 8:12
Vote:
 

It will be looked into Commerce team so they will decide how to handle it. good chance that they will do the same.

No estimated date is given. As usual releases in ServiceAPI take a bit longer than Commerce packages.

#228235
Sep 21, 2020 21:54
Vote:
 

We've made our own endpoints for specific clients in the past, but it would be great if this was offered in base epi commerce.

#228277
Sep 22, 2020 16:37
Vote:
 

Hello!

Do you have any updates on this? Thanks!

#246687
Jan 12, 2021 14:34
Vote:
 

The fix is being reviewed. If it gets approved it will be another two weeks or so before it's released. 

#246689
Jan 12, 2021 15:18
Vote:
 

Hi!

On the same topic of serviceAPI and custom properties we noticed a limitation that causes bad behavieour.

If we try to update an order (URL/episerverapi/commerce/orders/1049) we need to specify almost all the fields or those will get deleted. Fair, we are doing it but for orderAddresses array if we update (PUT call) the order, it will remove the custom properties that we set on an address. 

This can be siply reproduced if we make a GET call to the same URL and PUT back with the same content, the custom properties are getting deleted. One problem is that they are not retrieved and the second is that they can not be specified back and update. We had to create another custom endpoint to update desired field and not use serviceAPI.

Hope this can also be included in the soon to be fix.

Thanks!

#247313
Jan 20, 2021 8:11
Vote:
 

@Adrian: I would say that's by design. PUT is supposed to update, not "merge". Otherwise it would be impossible to delete a field. 

Or am I misunderstanding you?

#247316
Jan 20, 2021 8:50
Vote:
 

Hi, That's true, the purpose of the PUT is clear and helpful, the issue is that is limited in the data is returns/updates.

The problem here is that the custom properties for addresses are getting deleted and removes fome data that we need on the site. Since we are using them to store some extra data for addresses there is not way to just update custom order properties without accidentally deleting custom address properties 

#247317
Jan 20, 2021 9:06
Vote:
 

So if the custom properties are returned then all is good, I suppose

#247319
Jan 20, 2021 9:16
Vote:
 

returned and updated, yes

#247332
Jan 20, 2021 10:20
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.