mirakl / sdk-php-shop

Mirakl PHP SDK for sellers
29 stars 16 forks source link

GetOrdersRequest missed 4 orders. What parameters should I use to prevent this? #36

Open TriJoe opened 1 year ago

TriJoe commented 1 year ago

I use the following parameters when pulling orders from OR11 (Mirakl\MMP\Shop\Request\Order\Get\GetOrdersRequest()).

            $request->setPaginate(true);
            $request->setMax($maxPerPage);
            $request->setOffset($offset);
            $request->sortAsc();
            $request->setCustomerDebited(true);
            $request->setStartDate($lastOrderDate);

Out of 44,000 orders, we had 4 all on the same day that were missed. There were a lot of orders on that day so I suspect either latency issues or the orders took longer to be debited.

Should I be looking back further and ignoring duplicates or should I be using SetUpdateStartDate instead? I'm not sure entirely what this does as the documentation doesn't explain it.