Skip to main content
Alexander Lake a posé une question dans #Flow

I have a record-triggered flow set up to run when a specific user creates a new contact. That new contact is automatically added to the specific user's Campaign as a campaign member. The campaign is meant to house all of the contacts this person interacts with, including some of whom they are not Owners of in the system. 

 

 This flow seemed to be working just fine up until last week. When this specific user goes to create a new contact, they are now sometimes running into an issue and get the following message when trying to create that contact -

 

 Error creating Contact. We can't save this record because the “On Contact Creation Add to Campaign - Brenna” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to create records: DUPLICATE_VALUE: Already a campaign member.. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1726555338-14182 (1431177872)ok up ExceptionCode values in the SOAP API Developer Guide. Error ID: 1726555338-14182 (1431177872)

 

These new contacts being created do not exist in the Org. I have recreated the issue using the user’s profile in the sandbox. It seems like they can create some contacts, but not all the time. When they are able to create a contact, it is when the account the contact is associated with does not exist on another campaign member within the campaign already. To reiterate, if there is already a different campaign member from the same account in the campaign, then the new contact cannot be created because of the flow duplicate campaign member error.

 

Does anyone have any idea how I can fix this error?

  

Screenshots of the flow: 

 

Flow Error - Duplicate Value - Campaign Member

Flow2.png

 

Flow3.png

 

Flow4.png

14 réponses
  1. 21 mars 2023, 16:53

    @Alexander Lake Ah I see - somehow I missed the screenshots. 

     

    I replicated this error in my dev org - the error occurs when a new Contact's Account has already been added as a CampaignMember to the specified Campaign. 

     

    This error is occurring because you are specifying both the AccountId and ContactId in the Create Campaign Member action - if you have a new Contact that is created with an Account that has already been added as a Campaign Member to that Campaign, you will get this duplicate error. Specify only the ContactId to prevent this.

     

    If you want to add both the Account and the Contact as a CampaignMember when a new Contact is created, then you need to check to ensure that the Account is not already specified as a CampaignMember before creating that record to ensure that you do not run into the duplicate error. 

0/9000