I'm finding that the SOAP interface will match existing Leads by email address even when they shouldn't.
Example situation (based on what I tried to do):
My instance has a Default partition, and an ABC partition.
The Default partition contains a Lead with email "batman@gotham.com". This Lead has no foreignSysPersonID. Last Name = Keaton.
I want to create a new Lead with the following properties:
-
email: batman@gotham.com
-
foreignSysPersonID: 1000
-
Last Name = Kilmer
-
in partition ABC
Since Leads do not have to have unique email addresses, I think this should be possible. You can certainly do it with the online portal.
What I tried:
I used the following SOAP (some irrelevant details excluded)
<SOAP-ENV:Envelope blah blah>
<SOAP-ENV:Header>
<ns1:AuthenticationHeader>blah</ns1:AuthenticationHeader>
<ns1:MktowsContextHeader>
<targetWorkspace>ABC</targetWorkspace>
</ns1:MktowsContextHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tns:paramsSyncLead>
<leadRecord>
<foreignSysPersonId>1000</foreignSysPersonId>
<Email>batman@gotham.com</Email>
<leadAttributeList>
<attribute>
<attrName>LastName</attrName>
<attrType>string</attrType>
<attrValue>Kilmer</attrValue>
</attribute>
</leadAttributeList>
</leadRecord>
<returnLead>true</returnLead>
</tns:paramsSyncLead>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What happens:
Instead of creating a new Lead in the ABC parition, it modifies the existing lead, changing Keaton to Kilmer, and presumably assiging the foreignSysPersonID to it too.
Even though I specified a foreignSysPersonId, it matched by Email anyway.
I even tried moving the email address into the leadAttributeList. Same result.
Conclusion:
What I'm trying to do is impossible via the SOAP interface. Even though email addresses aren't unique, Marketo stubbornly wants to look stuff up by email addresses anyway. (See also: your Munchkin library, which also subbornly uses email addresses as if they were unique).