My Products
Help
ExopenPM
CONTRIBUTOR *

Filter on nested lastModifiedDateTime attribute

by ExopenPM

Hi,

 

We are fetching Inventory from the Visma.net ERP Service API with filters to only fetch changes from last time we fetch data using "lastModifiedDateTime" and "lastModifiedDateTimeCondition". This works fine but we have found that if the nested child object "warehouseDetails" changes (we are interested in 

"quantityOnHand" for instance) it has its own "lastModifiedDateTime" which updates while the root "lastModifiedDateTime" does not. Hence do we miss this update since we filter on the root object only.
 
Is it possible for us to get changes to "warehouseDetails" and other nested child objects as well via filter or do we have to always fetch all objects to be sure to get all updates?
5 REPLIES 5
ExopenPM
CONTRIBUTOR *

by ExopenPM

Hi!
Thanks for your response and the information about availabilityLastModifiedDateTime. A follow up question. Is it possible to combine the two filters with OR? I.e. both use lastModifiedDateTime > date OR availabilityLastModifiedDateTime > date in the same request yielding either base inventory objects that has been updated or inventory objects with availability updated.
Is this possible because when using them both in a request query they work with AND, that both must be fulfilled but in our case we would need an OR logic.

Marten Voort
VISMA

by Marten Voort (Updated ‎18-09-2024 14:39 by Marten Voort VISMA )

Please see comments in response to kashyap's question 😉

Accepted solution
Marten Voort
VISMA

by Marten Voort

Hi! All lastModifiedDateTime fields in the child objects of the Inventory endpoint relate to changes in availability. Not te be confused with actual item-warehouse details for example. Therefore you will find them directly below available fields in the endpoint response. These can also be filtered when executing a GET request. You can use  the parameters availabilityLastModifiedDateTime and availabilityLastModifiedDateTimeCondition to activate this filter. Let me know if this has the desired effect.

kashyap
PARTNER

by kashyap

How can we put both lastModifiedDateTime and availabilityLastModifiedDateTime  together in "OR" condition?

Marten Voort
VISMA

by Marten Voort

This is not possible unfortunately, you have to do two separate requests to to get this desired effect.