function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CRMfusion - GWCRMfusion - GW 

Upsert a CampaignMember

Previous to API version 16 you could use the Insert call to create OR update a campaign member.  It acted as an Upsert call.


With API 16 Upsert is supported on CampainMembers but I can't seem to get it to work.  The documentations is vague about this issue.


Is there a way to do a single call Upsert on CampainMembers so that the call works the same way as the old Insert call?




You have a couple of options:

1) Use v15.0 or below for the old behavior

2) Use CampaignMemberID as the key for upsert in 16.0+


If Lead or Contact ID are present in an upsert call for 16.0+, upsert will fail.  It's a bit funky, but lets customers fail dirty data if desired.