Re: Getting ForeignSysPersonId = Null after sync Lead

Anonymous
Not applicable

Getting ForeignSysPersonId = Null after sync Lead

I am trying to create a new Lead in Marketo using a custom ForeignSysPersonId . I set the ForeignSysType = Custom and ForeignSysPersonId  = "My_unique_id_string"  goes here.


Once I call "syncLead"  on SOAP API and check the returned Lead record . I get ForeignSysPersonId and FoeignSysType both as "NULL" . Does it mean that my syncLead call failed ?  But I do not see any error on console and also lead gets created sucessfully.

Guys I have been struggling with this since one day. Your help is greatly appreciated.
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Getting ForeignSysPersonId = Null after sync Lead

At present, ForeignSysID is never returned in getLead or getMultipleLeads operations, so you cannot read this value through the API 

You can set those ForeignSys field values with a syncLead, and you can then reference leads with that stored ForeignSysID.

It is likely there is nothing wrong with your syncLead call. I would suggest inspecting the XML response. It will return                <status>CREATED</status>.

The XML response looks like that:
 
      <ns1:successSyncLead>
         <result>
            <leadId>5559</leadId>
            <syncStatus>
               <leadId>5559</leadId>
               <status>CREATED</status>
               <error xsi:nil="true"/>
            </syncStatus>
            <leadRecord xsi:nil="true"/>
         </result>
      </ns1:successSyncLead>


In summary ForeignSysID will not be returned by getLead or getMultipleLeads regardless syncLead was successful or not. It is a known limitation being addressed in future releases of SOAP API (no timeline set for that yet). Please check the XML response to find whether the lead was created.