Monday, February 19, 2018

SalesForce Marketing Cloud - System level variables


Hey All


A quick reference guide for system variables which are always hand to know :

view online = %%view_email_url%%
email address = %%emailaddr%%
name of campaign = %%emailName_%%
forward to a friend = %%ftaf_url%%
unsubscribe = %%unsub_center_url%%
profile center = %%profile_center_url%%
subscription center = %%subscription_center_url%%
sender reply name = %%replyname%%
sender reply email address = %%replyemailaddress%%
business name = %%Member_Busname%%
business address = %%Member_Addr%%
business city = %%Member_City%%
business state = %%Member_State%%
business postal code = %%Member_PostalCode%%
business country = %%Member_Country%% 

And its always good to know how to work with URLS in your e-mail :

URL from list href="%%=RedirectTo(variable)=%%"

Variable as URL parameter
href="https://bob.co.za/?param=%%variable%%"

Variable as part of the URL
%%[set @url = concat("https://bob.co.za/",variable)]%%
href="%%=RedirectTo(@url)=%%"

Remove tracking from a URL
href="%%=concat('link you do NOT want to track')=%%"


Stay tuned as there is so much more to come.

May the force be with you.

Kind Regards
JS

Friday, February 9, 2018

SalesForce Marketing Cloud - Ampscript

Hi All

Below I have added simple coupon code implementation using ampscript.


Some important points to note:


  1. I have the messagecontext as preview - when sending it should be send
  2. My data extension is called Coupons ( this should be replaced with your own if needed)
  3. This is merely a skeleton and you can write so much more to the data extension :-)


 %%[
var @em, @couponRow, @couponCode
if _messagecontext == "PREVIEW" then
set @couponCode = "XX TEST XX"

else
/* include your sendable attribute/column here */
set @em = AttributeValue("emailAddr")

set @couponRow = ClaimRow("Coupons", "IsClaimed", "EmailAddress", @em)

if empty(@couponRow) then

/* You can do other error handling here if you want.*/
/* This aborts the send */
RaiseError("No coupons available", false)

else
SET @couponCode = Field(@couponRow, "CouponCode")
endif

endif
]%%

Here's your coupon code: %%=v(@couponCode)=%%


My the force be with you.

Kind Regards
Jerome

Blogging

Hey All

So in the midst of the crazy rat race one does not always get the opportunity to blog as much as I did before...but as an advocate for knowledge share I  dedicating more time to sharing my many tech adventures in an ever quest to support our global tech community.

Stay tuned as I will be posting more solutions soon.

Kind Regards
J Slinger

Generate reports from Opportunities using a Visualforce Page in Salesforce

  Step 1: Create a Visualforce Page Go to the Setup menu in Salesforce. Search for "Visualforce Pages" in the Quick Find box and c...