We’re rewarding the question askers & reputations are being recalculated! Read more.

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("...
6
votes
2answers
8k 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
13k 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 ...
4
votes
2answers
4k 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
4k 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
1answer
3k 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
18
votes
4answers
8k 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 ...
3
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.
2
votes
1answer
4k 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
4k 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://...
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
3k 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. ...
-3
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
3answers
4k 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
600 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
3k 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 ...
1
vote
1answer
686 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 ...
11
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
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 ...
3
votes
2answers
1k 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 ...
2
votes
0answers
881 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
2k 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 ...
1
vote
1answer
7k 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 ...
0
votes
1answer
686 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
7k 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
3k 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
2answers
119 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
536 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("...
2
votes
1answer
725 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 ...
1
vote
2answers
1k 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
617 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
1answer
632 views

AMPScript to get AccessToken failing

I am using below AMPScript to retrieve access token for my subsequent REST calls but it is failing with "Bad Request" %%[var @con,@body,@body1,@auth,@output,@response,@res,@callstatus ]%% %%[SET @...
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
667 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
2k 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 ...
2
votes
1answer
3k 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 ...
2
votes
1answer
911 views

Custom font in Email content blocks

Has anyone figured out a way to use custom fonts in Marketing Cloud emails, where the font is specified only with Free Form content block level? There is a hacky solution provided for full HTML ...
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
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
934 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 ...
1
vote
1answer
817 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
3k views

Personalization in Mobile Connect SMS called within Journey Builder

In order to personalize our SMS - Journey Builder send, we need to use the values of the fields of the Data Extension that trigger de Journey Builder. So that, we are using an AMPScript code in the ...
1
vote
1answer
311 views

Get current location with ampscript or ssjs

I have functionality on a cloud page that depends on the cloud page url. I know how to Requestparameter(), but how do I get the entire url using ampscript or SSJS?
1
vote
2answers
494 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
1answer
1k views

XML and AMPscript — how do I “BuildRowSetFromString” using data from my API post?

I'm trying to build a confirmation email whereupon we create a rowset from a string within the API post. We currently do this without issue when evaluating data from a Data Extension, but I can't ...
1
vote
1answer
266 views

Use Opportunity fields to send dynamic email content in Marketing cloud

I need to send dynamic email to all my booking contacts using AMP Script. Using FOR loop makes repetitive content. I am pulling contacts from Salesforce reports directly without using Salesforce Data ...
1
vote
1answer
2k views

Accessing data from journey object/event in Emails using Journey Builder

I am using Marketing Cloud Journey Builder to send emails to Contacts when a related Custom Object (via Lookup field) is inserted. In my Event Source I have select the Salesforce Object and selected ...
0
votes
1answer
359 views

Counting the Values of the field in AMPScript

I have a field called travelinterestand data extension name called testforelavaran. i dont know how many values in that field, suppose if that field contains four values, (col1,col2,col3,col4) and i ...