When updating an existing lead, the lead can be identified one of the follow:
- Marketo ID
- Foreign system ID
- Marketo Cookie
- Email
If any of these attributes are set as a part of the input parameter and if there is a matching lead in Marketo with these values, the existing lead record will be updated instead of created. Passing the Marketo cookie id as an input parameter helps in associating the new lead with existing anonymous activity records.
Except for Email, all of these identifiers are treated as unique keys. The Marketo Id takes precedence over all other keys. If both ForeignSysPersonId and the Marketo Id are present in the lead record, then the Marketo Id will take precedence and the ForeignSysPersonId will be updated for that lead. If the only ForeignSysPersonId is given, then it will be used as a unique identifier.