How to download only new orders ?

CliffSCliffS Member
Several times a day, I log into Foxycart to download new orders.

Of course, I wish to download all new orders, and not bother with any old orders.

Before I start the "search for new orders", I know the Foxcart transaction ID for the most recently downloaded order.

Is there a way to download only orders with transaction ID's greater than a given ID?

The alternative, which I am now using, is to download all orders since the previous day, which causes lots of old orders to be downloaded and slows down everything (I need to then toss out those orders which are old).
Comments
  • fc_adamfc_adam FoxyCart Team
    @CliffS,

    Good question. We don't currently have a filter for only getting orders after a specific transaction ID like you described there. One approach you could take though - is after you've completed an export in the administration, is to hide those transactions you've just exported. Then the next time you come in - only new transactions will be visible by default. You'll still be able to view all transactions by changing the display status filter from "visible" to "both" - but by default you'll only see the visible transactions.

    Could that work for your needs?
  • CliffSCliffS Member
    Thanks Adam.

    Hiding those transactions which have been exported is clumsy for an automated api: the client needs to keep parallel status entries. Note that a transaction becomes "old" only after our client has successfully processed a transaction -- which is not necessarily when a transaction has been downloaded from the Foxy server. So the hiding of a Foxy transaction can't take place when the transaction is exported; it must be a separate message sent to Foxycart afterwards.

    Hiding transactions has an additional price: If there's loss or corruption at the client side, then it becomes a pain to rebuild the client database. (Unhide everything. Download everything & compare. Re-hide.) This means additional client software to check (and possibly rebuild) a hidden entry table.

    A nicer interface, should allow filtering by transaction ID. Transaction ID's are the one known relationship between entries in the Foxy server and entries in the client database.

    Filtering by Transaction ID has many advantages:
    - it offloads work from the Foxycart servers
    - reduces bandwidth to & from Foxycart
    - speeds up processing during busy times (no dealing with processed orders)
    - reduces computational load on the client (no need to download redundant information or carry semaphores)
    - makes the developer's work easier (simpler to get the information that's needed)

    A win for everyone.
  • fc_adamfc_adam FoxyCart Team
    @CliffS,

    Thanks for sending through your specific use case there - definitely appreciate your feedback! I'll discuss with the team if there's a quick improvement we can make with our transaction filters. Transaction ID's won't necessarily be sequential in the order that they come in for a given store, but we'll see if we can make something work.
  • CliffSCliffS Member
    Thanks Adam!

    Yes, I see that transaction ID's aren't sequential for my store - that's no problem. As far as I can tell, they monotonically increase with time.
Sign In or Register to comment.