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
7 views

Ampscript giving error when trying to display firstname lastname while Date_FX_Plan_Approved__c is null

I am trying to display firstname lastname of patient under one doctor if field Date_FX_Plan_Approved__c is null. first m trying to pass subscriberkey (Id) to @Idd which is in Acc DE, then do lookup on ...
0
votes
1answer
16 views

Page not responsive in MC

I built a customized landing page in MC but unfortunately, the page is not responsive on mobile. Can you please give me suggestions on what I should be looking for? Thanks! Attached my code here for ...
0
votes
0answers
23 views

SSJS In Custom Activity

We currently have a custom activity used to send SMS, we are wondering if anyone has had any success making Ampscript/SSJS accessible within a custom activity in Journey Builder. The idea here is that ...
0
votes
1answer
19 views

how to add additional parameters in “profile_center_url” link

We have a custom profile center link which Salesforce Support already configured. I just want to append additional parameter href="%%profile_center_url%%?s=&c=&l=&ee=t&e=%%=SHA256(...
0
votes
2answers
22 views

How to use ampscript to display content to specific data extension in an email?

I am struggling with ampscript. I am unable to use the built in dynamic content function to display the content in the email. The scenario: I have an email which I am going to send to my master data ...
1
vote
0answers
15 views

RetrieveSalesforceObjects(…) is not working with Phone data type

EDIT: Error received: {"message":"Call to retrieve records for salesforceobject Contact failed! Error in the application.\nAPI Fault: Salesforce.com Fault thrown.\n\tException Type:...
0
votes
0answers
13 views

SSJS replace function does not work?

Im trying to replace special character with null within SSJS. here is what i tried: <script runat="server"> Platform.Load("core","1.1.5"); var ...
0
votes
0answers
12 views

Lead is not updating with UpdateSingleSalesforceObject()

I have a custom HTML form on the cloud page whereupon submitting I am creating a lead in sales cloud using CreateSalesforceObject() function. Now that the Lead has completed the form, through the ...
1
vote
0answers
13 views

Accessing Journey Data (Salesforce Activity output) in Email

In JB I've used Object Activity to create a SF object. This activity produce a SF object ID as output, I can use this output in other shapes using: {{Interaction.SALESCLOUDACTIVITY-1....
0
votes
1answer
19 views

How to Populate a dropdown list with values into a DE using ampscript

How do I populate my form field that is a dropdown into my DE using AMPscript? Thank you for your help!! <div class="loc-container"> <span>Up to</span> ...
0
votes
1answer
36 views

Ampscript - Dynamic content from look up table not working

This is my first rodeo with Ampscript. :) I am trying to pull in the information from a look up table (HSIcontentMatrix) to the email template that has 4 offers. If it is a specific brand I would like ...
0
votes
1answer
35 views

Unable to send Email to Lead from Sales Cloud due to AMPScript error

We are trying to send email to a Lead from Sales Cloud, but our sends are getting failed. I believe the error is due to the AMPScript, but not sure what is the reason its failing. Can someone help on ...
0
votes
0answers
21 views

Triggered Sends Tracking - Queueing Report - Marketing Cloud [duplicate]

Is there a way to create an alert or report in Marketing Cloud, so that you're notified any time a triggered send queues over a certain amount or a certain time period, e.g. Welcome Emails has had 30 ...
0
votes
1answer
38 views

How to hide content block at SF market cloud email

I need to show images that returned from the other endpoint at market cloud email. Sometimes the endpoint can return 3 images, sometimes it return 1 image or no image. I tried to use image block to ...
1
vote
1answer
61 views

RequestParameter does not return the Data in CloudPage (Solved)

I'm trying to insert a RequestParameter to upsert a Data Extension trough CloudPage after a e-mail activity: The SubscriberKey is passing, but the INPUT files not. I think could be a relationship with ...
0
votes
1answer
34 views

Not able to Save the HTTPPOST2 response in the data extension

I have made a HTTPPOST2 API call and got the JSON response. I want to insert the JJSON response into Data Extension. Below is the JSON response : { "success": true, "...
0
votes
1answer
24 views

Invalid Data Extension Key Field Reference

I have just started learning email studio and I need help. I am writing personilized email. I have two DE: Contacts and Opportunities. Trying to get data from DE Opportunities I use this code: %%[ var ...
1
vote
1answer
15 views

Modifying a Dynamic Date Range by Month with AMPScript in Email

this might be helpful for some, but I also feel like it might be able to be improved upon or simplified. I have a recurring email campaign once a month that offers a new promotion for the course of ...
0
votes
1answer
29 views

RegExMatch doesn't seem to be working correctly

I am trying to strip anything including angle brackets out from a string of text via Regular Expressions. I have the below variable set: set @messageText = 'Hello, Chris John,<br><br>John ...
0
votes
1answer
32 views

Continuous Pull in Ampscript, GTL, or SSJS from a JSON file

I am trying to find the best method in a Marketing Cloud email to continuously pull data from a JSON file that updates every 5 seconds so that it is "Live" Data within the email. Currently I ...
0
votes
1answer
28 views

Changing the Lead OwnerId upon clicking on a confirmation email link after submitting a cloud page form

I have a custom HTML form on the cloud page whereupon submitting I am creating a lead in sales cloud using CreateSalesforceObject() function. Now I want that After the Lead has completed the form they ...
0
votes
1answer
29 views

Can we update SF Object from Marketing Cloud child BU having only Parent BU Integrated with SF

I am working on a use case where I need to update an Object in SF from Marketing Cloud Journey or AMP script from child BU. But the Marketing Cloud connect is Integrated with Enterprise Business Unit (...
0
votes
0answers
21 views

Text format change with AMPscript

i have the below Ampscript to show the date as 'sent date' plus 14 days. The code works but when it renders into the email it kills the Arial (15) font and looks different to the rest of the email. ...
0
votes
1answer
31 views

Ampscript help needed for Custom Subscription Center

I am using the below script in subscription center... Every time when I unselect all categories/checkboxes such as news_u, trans_u, prom_u and cust_u the page takes me to the 107 instead of 220. I am ...
1
vote
1answer
32 views

Adding commas to text depending on variables in AMPscript?

This is my first post and I'm a newbie when it comes to anything code-related let alone AMPscript so any and all help would be very much appreciated. Thank you in advance! I'm using AMPscript in the ...
0
votes
1answer
25 views

How to use the checkbox value on a marketing cloud html form for creating lead in salesforce

I have created an Html form on my marketing cloud landing page and I am creating a lead on the form submission using CreateSalesforceObject() function. All the form fields are being captured well ...
0
votes
0answers
22 views

Is it possible to implement real time execution of any content within Marketing Cloud email after the email is triggered? [duplicate]

There is a scenario where I need to display Date, Hours and Minutes left for the subscriber's subscription to end. I am able to implement this using Ampscript in my email and also mail is triggered ...
0
votes
0answers
13 views

Does update journey data work in a running journey?

I have an automated data extension by a SQL query. My journey has been running, and I currently overwriting the data. The first question, I am not sure what I am doing wrong but since I started using ...
0
votes
1answer
22 views

RaiseError(…) is not cancelling out of my current triggered send

I have a triggered send by way of a Transactional API email (Journey Builder > Create Transactional Email). The email's body looks like: %%[ if indexOf([Template Body], "You have an ...
-1
votes
1answer
28 views

how to create a salesforce object on a marketing cloud smart capture form submission [closed]

I have a landing page with a smart capture form on it. Upon the form submission, the smart capture simply sends the details into specific data Extention. Now, is it possible to create a 'Lead' object ...
1
vote
1answer
36 views

Counting DE records based on a specific field

Can we check DE count based on specific field in same DE? For Example : If Date= today() If DE_Count > 1 set @Subject= "hello" else set @...
1
vote
0answers
26 views

Can I upload a file to Salesforce CRM using AMPScript from a server side Cloud Page?

We want to make a form using Clod Page that will allow the users to upload an excel. Then we want to upload that excel to our Salesforce CRM. I found a few ways to send the file to MC server-side page ...
0
votes
0answers
16 views

Can we pull HTML from out site and put it into a Data Extension for ampscript in an email

I am trying to pull HTML with images, links, etc from another source (our website) and get that into a Data Extension with 1 text field. Then using ampscript I'd want to display that HTML script into ...
0
votes
0answers
23 views

Get Content Name via AMPscript

I'm trying to dynamically append the content name into a URL string parameter (utm_content) for all inbound links in our emails. The catch here is that some of our content blocks are built ...
0
votes
1answer
18 views

How to pass Json value to Ampscript variable so I can call this ampscript at any component of the email template

Im new to Ampscript, maybe here is the place I can get help. My objects are: get Json with Ampscript after calling an endpoint; parse the Json with Ampscript(or combined with SSJS) to save the values ...
0
votes
1answer
17 views

How can I escape the the double quoted xml in AMPscript

After I use http call to get xml from an endpoint, i got this xml; "<root><listing bedrooms="3" bathrooms="2.0" /><listing bedrooms="" bathrooms="...
0
votes
0answers
28 views

Journey Builder - use API responses as pre-email/sms activity step checks within a Marketing Cloud journey

We're looking to implement an APP acquisition campaign, where we send the customer an initial email, followed by reminder interactions depending on how they interacted with the initial email (...
0
votes
1answer
34 views

Add ReCaptcha to SmartCapture Form in Cloud Pages

We are trying to implement Google Recaptcha v2 into our Smart Capture form within a Cloud Page. Here's what we've done so far: Created a Data Extension Created Cloud Pages Collection Added Cloud ...
0
votes
0answers
30 views

Locale / UTC offset on Marketing cloud sends to DEs

We have contacts subscribed to classes in different time zones. They should receive an email 1 hour prior to class start. We thought of storing all class times in UTC-6:00, since Automation Studio ...
0
votes
1answer
19 views

HTML template to never change but to reference new row in lookup table

Trying to figure it out a way to code a template that will be populated from a lookup table which will be updated every week with a new row. Typically I would have an unique identifier in both HTML ...
0
votes
1answer
20 views

For loop causing 500 error in AmpScript

I am using a for loop to print out some records from a data extension but it always brings back a 500 error on my CloudPage where it is hosted. I've simplified the code and wrapped in SSJS to try and ...
0
votes
1answer
49 views

Dynamic Preheader with AMPscript

So this is essentially the same question as AMPscript Variables in Preheader. However, when I follow the individual's steps, I'm still not able to populate the dynamic preheader. In fact, now I can't ...
0
votes
1answer
31 views

SSJS to Publish values in Email from DE

I am using below code in email to select all rows from non sendable DE and print them in email. <script runat="server"> Platform.Load("Core","1"); try { //initiate ...
0
votes
0answers
23 views

creating a salesforce lead on smart capture submission

I have a Cloud Page with a Smart Capture form. The Smart capture form works as intended and stores the information into a specific Data Extension. In addition to that, I would like to capture the POST ...
0
votes
2answers
38 views

Marketing Cloud - Email Send Snapshot (point in time)

I want to be able to keep track of point-in-time email send snapshot for every subscriber. So if a subscriber has received multiple version of an email over a period of time, I would like to be able ...
0
votes
1answer
27 views

How to display the Data extension records on the landing page for upsert the data using AMPscript? [closed]

How to display the data extension record on the landing page to upsert the record. I created a record in the data extension through the landing page using the InsertDE function. But i am unable to ...
0
votes
1answer
15 views

Override Account Setting Footer for some email messages - Marketing Cloud

We have setup a HTML footer in Account Settings in Marketing Cloud. For some emails, we want to use a custom footer and override the Account Settings footer. When I create an email message using an ...
0
votes
1answer
14 views

SFMC AMPScript formatting issue

I am hiding text in my marketing cloud email based on if the subscriber is in CO. Now the code below works and I can fire off a preview and test that it's working. The issue is when I save the block, ...
0
votes
0answers
32 views

How to change Marketing Cloud Http Request timeout?

Is there a way to change MC Http Request timeout? I think that the default is 30 seconds, but the process we are POSTing to via a form can take more. I'm using SSJS for the call: var result = HTTP....
0
votes
1answer
40 views

Updating Publication List from DE using SSJS

I am not an expert in SSJS. But after going through various posts I come up with the below code. I trying to create code in which I am reading data from DE and adding subscribers into Publication List....

1
2 3 4 5
50