This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%=TreatAsContent(HttpGet("http://testsfmc.atwebpages.com/test/yourpagename.html"))=%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%=ContentBlockbyKey("4bd9cced-f9c5-49fe-927a-xxxxxxx")=%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CT.Id AS SubscriberKey, | |
CASE | |
WHEN CT.datapm__CommunicationRules__c LIKE '%100001%' THEN 'TRUE' | |
ELSE 'FALSE' | |
END AS NewsletterEmail_Consent, | |
CASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
SET @emailaddr = AttributeValue("emailaddr") | |
SET @subKey = AttributeValue("_subscriberkey") | |
/* Get the NewsletterEmail_Consent value from Consents Data Extension */ | |
SET @rowsConsents = LookupRows("Consents", "SubscriberKey", @subKey) | |
IF RowCount(@rowsConsents) > 0 then | |
SET @consentRow = Row(@rowsConsents,1) | |
SET @newsletterEmail_Consent = Field(@consentRow, "NewsletterEmail_Consent") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
/* Check if the contact is subscribed to the newsletterEmail_Consent */ | |
IF (@newsletterEmail_Consent != 'False') THEN | |
SET @timeNow = FormatDate(Now(),"iso") | |
SET @created_taskId= CreateSalesforceObject('Task',4,'WhoId', @subKey, 'Subject', 'Datapm:Unsubscribe', 'Description', '{"crCode":"100001"}', 'ActivityDate', @timeNow) | |
/* Update Consents Data Extension */ | |
UpsertData("Consents", 1, "SubscriberKey", @subKey, "NewsletterEmail_Consent", "False") | |
ENDIF | |
]%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Unsubscribe - Newsletter</title> | |
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
comp.SubscriberKey, | |
comp.jobid, | |
eventdate, | |
emailname, | |
Domain, | |
ISNULL(comp.OYBAccountID,comp.AccountID) as OYBAccountID, | |
comp.AccountID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
var ampscriptCode = Platform.Function.ContentBlockByKey("YOUR_CONTENTBLOCK_KEY"); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ var @rows, @row, @rowCount, @subKey, @counter | |
set @rows = LookupRows("BRANDA_COMPLAINTS","OYBAccountID","50000XXXX","Secret", 1) | |
set @rowCount = rowcount(@rows) | |
if @rowCount > 0 then | |
for @counter = 1 to @rowCount do | |
set @row = row(@rows, @counter) | |
set @subKey = field(@row,"SubscriberKey") | |
set @created_taskId= CreateSalesforceObject('Task',3,'WhoId', @subKey, 'Subject', 'Datapm:Unsubscribe', 'Description', '{"channel":"email"}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
SET @MID = '50000XXXX' | |
SET @apiCreds = LOOKUP('REST_Credentials', 'apiCreds', 'MID', @MID) | |
SET @apiCreds = DecryptSymmetric(@apiCreds, 'aes', 'INT_PWD', @null, 'INT_SALT', @null, 'INT_IV', @null) | |
]%% | |
<script runat="server"> | |
Platform.Load("Core","1.1.1"); | |