Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

CreateSalesforceObject creating duplicate records

$
0
0

I have been sending email campaigns using which my subscribers can click on a cta button and request a callback. This CTA redirects to a cloud page which consists of the AMPscript to create a callback record for my custom object 'Demographics'. I send these campaigns multiple times to the same users. Of late, the script creates 2-5 duplicate records. The row count logic didn't work because there are similar records generated previously as well. How can I ensure only a single record is generated.

%%[set @id = _subscriberkeyset @communities = 'community_id' var @createdemographicset @createddemographic =CreateSalesforceObject('Demographics__c', 5, 'Contact__c', @id, 'Community__c', @communities, 'Answer__c', 'Yes', 'Name', 'Requested a callback?', 'MCSource__c', 'Campaign1')]%%

Viewing all articles
Browse latest Browse all 359

Trending Articles