Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ampscript]

AMPscript is a scripting language for ExactTarget 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.

0
votes
1answer
14 views

AMPscript Error with XML

I have a Partner sending some data to a Triggered Email/Data Extension which includes a column for XML data. The trigger is erroring and not allowing the data to get to the Data Extension. Below ...
0
votes
0answers
14 views

Extracting the send context Data Extension fields using SSJS

I am trying to extract the send context Data Extension from an email thats being sent by placing the following code in the email itself: <script runat="server"> Platform.Load("Core", "1.1.1"); ...
1
vote
1answer
17 views

Is it possible to expose all rows in a Marketing Cloud data extension?

I'm looking to display a list of items in an email dynamically- was wondering if this was possible to achieve with AmpScript? For example, let's say I have an email like this: Items now available ...
0
votes
1answer
23 views

Give customer keys with batch processing

I need to build a dynamic content with dynamic images with AMPScript. If I use ContentImageByKey(), I need to change the customer key of every picture individually and logically(for example, use the ...
0
votes
2answers
20 views

AMPscript RetrieveSalesforceObject() slowing CloudPage load time down a lot

I've made a preference page in which the form directly communicates with the connected Salesforce environment. I save the customer's data via the UpdateSingleSalesforceObject() function, and I ...
0
votes
1answer
36 views

Increment/Decrement Data Extension field when Cloudpage is loaded

I'm aiming to have Ampscript on a Cloudpage decrement a value in a specific data extension field whenever the page loads. Eventually there will be further logic to determine which of two values to ...
0
votes
1answer
44 views

How do I write and IF statement to show certain copy blocks on certain days on the week

How can I write an IF statement for an email? I am looking to show a certain copy on Monday until Thursday and the other copy information on Friday to Sunday. Is it possible? If so, how?
2
votes
1answer
30 views

Format date time field to specific time with AMPscript in Marketing Cloud

I have a question; we are trying to send an appointment confirmation through Journey Builder. Now we are struggling to get the time right. It looks like there is added 1 and sometimes 2 minutes to the ...
0
votes
0answers
22 views

Updating Data extension field values when duplicate recording are coming from API Call

I have a DE with some fields and data is coming from API call. Few times data will be duplicate also and there is a field which is an isActive boolean value. I have to make it that field value true ...
1
vote
0answers
37 views

Unrecognized Expression when validating a Journey

I'm getting the error message "An unrecognized expression appears in a script block. Script Expression: Contact:Title MemberID: XXXXXXXXX JobID: 0" What does the memberID refer to? Here's the ...
0
votes
2answers
35 views

Load AMPScript from an asset outside Marketing Cloud

I have an asset within Marketing Cloud that includes Ampscript. This asset fetches and retrieves info from a Data Extension. I want to include that asset within an existing site and such asset to ...
0
votes
3answers
41 views

AMPscript error in email - Unrecognized expression appears in a script block

I'm trying to create a personalized mailer where recommended products will be pitched to each customer. I'm getting error - An unrecognized expression appears in a script block. Script Expression: ...
0
votes
1answer
40 views

AMPscript: Pull data extension row count

I'm trying to use AMPscript to pull the number of rows (all rows, rather than matching to a specific variable) in a data extension and insert that variable into an email. However, the variable I'm ...
0
votes
1answer
20 views

How to give status of triggered send back as reply on api call to landing page?

I have a cloud page that a customer accesses via an api call (do not know what kind). The call holds an email address at a time. The landing page picks up the email address, does some other stuff and ...
1
vote
2answers
41 views

Dynamic JSON Body in HTTPPost Ampscript

I am trying to set dynamic JSON parameters in an ampscript HTTPPost. When attempting to insert those parameters it only returns the actual ampscript function and not the data that was supposed to be ...
1
vote
0answers
15 views

Adding a new newsletter option to Marketing Cloud email footer and preference center

Our organization recently decided to merge two newsletter areas of interest into one (we cover a range of different industry verticals). We use Marketing Cloud data extensions that pull information ...
0
votes
1answer
23 views

Can I replace rich text - pm with p&zwnj;m

We want to make every time a user inputs 8pm or 9am in a text field in content editor, when the email is sent the pm and am are broken up with a zero-width-non-joiner. e.g 8p&zwnj;m Is that ...
0
votes
1answer
23 views

How to preview a mailer targeted on synchronised data extension ?

We've created a mailer (In SFMC) which includes AMP script and is a trigger based mailer. Whenever a new lead is created a mailer should be triggered with recommended items. There is a separate data ...
0
votes
1answer
34 views

API From Mobile Connect Via Ampscript

I am trying to take all responses from Mobile Connect and dump them into a third party resource for analysis via an ampscript api. I am trying to do this within mobile connect using ampscript but I ...
1
vote
1answer
46 views

LookupOrderedRows() Sort by Date

I'm trying to send customers a receipt via email. I'd like each item in their receipt to be sorted by date (starting with the most recent purchase). I'm using AMPScript to populate the emails by ...
0
votes
0answers
32 views

GTL counting Json string

I have set up a GTL and AMP script that looks at my attributes where i passed in a Json string (array). This is the string: `[{"MiddleName":"der","LastName":"Test"},{"MiddleName":"van der","LastName"...
0
votes
1answer
37 views

Generated Javascript input to Ampscript variable

I have a quick question, I would like to pass values from generated input using javascript to an ampscript variable. My goal is to create a data extension MC from a Landing Page so the user can insert ...
2
votes
1answer
108 views

Retrieve Subscriber from Suppression List

Im trying to retrieve the subscriber from suppression list. But, each time rowcount appears to be 0. Could anyone take a look and let me know where i went wrong? %%[ SET @rr = CreateObject("...
0
votes
1answer
37 views

MobileConnect AMPSCript not working properly

We have two Data extensions, one contains the information about the contacts to which we need to send the SMS(User_Information) and other contains the Date and the SMS content(SMSContentInfo).At ...
0
votes
1answer
25 views

Possible to request and store entire url [duplicate]

I would like to store entire url in a variable and insert into a data extension. I know you can grab specific parameters from a url but cant seem to find anything about the entire url with ampscript. ...
1
vote
0answers
12 views

How to send Outbound SMS Triggered Send from AMPScript

I need to send out SMS from Email using AMPScript. I already found a link where SMS can be triggered from automation. Basically, I need to know if I can trigger SMS by just using AMPScript & NOT ...
1
vote
1answer
29 views

Removing Subscriber from Suppression list

Im trying to remove a subscriber from a suppression list, but when i execute the code, i get the status code as "OK" but the subscriber is not getting removed from the suppression list. Any idea what ...
0
votes
1answer
30 views

How can i debug journey emails which include Ampscript from a Salesforce Data Event?

I think the subjectline says it all. Is there a possibility to debug my journey emails if my ampscript (which includes Salesforce Data Event) is working properly? For example: %%[ VAR @...
-1
votes
1answer
20 views

Script to Add report in Email from FTP

As a last step in Automation, I want to send email and attach file from FTP. How can we achieve this. Thanks
2
votes
2answers
41 views

Sending and Retrieving AmpScript Values in Email strings for Microsites

We're using personalization strings in the url for the Unsubscribe links in our emails. The url links to our Preference Center microsite and includes certain values such as Job ID, List ID, MemberID, ...
1
vote
1answer
25 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?
0
votes
5answers
60 views

How to format a Date with Amscript

While setting an hour in Sales, it seems the Amscript in Marketing Cloud I am using is getting minus one hour. I set 14.00 in Sales and I get 13:00 in Marketing Cloud. I am trying to use zzz or xxx ...
0
votes
1answer
40 views

Ampscript basic authentication request

We are using cloud pages for hosting landing pages. We need to make a request to an api which is behind basic authentication. I don't see in the programmatic marketing content get request docs (...
0
votes
1answer
62 views

Ampscript works in preview and test but not in live send

I have a content block that sets an attribute from a data extension in a variable and then has several lookups based on that. When I preview and test send it works but in live sends I'm getting a ...
0
votes
2answers
34 views

Dynamic content in a Microsite

I'm trying to build a microsite page with dynamic content based on information I have in a DE. Users will see different elements of the page depending on the amount of fields the user has in the DE; ...
1
vote
1answer
36 views

Duplicate Error when using UpdateSingleSalesforceObject

I'm running some AMPScrip in a Landing Page (in CloudPages). At one stage, I need to update a single Salesforce Object (Lead) with new information I got from a form. I am using the Call Below: SET @...
2
votes
0answers
33 views

Triggered Email Send Sends Email Twice

I have a Cloudpage that takes a value, processes some logic and sends an email. Unfortunately, it sends two emails when it should send one. %%[ VAR @sfid, @contactId, @centre, @email, @subLanguage, @...
0
votes
2answers
31 views

Retrieve Email's Text Version or Body Content

Does anyone know if there is a way to retrieve email body content without HTML tags? Or text version (plain text) of the email? The case is we need to log it in Data Extension created to track Email ...
0
votes
1answer
33 views

Adding Data Extension Data into Ampscript HTTPGet

I'm trying to use an API call to return specific information that is returned when we place a global supporter ID into a link. Then using a HTTPGet and substring combination to get the proper ...
2
votes
1answer
56 views

Can I use AmpScript to set Subscriber Status in Marketing Cloud?

A prior developer built our microsite preference center using ampscript to grab user info from SalesForce and update the Contact/Lead info depending on the user's answers. In the case where a User ...
0
votes
1answer
61 views

SSJS to call Content Block with AMPscript

Use case: Through automation studio, a script activity is use to call and reference a content area through the "ContentAreaByName" function. That content area contains AMPscript that performs specific ...
0
votes
1answer
32 views

Amp script multiple fields

In plain english: IF (messages >=1 AND reviews >=1) display both IF (Messages >=1 AND reviews <1) display messages IF (messages <1 and reviews>=1) display reviews note, at least 1 of these two ...
0
votes
1answer
48 views

Compare two columns from different data extensions

I'll get right into it. - I am trying to do the following: I have two DEs one is my send DE, the other is a lookup table. Let's say both data extensions have a column called [STATE]. The send DE ...
1
vote
1answer
52 views

Unsubscribe process on external page with update to _Unsubscribe dataview

What I would like to achieve is an email unsubscribe process that is secure, performant and on an external page with the ability to update the internal system table (dataview) _Unsubscribe. How I ...
0
votes
1answer
36 views

Display Error Message - AMP Script

I would like to display an error message in login page, if the credentials are wrong or invalid. error message like "Invalid Username / Password" should be displayed next to the login button how ...
1
vote
0answers
30 views

Ampscript Attribute from Contact Model

i have searched the documentation with no luck. In an email i want to use a value that is from an attribute that has been configured through Attribute Groups within the Contact Builder Data Designer....
1
vote
1answer
31 views

RaiseError() - additional arguments

Wondering if anyone can shed light on ordinals #3-5 for the RaiseError() function? Particularly interested in #5. Ref: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-...
1
vote
0answers
30 views

GTL - Can't use inside a content block?

I created a code snippet that contains AMPscript and GTL: %%[ /*API Subscriber Config*/ ContentBlockByName("Content Builder\_EmailAssets\Code Snippets\API Subscriptions\API Subscriber Config") SET @...
0
votes
0answers
50 views

Upsert Data Extension via HTML Form block inside Email

I created an html form as an email block that I will send inside the email. I would like to add the fields of a data extension where the destination fields will have the names exactly the same as the ...
0
votes
1answer
34 views

Marketing Cloud AMPScript date output question

We have an email in marketing cloud that has a date of 28 Feb 2019 however this needs to be dynamic based on the following criteria. When we get to 1 March 2019 the dates year needs to change to 28 ...