Browse Category: Marketing Cloud (ExactTarget)

How to create Custom Unsubscribe Page – Marketing Cloud

Here is the method using which you can create custom Unsubscribe page for your Emails.

You need to follow below steps:
1. Create HTML Cloud page.
2. Then you need to include below ampscript code in it:


%%[
VAR @sid, @jid, @listid, @batchid, @reason, @lue, @lue_prop, @lue_statusCode, @overallStatus, @requestId, @lue_Response, @lue_Status, @lue_Error
SET @sid = IIF(Empty(RequestParameter(“email_address”)),RequestParameter(“current_email_address”),RequestParameter(“email_address”))
set @em = RequestParameter(“SID”)
SET @jid = RequestParameter(“JID”)
SET @listid = RequestParameter(“LID”)
SET @batchid = RequestParameter(“JSB”)
SET @reason = “Landing Page Unsubscribe”

SET @lue = CreateObject(“ExecuteRequest”)
SetObjectProperty(@lue,”Name”,”LogUnsubEvent”)

SET @lue_prop = CreateObject(“APIProperty”)
SetObjectProperty(@lue_prop, “Name”, “SubscriberID”)
SetObjectProperty(@lue_prop, “Value”, @em)
AddObjectArrayItem(@lue, “Parameters”, @lue_prop)

SET @lue_prop = CreateObject(“APIProperty”)
SetObjectProperty(@lue_prop, “Name”, “JobID”)
SetObjectProperty(@lue_prop, “Value”, @jid)
AddObjectArrayItem(@lue, “Parameters”, @lue_prop)

SET @lue_prop = CreateObject(“APIProperty”)
SetObjectProperty(@lue_prop, “Name”, “ListID”)
SetObjectProperty(@lue_prop, “Value”, @listid)
AddObjectArrayItem(@lue, “Parameters”, @lue_prop)

SET @lue_prop = CreateObject(“APIProperty”)
SetObjectProperty(@lue_prop, “Name”, “BatchID”)
SetObjectProperty(@lue_prop, “Value”, @batchid)
AddObjectArrayItem(@lue, “Parameters”, @lue_prop)

SET @lue_prop = CreateObject(“APIProperty”)
SetObjectProperty(@lue_prop, “Name”, “Reason”)
SetObjectProperty(@lue_prop, “Value”, @reason)
AddObjectArrayItem(@lue, “Parameters”, @lue_prop)

SET @lue_statusCode = InvokeExecute(@lue, @overallStatus, @requestId)

SET @lue_Response = Row(@lue_statusCode, 1)
SET @lue_Status = Field(@lue_Response,”StatusMessage”)
SET @lue_Error = Field(@lue_Response,”ErrorCode”)
]%%

This function will invoke the unsubscribe action.

3. Add Unsubscribe page link in Template:

Unsubscribe

You Unsubscribe page is ready.

Thank you.

How to Upload/Transfer a File in/from FTP using “WinSCP” app – Salesforce Marketing Cloud

To Download WinSCP for FTP:
  1. Navigate to https://winscp.net/eng/download.php
  2. Click on Installation package
  3. Once the file Download is complete. Open the file and Click Run > Accept > Next > Next > Install > Finish
  4. Once WinSCP app opens up: Select File Protocol as “FTP”
  5. Enter the following Credentials.
Host: You can get this from the FTP Account Setup
Username: “Enter Your Username”
Password: **************
Port: You may have this from your FTP Account Setup location

6. Click Login > Any Pop-ups > Click Yes/ok

Transfer a File from Local to Remote/ Remote to Local
  1. On the left side is your Local PC Site and the right side is your FTP Remote Site
  2. So you will find the file in your Local PC site in the folder, where you can view the folders from the top
  3. On the right hand side, select the folder in which you are trying to upload (Import, Export, Triggered).
  4. In this you will select “Import” folder.
  5. Now on the your Local site > Navigate to the folder in which the actual file exist > Select the file > Left click on it > Click Upload.
  6. The file will be uploaded depending upon the file size automatically.

Pass the parameter Values from Landing Page URL to Data Extensions – Ampscript

I have a simple Landing page, and it’s URL contains some parameter values and those parameters are also Fields in a Data Extension of a Marketing Cloud Account.

To update those parameter values into the Marketing Data Extension when a URL is pasted in your Web Browser, I would follow the below steps:

  1. Let us have an example URL of a landing page: www.abc.com
  2. For the full landing page url along with the parameter values, let’s take

www.abc.com?Field_1=aaa&Field_2=bbb&Field_3=ccc

Paste the code given below in your Landing page. We have defined the parameter values first and then printing the success and failure values on the page:

%%[

set @f1= RequestParameter(‘Field_1’)

Set @f2= RequestParameter(‘Field_2’)

set @f3= RequestParameter(‘Field_3′)

if( @f1 == ”)then

set @fail =’Failure’

else

InsertData(‘Data extension Name’,’Field_1′,@f1,’Field_2′,@f2,’Field_3′,@f3)

set @suc= ‘Success’

endif

]%%

%%[ IF @f1== “” THEN ]%%

%%= v(@fail) =%%<br>

%%[else]%%

%%= v(@suc) =%%

%%[ ENDIF ]%%

Help Site:

https://salesforce.stackexchange.com/questions/93183/marketing-cloud-landing-page-pass-values-to-a-data-extension

How to Upload files on FTP using FileZilla- Salesforce Marketing Cloud

Marketing Cloud FTP cannot be accessed directly from Marketing Cloud UI. For that you need to install third party ftp clients. Below is the method to Import/Export files using one of the ftp client FileZilla.

  1. Download the latest version of FileZilla, google it. Install it.
  2.  Open Filezilla
  3.  Enter- Host, Username, Password and Port. ( all these details you can find in your Marketing Cloud account. Click path is Administration > Accounts Tab > FTP Accounts. URL is your Host.
  4.  Click “Quick Connect”
  5.  On the left side is your Local PC Site and the right side is your FTP Remote Site.
  6.  Locate your file under Local Site box, select it, right click and Upload.
  7.  Your file will get upload in Import Folder of Remote Site box.