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
0
votes
0answers
17 views

How do I pass checkbox values in ampscript and each box checked writes a record into a DE [duplicate]

I have a form page that has three checkboxes. I currently have the form handle page loading and checking on an IF statement when a box is checked but it is only checking the top item and then not ...
0
votes
0answers
21 views

Transpose coloums to rows within a loop to create a table for a cloudpage

I trying to create a simple overview in a cloud page of all emails sends from marketing cloud. Using data views tables, I have created a DE called "Sent_rapport". It looks like this: ...
1
vote
1answer
43 views

AMPscript error: Data Extension key field has a MAX or unlimited length

I'm experiencing a strange error from a LookupRows function. I've thought I've seen every single AMPscript error, until today. The following AMPscript code: set @sendLogRows = LookupRows('SendLog', '...
-2
votes
1answer
30 views

Is it possible to display only 1 result in a Ampscript loop? [closed]

If I had a loop that displayed the sales from an entire year that included each month. How could I display only the 5th month's sales from the loop? Month Number of sales Jan 4 Feb 6 Mar 2 Apr 3 ...
0
votes
0answers
12 views

How to align a Checkbox and Text on the same line in Cloud Pages? [closed]

This is the code I currently have. How do I format the checkbox to be right after the word "email" and not on the next line. <label for="opt">Check this box to subscribe ...
0
votes
1answer
25 views

Multiple SQL statements in one Activity [closed]

We have to check in our transaction database to see if the product is bought. We get the data like: DB1 key product_1 Product_2 product_3 111 123456789 789456456 456789132 123 487462538 487454521 ...
0
votes
1answer
23 views

Disable submit button on Cloud Page using the Primary Key

Hope I can explain this right. I would like to request assistance on how can I disable the submit button on the Cloud page form after submitting a duplicate email in which the email address is set as ...
0
votes
1answer
30 views

AMPscript for adding the Order Number to an email subject

I am trying to add the order number to an email subject and I don't know-how. Plus I am really new to the AMPscript world. I want my email subject to be like: ''Your #OrderID is on the go'' for the ...
0
votes
0answers
19 views

CloudPagesURL(XXX) creates broken links due to multiple '?' in the URL [duplicate]

I was facing the following issue today: CloudPagesURL(XXX) used in an email sent with Journey Builder vs. contacts in a Data Extension creates syntactically broken URLs. That leads to the target Cloud ...
0
votes
0answers
33 views

AMPScript custom attribute row insert DE

I'm trying to insert data from one data extension, which contains an XML, into a new data extension. This XML contains order information and my script writes this into the target data extension based ...
0
votes
1answer
25 views

Details on JobContentBlock / Snapshotting

Recently i had to deal with a duplicate key error which was caused by a email activity inside a journey that somehow made me question a whole approach i have set up for templates and email across a ...
0
votes
1answer
32 views

Is this code correct for a Re-direct on Cloud Pages in Marketing Cloud [closed]

After form submission, if the person opted out, I want them to go to the Yahoo URL. Otherwise, I want them to go to Google. Do I have any extra <body> tags, should I take them out? </head> ...
0
votes
1answer
42 views

Trigger an Email notification to a internal user when customer clicks on a button in the email

My use case is: I have an email, which contains a button. When a customer clicks on a button in the email, an internal user should receive a notification of his data (Name, Email). I tried it with the ...
-3
votes
1answer
54 views

Force PDF Download from SFMC Email [closed]

Looking for the AMPScript that needs to be added to the header in order to have the document download only and not open in a browser window as using "download" in a href does not work. <a ...
0
votes
2answers
49 views

500 error with insertData on CloudPages

I am trying to create a survey landing page in cloudpages that will pull data into an existing data extension with AMPscript, but I am getting a 500 server error when the AMPscript is in. I am working ...
0
votes
1answer
38 views

Error when using button - link to other

For some reason I can't get a URL to open from a button. I'm using a code to pull through the a URL from a data extension, each email recipient will receive a unique URL. I can see that the code is ...
0
votes
1answer
32 views

Outputting Data on Data Extension Using Lookup and Output AmpScript Functions

I want to output some data and using 'Output' and 'Lookup' functions. If my DE fields looks like this: Name Data Type. Length. Primary Key. Nullable. Default Value FIRST NAME Text ...
0
votes
1answer
46 views

Cannot Retrieve Full String with RequestParameter

I have my AMPscript in CloudPage set as follow: set @customer_ID = _subscriberkey set @customer_Email = emailaddr set @campid = RequestParameter("cid") set @contactid = RequestParameter(&...
1
vote
1answer
91 views

UpsertDE not working in cloud page using ssjs

I have this code and I want to store the data of auth API into a data extension. I am able to successfully generate the result of API but not able to store that data in a data extension. You can see ...
0
votes
1answer
32 views

Lookup function for Synchronized DE

Good day, friends! I need to use Lookup function in my Landing page and get data from synchronized DE. But when I tried to do like this %%[ SET @firstName = Lookup("ENT.Contact_Salesforce",&...
0
votes
3answers
63 views

Getting Status “404 Not Found” while triggering Send via Postman

I am trying to trigger a Trigger Send with a simple payload using Postman, however the TS is not being sent. Note: No response body is generated, the only thing that it shows is "404 Not Found&...
0
votes
1answer
48 views

CloudpagesURL function does not work if UTM tracking code is added from SFMC

I am using the CloudpagesURL to populate a page with information in the DE of the email send. The clients BU has UTM tracking enabled which appends UTM tracking to all links on email send. When ...
0
votes
0answers
26 views

Ampscript in radio button [duplicate]

I want help in AMP script for below scenario: I am using this radio button but in my Data Extension the data is not going, although the data of other fields are going except this radio button. This is ...
0
votes
1answer
62 views

Amp Script to build trip recommendations

one of my clients is trying to build content block trip recommendations based on subscribers attributes and defined logic which looks at boolean fields. The trip recommendations data is held in a non ...
0
votes
1answer
58 views

AMPscript EMPTY OR NOT EMPTY

I have created an AMPscript code for an email where I generate a greeting depends on the variable but I want users who don't have the First Name field to display the Last Name and Salutation and those ...
0
votes
1answer
32 views

UpdateSingleSalesforceObject for custom object

Good day to everyone! I wonder is it possible to make UpdateSingleSalesforceObject of custom object, where Id is in the field with DataType Lookup(Contact)? Thank you in advance and have a nice day!
0
votes
1answer
53 views

Using the CC features of SFMC to populate CC recipients with AMPScript. Need AMPScript to pull in multiple emails separated by comma in one CC field

Need an email in a journey to go to an entire Plan Team. The Plan Team is listed in Sales Cloud so we are sync-ing the Plan roles from Sales Cloud into a DE via the SQL activities and then referencing ...
1
vote
1answer
26 views

Deleting contacts in data extension - Automation Studio

I was wondering if anyone has had any experience in using Automation Studio to delete contacts in a DE? Or, know of a better way? Essentially what I'm looking to do, is collect data using a Cloud Page ...
1
vote
1answer
54 views

Attempting to pass an AMpscript variable to a cloud page where variable has multiple values

In Marketing cloud - Content Builder I have an email with some AMPscript (including lookuprows ect) that gives me a particular number of rows in my email table depending on the data in a specific DE. ...
0
votes
2answers
63 views

How can you add AMPscript to an asset URL in Einstein Content Selection?

We use AMPscript to add our discount codes to our email URLs. We add something like this to the top of our emails: %%[ Var @campaign, @pcode Set @campaignID = "campaigncode" Set @pcode = &...
1
vote
1answer
44 views

How To Set A Default Value in an AMPscript subject line?

We are adding personalization to our subject lines in SFMC. This is currently the code we use to pull their first name into the subject line: %%[ set @billingFirstName = ProperCase([billingFirstName]) ...
0
votes
1answer
52 views

Can we have more than 1 condition in Exclusion script for triggered sends in marketing cloud?

I have setup a triggered send in marketing cloud and it has the following sendable DE.(example:) Email_address product_id timestamp test@gmail.com 3700 xxx I wish to add an exclusion script to this ...
0
votes
1answer
26 views

Can we have more than 1 Sendlog DE for one of the triggered send email only?

We have a SendLog DE to which the data gets logged for all of the emails (triggered + user initiated). But I wish to create another sendlog DE only for one of the triggered send. Is it possible to ...
1
vote
1answer
28 views

How to find email address available or not in the multiple data extension journey builder exclusion script

How to check in exclusion script if the Email address is in the multiple data extension should be send the email else do not send the email in journey builder email summery. IF(AND(EmailAddress IS IN ...
0
votes
0answers
37 views

Getting the SSJS value from a for loop and assign it a ampscript variable

I have a requirement, I need to encrypt a data field value from the behavioral trigger Abandoned cart and after extracting the JSON body, I have to use the product information in the email template. ...
0
votes
1answer
27 views

Data Extension Caching - Ampscript personalisation storing test email addresses

Using AMPscript in one on my email campaigns, I'm pulling data together (from a DE) based on if a family/ single person share the same Policy Number. I then pull their SubscriberKey (ID), Relationship ...
0
votes
2answers
43 views

Combining multiple rows of data into one email - Marketing Cloud

I'm having an issue trying to combine multiple rows into an email. As an example, I want to take the below data (Policy Data) and combine data where the policy number is the same and display that ...
1
vote
0answers
14 views

Syndicate email studio content [closed]

I'm trying to create a microsite that uses dynamic content created in the content builder to display. If you imagine I have 12 posts, 4 on topic x, 4 on topic y, 4 on topic z+y, I would like to be ...
0
votes
1answer
35 views

Transactional journey href url is not working with CloudPagesURL

Hello I am having problems to understand why this might not work in HTML based (not built from blocks) transactional journey email triggered via API. All variables are pulling through <a href="...
0
votes
1answer
33 views

How to get “week commencing” with AMPscript based on a given date

Hope you're having a great day! I'm referencing a specific date DD/MM/YYYY (New Zealand date format) provided from Sales Cloud as part of an automated email journey for contacts experiencing product ...
0
votes
1answer
33 views

LookupRows() giving Error - 500

I am trying to insert new email address and Zipcode in my DE which doesnt already exist. . I am using lookuprows() on emailaddress field, but while publishing I am getting "500 - Internal server ...
0
votes
1answer
27 views

How to delete bulk subscribers from All Subscribers List based on a criteria? [closed]

I want to delete bulk subscribers from All Subscribers List based on a criteria by using either Automation and Query activity or by using Ampscript...What would be the best way out ?
0
votes
1answer
42 views

Trouble with Lookup functions in AMPscript

Hope you're well and having a great day! I'm working through a communication to our contacts that are experiencing shipping delays due to supply chain issues with our supplier. Though we're pulling ...
0
votes
1answer
40 views

AMPScript loop to concat only non empty fields in a row

I am trying to concat all the non empty field values from a row in my DE, into a single variable (each value in the concatenated string separated by a comma). The field names are: FIELD1, FIELD2 and ...
-1
votes
1answer
35 views

AMPscript loop is showing incorrect output

I am trying to create AMPscript to parse through an XML payload and output the correct status in each classification. However, currently, my code is outputting every status in every classification I ...
0
votes
2answers
54 views

pass multiple rows to data extension

I have a doozy scenario here. With some AMPscript help, using lookuporderedrows i have a cloud page with rows presented in a table. In this table there will be two input fields which i want passed to ...
0
votes
1answer
41 views

Why does my AMPscript only loop once?

I am trying to display multiple results using this loop. However, it will only loop through the first set of results from the XML. AMPscript: %%[ VAR @ShipmentsReleasedRows SET @ShipmentsReleasedRows ...
0
votes
0answers
54 views

Jquery and AMPScript passing values

Ok i am starting to think Jquery and AMPscript do not go with each other on the same page. I have an email with a button and i am passing a few url parameters to a Cloud page. I RequestParameter to ...
0
votes
0answers
37 views

Export email metadata and reimport in Marketing Cloud

I need to make duplicate copies of a email with some minor changes in it. I was thinking if there's a way I can export the metadata of that email, make the necessary changes and Post it back in MC to ...
0
votes
1answer
54 views

unsubscribe page in SFMC localized in different languages [closed]

I have a New CloudPage created and hosted for Unsubscribe Action working fine in SFMC. Which is in English and it’s working fine. https://pub.s7.exacttarget.com/bp23vb4qfcv but now I wanted to develop ...

1
2 3 4 5
55