SOAP API SyncLead always creates instead of updating leads | Community
Skip to main content
February 28, 2013
Question

SOAP API SyncLead always creates instead of updating leads

  • February 28, 2013
  • 2 replies
  • 877 views
Hi,

I am going around in circles trying to make an anonymous lead known using the SOAP API.

I can call getLead based on a cookie and retrieve the anonymous lead. But when I do a SyncLead using the same cookie, it always responds:

(ResultSyncLead){
   leadId = 28607
   syncStatus = 
      (SyncStatus){
         leadId = 28607
         status = "CREATED"
         error = None
      }
   leadRecord = None
 }

As in, it creates a new lead instead of updating the anonymous lead.


Here are my synclead params:

(ParamsSyncLead){
   leadRecord = 
      (LeadRecord){
         Id = None
         Email = None
         ForeignSysPersonId = None
         ForeignSysType = 
            (ForeignSysType){
               value = None
            }
         leadAttributeList = 
            (ArrayOfAttribute){
               attribute[] = 
                  (Attribute){
                     attrName = "Email"
                     attrType = None
                     attrValue = "foo@example.com"
                  },
            }
      }
   returnLead = True
   marketoCookie = "id:732-BYO-081&token:_mch-mbed.org-1360169766550-44998"
 }

Help! 

Thanks,

Dan

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

2 replies

February 28, 2013
You need to put the ID of the lead in your ParamSyncLead
So in your ParamSyncLead, you need to put Id = 28607, and there's another property called IdSpecified, you need to set that to true.

That's how I did update to a lead.

I'm also having trouble with Updating a Lead using syncLead,  because even though I pass in new Contact info, Marketo only updates the Company Info.

Anyone else having this issue? Or is this the expected behavior?
February 28, 2013
Afraid that doesn't work for me. I am using the SOAP 2.0 API, and those fieldnames aren't valid there.