Skip to content

Instantly share code, notes, and snippets.

@MamaiRachid
Created October 20, 2020 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MamaiRachid/bfa3e62e9760d60f4bdab9074c780df4 to your computer and use it in GitHub Desktop.
Save MamaiRachid/bfa3e62e9760d60f4bdab9074c780df4 to your computer and use it in GitHub Desktop.
Get contact's consent from data extension
%%[
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")
ENDIF
]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment