Re: SOAP API SyncLead always creates instead of updating leads

Anonymous
Not applicable

SOAP API SyncLead always creates instead of updating leads

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

Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: SOAP API SyncLead always creates instead of updating leads

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?
Anonymous
Not applicable

Re: SOAP API SyncLead always creates instead of updating leads

Afraid that doesn't work for me. I am using the SOAP 2.0 API, and those fieldnames aren't valid there.