I'm trying a new lead gen piece where interested clients sign up for a newsletter on a cloud page.

I want to create a new contact for signups by sending up to service cloud using the object create function in journeybuilder OR CreateSalesforceObject() AMPScript but struggling at the moment. My previous attempts at using journey builder created odd subscriber accounts where the email address was input as the subkey and ultimately then creating contacts without proper subkeys. What would be the best way around this? The current attempt at using AMPScript looks like this, but upon submission, going through to the thank you page breaks when the email parameter is not empty.

%%[SET @email = RequestParameter('emailAddress')
IF NOT EMPTY(RequestParameter("emailAddress")) THEN
  VAR @subscriberKey
  SET @subscriberKey = CreateSalesforceObject(
    "MC_Candidate", 4,
    "MC_EMAIL__c", RequestParameter("emailAddress"),
    "MC_CONTACT_BY_EMAIL__c", RequestParameter("marketingOptIn"),
    "MC_DAILY_NEWSLETTER__c", RequestParameter("dailyNewsletter"),
    "MC_SOURCE__c", RequestParameter("source")
  • 1
    Hi and welcome to SFSE! Your question contains a lot of esoteric terms, e.g. what is a candidate profile, a shell account, and how do you expect us to know how you candidate sync table gets populated? Please provide more context into the solution you are working on, on whether other Salesforce Clouds are involved, and share what you have tried to do yourself in order to sort this out yourself. Nov 21 at 18:55