Skip to main content
February 20, 2013
Question

SyncMultipleLeads to LeadLists

  • February 20, 2013
  • 3 replies
  • 784 views
Hi there,

I am trying to set up a batch lead import to a leadlist (using the .net framework). I was able to import the leads during the import, but I wasn't able to figure out a way to import the leads to a leadlist automatically.

Is there a way to set the list key using ParamsSyncMultipleLeads? The only members of the ParamsSyncMultipleLeads class are a list of leadRecords, dedupEnabled and dedupEnabledSelector. Not sure how to set the LeadList for the import. 

Thank you!
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

February 21, 2013
By Lead List do you mean a Static List in Marketo? I'd look at the importToList call which is designed to add to a list and import in one call.
February 21, 2013
Sorry, I meant static list.

I created a static list called "zzTestSai" in my instance. I am able to get the leads in the static list using ParamsGetMultipleLeads and using the static list name as the StaticListSelector. 

However, when I set the "zzTestSai" listName for the ImportToList call, I get a response saying that the lead list is not found. 

Is there another way I can set the list name? 

The code that I am using is below for any reference:

            Marketo_WS_2_0.ParamsImportToList import = new Marketo_WS_2_0.ParamsImportToList();
            import.listName = "zzTestSai";
            import.importFileHeader = data_headers;
            import.importFileRows = data.ToArray();
            import.programName = "zzTestSaiProgram";

            Marketo_WS_2_0.SuccessImportToList response = new Marketo_WS_2_0.SuccessImportToList();
            try
            {
                response = client.importToList(ws_header, import);
                results = "";
            }
            catch (Exception e)
            {
                results = e.Message;
            }


Thank you. 
February 21, 2013
Hmm, it seems like this should work. I'd recommend reaching out to support so they can diagnose the specific call and what is happening.