• Welcome to KonaKart Community Forum. Please login or sign up.
 

KKEng API searchForOrdersPerCustomer Filtering by Modified Date

Started by AndreiN, January 16, 2014, 03:58:50 pm

Previous topic - Next topic

AndreiN

Hello,

I'm writing a web service that will download Orders from Kona Kart web stores based on different filtering criteria. The standard ones to use are Create Date, Create Date Range, Order Status, Order Id, Last Modified Date, and Last Modified Date Range. It's these last two that are giving me trouble. When integrating with the KKEng API, it seems that the only way to retrieve orders by certain criteria is by using the searchForOrdersPerCustomer function, which is passed two objects for filtering purposes:



The first, DataDescriptor, seems to define how the information retrieved will be sorted/retrieved/paged, and to have nothing to do with filtering the Orders.

The second, however, clearly has properties that filter Orders by the date they were created: dateAddedFrom, dateAddedTo, as well as status.

My question is: Am I missing something? Is there a way to filter by Date Last Modified? Please let me know if it's possible, or if not, what a strategy for doing so in memory might be, without having to download every order in the store.


Thanks in advance!

ming

Sounds like you've got a good understanding.

If you need to get orders for all customers you should probably be using the Admin APIs.  Not sure if you are only getting orders for an individual customer.  Since you mention searchForOrdersPerCustomer  I assume you are in which case does each customer really have that many orders that you can't read them all (maybe with an order by and a limit set?)?

Typically people would use the OrderIntegrationMgrs in KonaKart to move orders off to another system for further processing - often by dropping onto the Apache MQ that's provided.   One advantage being that you minimise the requests on the production database (like yours for orders) to keep the online store performance as high as possible.

You could add code in these OrderIntegrationMgrs to populate a table that allows you to search however you like... you could potentially add a date to  a custom field on an order to use in your search.   


Nevertheless, we will look at adding the ability to search for orders by Modified date for a future release.

AndreiN

Thank you for your swift reply. I'm not very familiar with Kona Kart (at all), and your answer helped clarify a few things for me. I'll be dropping this pursuit for now, as I have other features I have to build as well. If I end up implementing it, however, I will post how I managed to get it done.

ming

From v7.2.0.0 of KonaKart it will be possible to search for orders between two last modified dates.   You will also be able to sort orders by last modified date.