2

I'm trying to get list of ~40k customers through Magento SOAP Api v2, with customerCustomerList method. I don't have access to Magento instance, only WSDL and credentials.

When I'm calling for all customers, i'm getting either null or SoapFault exception due to "too many customers" being fetched (no error is specified, but I research them - that's the reason).

I'm trying to split the call with created_on range and fetching customers per day, starting from now and going backwards, the problem is - how do I know I should stop?

Do you know a way I can fetch any timestamp 100% sure that there won't be any customers before it, like "oldest customer", or anything similar?

1

You could fetch the customers by created_on date day by day as you already do. Then when you have encountered like 7 days with no customers created, then you should change the API filter for created_on to a wider range, for instance a full month.

If you don't have new customers for three months, you could change the range to one year, or even wider. Until you reach a point where you think it is safe to do a call with a filter like "created_on < YYYY-mm-dd", where the date would be the last date you have searched on.

  • Yes, that's some way to work this around, but resulting in even more API calls and more border conditions to take into account (what if there wil be 2 years of no customers, and then 100k in one week?). What would be the best is any timestamp that I can get through API – Michał Kluczka Apr 20 '15 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.