Skip to main content
September 19, 2013
Question

Getting ForeignSysPersonId = Null after sync Lead

  • September 19, 2013
  • 1 reply
  • 558 views
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.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

September 19, 2013
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.