Questions tagged [ampscript]

AMPscript is a proprietary scripting language for Salesforce Marketing Cloud products that you can embed within HTML emails, text emails, landing pages and SMS messages to control the content that is displayed to the individual consumer. It also provides functionality to track impressions and highlight which content areas get the most attention from the viewer.

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

EncryptSymmetric AMPScript AES

We want to encrypt / encode URL parameters on our pages. I tried to encrypt a parameter using EncryptSymmetric() with AES algorithm as explained in the documentation %%[SET @encData=EncryptSymmetric("...
4
votes
2answers
5k views

Using AMPscript with SSJS Activities

I have tried using the below AMPscript block in an SSJS Activity, however it appears that Script activities only support SSJS and AMPscript cannot be included in Script Activities — please can someone ...
6
votes
2answers
9k views

Dynamic sender profile with AmpScript

My Client is sending to 40 different countries a unique, localized and highly personalized email. They want to have a different sender profile depending on the contact country code, including a ...
4
votes
2answers
5k views

REST API Methods in AMPScript or SSJS

Is there any way via AMPScript or SSJS to utilize HTTP methods outside of GET and POST? I have had no problem utilizing these two via the HTTPPost() and HTTPGet() functions, but have not found any ...
4
votes
2answers
14k views

Marketing Cloud Landing Page: pass values to a data extension

I created a landing page which auto-populates first name, last name and the email. Now I need to pass these 3 along with what radio buttons are selected by the user to a data extension other than the ...
21
votes
4answers
9k views

Can AMPScript parse JSON?

Using AMPScript to parse an XML feed. Client is switching to JSON. Is there something similar to BuildrowsetfromXML() for JSON in AMPScript? I am confined to using the members login area and not an ...
4
votes
1answer
2k views

How to track URLs included in HTTPGet()

We are using AMPscript HTTPGet to pull in some HTML dynamically. The issue is that the URLs are not being wrapped in ET's tracking so clicks aren't being logged.
6
votes
1answer
4k views

AmpScript to select Right or Left characters from a string

Is there an AmpScript function that can be used in an equivalent manner to sql left, right and mid functions? Thanks, Mark
2
votes
1answer
5k views

How to Fetch a html form's Post variables using AMPSCRIPT and create a record with the values in salesforce objects

I have a html web form which have input fields in it and when a customer fills in the form and clicks on submit, i want the input values to be taken into some data extension in marketing cloud [...
1
vote
3answers
5k views

Links generated in the AMPscript block are not being tracked

I noticed the links are not being tracked when the links are created into the AMPscript block (in between %%[]%%). When I hover the links in the email tests I receive they are normal links e.g. http://...
12
votes
5answers
3k views

Using AMPscript to retrieve content from CloudPages

We've build a CloudPage that looks like this: <!doctype html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body>hello world</body&...
3
votes
1answer
3k views

How to include Salesforce Object fields as AMPscript variables in emails sent from Journey Builder

I'm trying to use a Salesforce Object field as an AMPscript variable in an email, when the Salesforce Entry Event is used in a Journey Builder Interaction. I've created a 'Salesforce Data' event (...
4
votes
1answer
2k views

How can I make sure the exacttarget email I've built using ampscript only sends if there are new posts in my RSS feed?

I've created an email using ampscript that pulls in the latest blog posts from an RSS feed. I would like to automate the sending of this email on a daily basis. This blog may have days where there is ...
1
vote
2answers
4k views

Exclusion Script

I'm trying to create an exclusion script that will not send to people who do not have at least 16 matches in a related DE. I feel like i'm really close but haven't been able to get it to work yet. ...
-4
votes
2answers
1k views

Retreive set subject line

I am creating multiple emails based off the same template in ExactTarget. Some of the emails will have a different subject line. Is there any way to pull the subject line created during the initial ...
1
vote
2answers
5k views

How to fire Journey API Entry event through AMPscript?

I need to trigger a Double Opt-In Journey process instantly after a Marketing Cloud Landingpage form submit (Smart Capture cannot be used). I'm aware that I could save data in a DE an run an ...
4
votes
1answer
731 views

Using Exclusion Script with _Sent Data View

I would like to use an Exclusion Script when sending an email from Content Builder where if the Subscriber has received an email in the past week, then the email should be suppressed from sending. ...
3
votes
1answer
4k views

Using AMPScript to Pre-Populate a Smart Capture Forms in Salesforce Marketing Cloud

I'm trying to send an email to Data Extension A that will link users to a Marketing Cloud Landing Page with a Smart Capture form. The Smart Capture form is updating Data Extension B. The form that ...
3
votes
2answers
2k views

Need AMPScript to create Dynamic Sender Profile

I need some help with a line of AMPScript to enter into the From Name and From Email in the Sender Profile set up page. I am trying to build a dynamic sender profile that will look up a relationship ...
1
vote
1answer
787 views

How to restart a Triggered Send from the AmpScript

I have defined a Triggered Send based on a sendable Data Extension and an EMail AMPScript. I have assigned a external key to the Triggered Send and is sending emails when I create a POST request to ...
1
vote
1answer
8k views

Implementing a Custom Subscription Center in Salesforce Marketing Cloud

Has anyone implemented a custom subscription center using landing pages? The example one from the documentation doesn't seem to be working. I would really like to just customized the out of the box ...
3
votes
3answers
3k views

Is there a way to refer to AMPscript variables dynamically?

I have a piece of AMPscript containing 99 problems server variables which I would like to loop through and print, one by one. They're named [AX_VAR_1] through [AX_VAR_99]. I don't want to list out ...
2
votes
0answers
969 views

CreateSalesforceObject AMPscript function and Record Locking Concurrency

We are using the CreateSalesforceObject AMPscript function to create a new record in the Salesforce CampaignMember Object when an email is sent, by including the following code in an email: set @...
1
vote
1answer
3k views

AMPScript for REST API call in landing page

I'm trying to call REST API to display a push message that is sent from Marketing Cloud in landing page. How do I call the API? I was able to get the Token using the client secret and ID but how to ...
0
votes
1answer
743 views

Manage automation via ampscript API

Is there a way to start an automation via AMPScript API within a landing page? I tried the following and it throws an error that the automation is deleted . However, the automation is not deleted. ...
6
votes
2answers
8k views

How To Display Values from a Data Extension with AMPScript

OK. So I have read all of the documentation, and tried this on my own, but this is all still coming up Japanese to me. I need help writing the code I need to bring data in from an extension to create ...
4
votes
1answer
4k views

AMPscript - If Contains

In an AMPscript If statement, is there a way to use "contains" as the operator? For example: If Var1 Contains "Dog" Then do this Would I just have to use a regular Expression? Thanks, Ben
3
votes
1answer
652 views

Why are all AMPScript links broken when “Track all links in this email” is selected

I have built an email which generates links for the user using AMPScript as follows: %%[ VAR @BuildingName, @BuildingURL // additional logic to get correct building SET @BuildingName = LOOKUP("...
3
votes
2answers
134 views

Dynamic LookupOrderRows

Using AMPScript, I want to pass from a URL Attribute lookup variables and use these variables in my LookupOrderRows function. The challenge is that not all lookup variables have to be passed by the ...
2
votes
1answer
747 views

How to use all the parameters of the RaiseError function?

The documentation for the RaiseError function shows that there can be up to 5 parameters RaiseError(S1,B1,S2,S3,B2) The example in the documentation shows parameters S1 and B1. I am looking for an ...
2
votes
1answer
1k views

Ampscript for Footer Content

I have about four footer variations that we use at the bottom of our email templates. I've been trying to place the various footers in: MyContents\Company_Footers\FooterNameHere An example footer ...
1
vote
2answers
2k views

Dynamic Sender Profile not working

I would like to automatically fill the "From Name" field of our sender profile. Using AMPScript i created a new Sender Profile with %%=v(@FromName)=%% in my "From Name" field. Then in my template-...
0
votes
1answer
1k views

CloudPagesURL() value not showing in HTML

I am trying to pass the email value from a data extension to HTML. I am using the CloudPagesURL() in my email in attempt to grab the subscriber's email. Here is my code syntax that I am attempting to ...
0
votes
1answer
714 views

DecryptSymmetric with triple DES errors

%%[ VAR @value, @dec, @email, @other, @null SET @email = emailaddr SET @null = SET @value = Lookup("Encrypted Jimmy Testing","EncrypText","emailAddress",@email) SET @dec = Base64Decode(...
0
votes
2answers
623 views

Send a coupon - Claim row

I am using the following code in order to retrieve a coupon from a Data Extension, but I have an issue. When I sent an email to several contacts, they received the same coupon. Could you tell why this ...
0
votes
1answer
56 views

Trying to create a URL with shipping tracking codes using a data extension

Hi I currently have a data extension with 15 columns that are being populated by an API call. Once a record has been added any one of the 15 Attribute Values can have a tracking code in it. I need to ...
9
votes
4answers
2k views

How to get the floor (round down instead of up) of a number with AMPscript?

I'm doing a bit of math with AMPscript, and I'd like to be able to round a number DOWN eg: I would like 5.5, 5.6, 5.7 etc.. to become 5, not 6 The standard FormatNumber() function will automatically ...
4
votes
1answer
1k views

How do I add subscriber to a suppression list with ampscript in a landing page?

I am trying to build a custom subscription center that will add or delete a subscriber from a suppression list. I have been successful when adding subscribers to a data extension and was hoping I can ...
4
votes
1answer
778 views

HTML editor error in content builder

We're transitioning all our old email code from the Classic Content into the Content Builder, but I've run into an issue several times that looks like a glitch in the HTML editor (NOT the wysiwyg) to ...
3
votes
4answers
4k views

Dynamic trackable links in ExactTarget email

I have an ExactTarget email in which part of the content is generated from XSL: set @content = TransformXML(@markup, GetPortfolioItem("my xsl")) The XSL creates links similar to this: <a href='%%...
3
votes
2answers
3k views

Variables in alias tag showing in link level reporting

I'm trying to include a couple of variables within a Concat inside an Alias tag and I am not seeing the expected string in "LinkName" reporting values but rather the variable names. So I get ...
3
votes
1answer
317 views

Marketing Cloud - Is there a way to disable WAC String for a specific link (ex. Tracking Link) with AMPscript or otherwise?

A client recently went live with a Commerce Cloud website / Marketing Cloud integration. Marketing Cloud is sending a Shipping Confirmation triggered email. The tracking link in the Shipping ...
2
votes
4answers
2k views

LookupRows in All Subscribers?

When visitors register for an event through our ET data extension we want to scan through the "All Subscribers" data to see if we already have information on them such as name, company name etc. I ...
2
votes
2answers
991 views

How do I arrange content based on customer propensity score using ampscript

I'm pretty new to ampscript and we are designing a template which will order the content based on the customer next purchase propensity. For example we have 5 genre values for a customer which will ...
2
votes
1answer
2k views

How to retrieve Subscriber Profile Attributes using RetrieveRequest using AMPscript (Landing Page)

With the code (AMPscript) below I'm currently able to retrieve properties for a subscriber object, but I'm unable to retrieve the (Profile) Attributes. What am I missing? Adding the "CreateDate" ...
2
votes
2answers
904 views

How can I obtain the status of an automation in a Business Unit using AMPscript?

I am attempting to retrieve the status of an automation in a Business Unit with the following AMPscript, but I haven't been successful yet. Could someone please assist? %%[ SET @key = "###" SET @...
2
votes
1answer
4k views

How to use ampscript in order to pull user data from a second data extension?

We have several data extensions that have data relationships with each other. How can I send an email using one data extension while pulling data from a second data extension to personalize my email ...
1
vote
1answer
840 views

Can ExactTarget and AMPscript use a form to upload an image?

We have many forms within our AMPscript powered microsite landing pages to edit and define content within pages. Am curious to know if there are known techniques that would add a browse button and the ...
1
vote
2answers
794 views

Can you upload a file from a Cloudpage into a Marketing Cloud FTP

I'm wondering if it's possible to use a form upload on a Cloudpage to upload a file into our Marketing Cloud FTP? Thanks in advance! -Nikki
1
vote
3answers
645 views

CloudPageURL via SMS broken link

I've found that using CloudPagesURL via SMS will always result in the Server Error 500 page, no matter if the URLEncode is used or not, even if the CloudPage itself just holds simple text. CloudPage ...