The email address of the subscriber is currently appended as a parameter to our SFMC email links. Rather than have the email as raw text, we would like to encrypt the value.

For example, the link url is now: http://www.test.com/[email protected] With encryption, it should be: http://www.test.com/?email=[encrypted value]

What would be the best way to achieve this? Note, we want to use encryption, because we need to decrypt the value as well.

Addition: Decryption needs to be done in node. So how can we encrypt in SFMC and decrypt in node?

  • Have you looked at EncryptSymmetric and DecryptSymmetric?
    – sfdcfox
    Commented Jan 27, 2018 at 15:48
  • Where will you be decrypting the value? Commented Jan 27, 2018 at 19:39
  • @AdamSpriggs Node. Any example for this would be very helpful.
    – Findev
    Commented Jan 28, 2018 at 10:12

1 Answer 1


Lookup : https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/EncryptSymmetric.htm

You will want to do something like this (using RedirectTo :

%%=RedirectTo(Concat('http://www.test.com/?email=', EncryptSymmetric(_emailaddr, 'AES', @null, 'password', @null, '0000000000000000', @null, '00000000000000000000000000000000'))=%%
  • Where is redirectTo added?
    – Findev
    Commented Jan 28, 2018 at 10:10
  • 3
    There are 3 ampscript functions in use here: Redirect () - used to tell SFMC that this is a link, which it can then track activity on Concat() - concatenates the string of your URL with the encrypted value EncryptSymmetric() - used for building your encrypted value You will want to construct the url as above. Lookup the Salesforce Help guides for instructions in each function
    – Gravitai
    Commented Jan 28, 2018 at 10:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .