0

I wrote some code to interact with Marketing Cloud's SOAP API to create a List and populate Subscribers by importing a CSV file. The code works fine for CSVs up to a couple of thousand records. I create a List record, then a SubscriberList record. Then I pass in an array of records, loop through the array of records, and then create Subscriber records.

However, when I tried running my code with the last list (28k rows), it failed. Is there a recommended way to programmatically create a List and Subscriber records by importing a large CSV?

  • Are you passing the CSV via the API payload or importing it via the FTP? – Gortonington Jan 30 at 20:33
  • I was passing it via the API payload. And this works for CSVs with only a couple of thousand records. But it's failing for the 28k CSVs that we have. – hadoob024 Jan 31 at 15:54
  • yes, there is a limit per API call of around 2500 (or abouts, don't remember exact number) records. You would need to separate this call into multiple calls, or (the more efficient way) use the API to create the list, another to push the CSV to the SFMC FTP and then use the API to initiate the import into your new list. – Gortonington Jan 31 at 16:04
  • Ah. That makes sense. Well ok. I have the code working to create a List. That shouldn't be a problem. However, I haven't seen anything in their documentation about FTP'ing the CSV to their system and then being able to reference it after the fact. – hadoob024 Jan 31 at 16:42
  • 1
    Ah. OK. So I just need to find what the FTP info is for where to upload the CSV, correct? And once that's done, I create the Import Definition which will import the contents of the FTP'd CSV into the List record, correct? – hadoob024 Jan 31 at 16:56

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.