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
R ReayR Reay 

UpdateSingleSalesforceObject Working During Test But Not Live Email Send

I am working on an email send that has a button for customers to sign up for a loyalty program. I have this button linked to a cloud page with the following code:

%%[
set @subKey = AttributeValue("_subscriberkey")
UpdateSingleSalesforceObject("Contact",@subKey,"Loyalty_Program_Opt_In__c","TRUE")
]%%

When I do a preview and test, and click on the button, the associated contact I am using to test gets updated in our connected Salesforce org. However, when I actually send the email as a test and click on the button from within the email in my inbox, the contact in SF does not get updated.

Any ideas on why it wouldn't be working when it is actually sent out versus when I am testing through "preview and test" within SFMC?

Thanks,

R
VinayVinay (Salesforce Developers) 
You can reach out to Success - Salesforce Marketing Cloud page on https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001pQ5CAI for inputs on your ask.

Thanks,
steven vpnsteven vpn
Most user-based mistakes are caused by taking shortcuts, like an inadequate implementation, failing to invest in training. (https://piratpc.com/little-snitch-torrent-mac/)