crmTech/ June 13, 2019/ Cloud, CRM, Salesforce Marketing Cloud/ 0 comments

Most of the time there is a requirement that need to pass the URL with parameters. e.g. www.crmsiebel.org?firstname=xyz.

Here to secure the value in url for firstname we need to encode it while sending an email from SFMC.

To encode SFMC has given Base64Encode function. In below code written in Email behind firstname link.

%%[
VAR @firstname
SET @firstname= Base64Encode("XYZ")
]%%
<a href="http://CLOUDPAGEURL?firstname=%%=v(@firstname)=%%"><FONT color=black>firstname</FONT></a>

I wand to decode first name in cloud page. Find below code to decode it.

To decode SFMC has given Base64Decode function. Below code written in cloud page to decode the value for same.

<html>
  <head>
    %%[ VAR @firstname
SET @firstname= QueryParameter("firstname")
SET @firstname= Base64Decode(@firstname,'UTF-8')
]%%
  </head>
<body>
%%=v(@firstname)=%%
  </body>
</html>

Advertisements
Share this Post

About crmTech

Sharad is working from more than 11 years in IT industry. He has giving his technical services in CRM for telecom, automobile, retail, finance industry in Sales, Service and Marketing. He has primary skill in Siebel and Salesforce Marketing Cloud. Apart from this he has worked in Google Cloud, Wordpress blogging, SEO optimization, Short film making, mobile apps creation,logo design creation for his own interest.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.