0

I would like send an email from Marketing Cloud asking for the subscriber to click on a link. Once that link is clicked, I want to update a checkbox field in the subscriber's Contact in Salesforce.

Is this possible?

2

This can be solved by using a combination of landing pages and Ampscript functions.

You will have to create a landing page in Marketing Cloud and have the link in the email point to that landing page. When the user clicks on the link in the email, they will be taken to the landing page and the code in the landing page will get executed.

This is where you provide the code to update the Sales Cloud Data. Please refer to UpdateSingleSalesforceObject for details on how to use the function. The following code snippet shows how to update the value of last name in the Contacts object, you can modify it to update the checkbox you need to update.

%%[  
 UpdateSingleSalesforceObject('Contact',@contactid,'Last_name','New Value')
]%%
|improve this answer|||||
  • Thank you for your message! I'm new with Marketing Cloud -- when you say landing page, do you mean Web Studio > CloudPages? – Watson Oct 24 '17 at 21:09
  • That's correct @L.Watson, you can create landing pages in the CloudPages module. Let me know if you need more information. – Rajdeep Singh Oct 25 '17 at 1:04
  • I think this is the right solution. I can add AMPscript directly into the HTML of the Cloud Page. However, I need to figure out make this code work for any user who clicks on the page... not just a specific contact. – Watson Oct 31 '17 at 19:46
0

You could define a visualforce page and pass it the record Id.

<apex:page controller="mycontroller" standardController="Contact"
           action="{!updateContact}">

In the controller just define what to do with that record.

But invoking DML on Page loading is considered bad practice and you won't get through security reviews. So maybe consider updating the record when clicking a button or something.

|improve this answer|||||
  • Thanks! To confirm, once a person clicks on the button, you are suggesting they get routed to the VisualForce page that updates their record via apex code? The subscribers are not Salesforce Users. Will they be able to see the page? – Watson Oct 24 '17 at 18:39
  • Could you please describe the scenario behind your question? That would help understanding if there is a way that gets you around the bad practice issue Basti mentioned. – Stephan de Paly Oct 24 '17 at 18:54
  • Of course! We'd like to send an email (sending from Marketing Cloud) asking if our subscribers would like to stay subscribed to our 2018 newsletter. If so, we want them to click on a button inside the email saying "Yes! Subscribe me!" Once that button is clicked, an empty checkbox field on their Salesforce Contact gets checked. Does that help? – Watson Oct 24 '17 at 19:03
  • Yes, it does. I just upvoted Rajdeeps answer as it currently is the easiest way (least requirement of technical knowledge) to achieve this. It again brings me to the idea of an activity type in journey builder that works according to the "as soon as" principle for actions. Technically that should work in the MC as log data is created accordingly. It would allow really nice real time journey flows. – Stephan de Paly Oct 27 '17 at 0:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.