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
1answer
9 views

LookUP, LookUpRows: Which conditions can i set?

This question is rather arbitrary and should just create a bare minimum usecase that is simple to understand. Sample Raw Data (arbitrary) lets call it SubscriberState +---------------+-------------+ | ...
0
votes
1answer
16 views

Need help with .ics file creation based on DataExtension field in Salesforce Marketing Cloud

I have a field in Data Extension called as "Appointment_Date_Time" this gives information about individual person appointment date and time, I want to create .ics file based on this DE ...
0
votes
0answers
21 views

CloudPage: CampaignMember creation not working

I have a CloudPage that contains a simple form. I ask for an email address, and upon submit, the page first checks in Salesforce if a (Person)Account exists. If not, it creates one, if so, then it ...
1
vote
1answer
22 views

How to use Field(Row(BuildRowSetFromXML()) to only target a field with a specific “attribute-id”?

My XML <custom-attributes> <custom-attribute attribute-id="notNeededField">Value1</custom-attribute> <custom-attribute attribute-id="neededField">Value2&...
0
votes
2answers
30 views

how to update status active or Unsubcribed of subscriber in _ListSubscribers

I'm trying to do it this way, but I'm getting 500 error %%[ var @SubscriberKey, @ListID, @ListType set @SubscriberKey = "example" set @ListID= 123 SET @ListType= "Publication List&...
0
votes
1answer
18 views

Master Detail object creation using AMPScript

Hello I wanted to know if there is a possibility of using "CreateSalesforceObject" function to create record on a master-detail relation object. We have a detail on Account object and we are ...
0
votes
1answer
34 views

Impossible to publish a landing page in Marketing Cloud which updates Salesforce object record inside a loop

I am trying to create a landing page in cloud page to be reached by a link in an email previously sent by a Marketing cloud Journey. The pages I built must: Get the email address from the email with ...
0
votes
1answer
5 views

Ampscript use case for multiple value [closed]

I have DE Field name "xyz" value "ABC,DEF" . I need to pullin to my email as ABC separately and DEF separately. Please suggest how write ampscript for this
1
vote
3answers
57 views

Customize send time according to timezone

How we can send one single email to multiple customers based on their timezone. Let's suppose we have 10 US customers and as we have different timezones in every state. We have to customise email in ...
1
vote
1answer
40 views

How to debug AMPscript in Marketing Cloud - Email content

I encountered an AMPscript syntax error and the system implied me something didn't relate to the error. I wonder if there was another way to debug in MC. %%[ var @greeting set @greeting = &...
0
votes
4answers
48 views

Ampscript to render First name from Full name not showing when there's only one Name (one word)

I have a DE which has Full names in it. I wanted to extract the first name from it, so I wrote the following ampscript: %%[ var @fullName var @firstName set @fullName = AttributeValue("...
0
votes
0answers
23 views

Pass variables from PushMessage to a CloudPage - Niche area in MC?

I'm facing some difficulties in understanding the limitations and seeing very little documentation on how to build personalization on the CloudPage to retrieve data being actioned by a message from ...
0
votes
1answer
18 views

Dynamic content for product price

I've written an AMPscript for showing up to 4 items in an abandoned cart email. The script works fine but I still have an issue. The text email should show the standard price AND the special price ...
0
votes
1answer
28 views

Customer NPS surveys

I want to setup an NPS survey for customers within Marketing cloud. At a high level, below is how i am thinking I would set up. Build email in Marketing cloud with NPS rating --> values submitted ...
0
votes
1answer
24 views

Show/hide Smart Capture form based on AMPScript variable

I have a cloudpage containing a Smart Capture form that submits to a data extension. I am using Smart Capture because a submission then instantly triggers a journey entry. The idea is that a ...
0
votes
0answers
12 views

¿how do i update a subscriber's attributes with the values i already have in some variables in ampscript?

how to update a subscriber attributes with the values I already have in some variables in ampscript %%[ var @x set @x=1 /* Crear el objeto del subscriptor */ set @subscriber = CreateObject( "...
0
votes
0answers
21 views

To update the fields of _EnterpriseAttributes of a specific user by the subscriberkey, what function can I use? [closed]

how you could update the fields in _EnterpriseAttributes for a specific user by the subscription key in AMPSCRIPT
0
votes
1answer
27 views

ClaimRow function - dynamic Coupon Data Extension Name

On the community I have found some information about how to work around the limitation of "hard coded" data extension name in the ClaimRow function. As reminder, when claiming a row, the ...
0
votes
1answer
26 views

Marketing Cloud Attribute Value

Having trouble understanding AttributeValue and have few questions: Is this like system attributes? Different to the Attribute and Attribute Groups you set in Contact Builder? i.e. Adding new ...
3
votes
1answer
65 views

deseo poder recuperar y actualizar los campos de _EnterpriseAttributes de un suscriptor en AMPSCRIPT, ya que no conozco mas lenguajes

(Title Translation via Google Translate: I want to be able to retrieve and update _EnterpriseAttributes fields from a subscriber) deseo poder recuperar y actualizar los campos de _EnterpriseAttributes ...
0
votes
1answer
34 views

Is it possible to execute ampscript or ssjs onchange via checkbox check/uncheck

As I wrote in the question title I was just wondering if a block of ampscript & ssjs combined code can be execute on change via checkbox check/uncheck? <input name="TopicID" type=&...
0
votes
1answer
28 views

Can't Save Exclusion Script on Triggered Send

I'm attempting to input the following exclusion script on a triggered send in Marketing Cloud. However, whenever I attempt to do so, the exclusion script will not save. I'll click 'Save' and then '...
0
votes
1answer
32 views

How to populate rows of a DE in email body [closed]

I am trying to populate DE row's in email body . Ex , First Name , Last name and Email address from a DE to the email content . I would like to have it populated through a script as with standard ...
0
votes
3answers
30 views

AMPscript dynamic content with multiple options

Trying to build out a piece of dynamic content where a different bit of copy will display depending on a users loyalty points. With one variable the following works: %%[Var @Loyalty Set @Loyalty = [...
0
votes
2answers
42 views

Cloud Pages - API request inside of an IF statement

I'm using the following code in a Cloud Page to submit an HTTP Post request. I was able to get the Script.Util.HttpRequest() methods to work on their own. But now I want to only submit the request if ...
0
votes
1answer
27 views

ClaimRow function not working when using twice in the same Email Send

I am using regularly the ClaimRow() function in many of my sends for assigning coupons to my subscribers. As I have to be able to assign more than one coupon to my subscribers from different sends, I ...
0
votes
2answers
40 views

Ampscript SSJS Error Internal Server Error

I created a ampscript to embedded into cloud page to update the object in Salesforce. Here is my Cloudpage landingpage: <!doctype html> <script language="javascript" runat="...
0
votes
0answers
27 views

How to get html form input hidden value which is rendered from Javascript on click function to lookup DE and pre populate form selections

I have a cloud page A that has Javascript and another cloud page B which has HTML, AMPscript and the cloud page A is called in cloud page B as src (<script src ="%%=Cloud Page B's URL=%%"&...
0
votes
1answer
39 views

One-to-many insert/upsert from landing to separate DE's

I'm bulding a preference center and having trouble with writing into two separate DE's. We have two DE's: Newsletter_Subscribers (EmailAddress, FirstName, LastName, OptIn, Country, IPAddress, ...
0
votes
0answers
27 views

SFMC AMPScript Lookups in Multi Org Child Business Unit

Trying to use AMPScript to do a lookup in an email to populate various data. I'm using the synced data extension name, which because I'm using a multi org connector I'm getting this error message. The ...
0
votes
1answer
41 views

IF ELSE Statement in AMPScript

I have problem with IF/ELSE statement in Ampscript ,as it is not going through else statement I have created a DE for couponcode Claim coupon DE details(CouponCodeRedeem) CouponCode - CouponCode ...
0
votes
0answers
20 views

AMPScript - HTML Formatting for Dynamic Table (Issues with Outlook 2013, 2016 Windows 7 and 2019)

I have an email where I need to display tiles dynamically based on conditions. Maximum 8 tiles need to be shown with maximum 2 tiles in 1 row. I have created only 2 tables for the tiles and have ...
1
vote
1answer
51 views

Read all request headers on CloudPage server side without knowing their names

I need to store whole HTTP request made to a CloudPage for audit purposes. I'm able to log everything besides headers. I'm unable to read all of them with ampscript or SSJS without knowing their names ...
0
votes
1answer
33 views

Are rows in AMPscript the same as Arrays in JavaScript?

newbie to AMPscript and code in general. Currently learning JS. If an Array is a variable that can hold multiple values at a time is that the same as a row in a DE/AMPscript? E.g Contacts can include ...
0
votes
1answer
39 views

Set value based on Checkbox being True or False using AMPscript

I am trying to display a value of "Yes" or "No" depending on if a checkbox is checked. If checked, I want to display "Yes" if not, display "No". I have tried a ...
0
votes
1answer
42 views

using AMPscript variable instead of the target Data Extension's name in Guide Template Language dataobject type list

I am building an email in Content Builder that will show GTL variables but I want to set an AMPscript variable to the target Data Extension’s name. I find that I can use AMPscript variables in the GTL ...
0
votes
1answer
25 views

Passing value from one DE to another upon send

Below is the DE i am sending to. Its called Power_NovaMep Below is the Target DE called SendLog I want the value of Ref_no from the Power_NovaMep DE go to the Send_Ref column in the SendLog DE when ...
0
votes
0answers
10 views

Pulling variables from multiple rows for a unique user ID via AMPscript

I'm trying to display dynamic content in an email for users who completed modules on the client's website. For each module completed, there is a Badge_ID that is added to the data extension "...
0
votes
0answers
22 views

Fetch failed loading: POST

I am building a form on a Landing page, and I keep running into an error when I'm passing the javascript to the processing page. In the error console, I see the following: Fetch failed loading: POST &...
0
votes
0answers
14 views

Suggestion please, How to include test data extension while sending from journey

I'm looking out for your suggestion or concept to work on this task. Is it possible to include contacts of specified data extension to target data extension using AMPscript and send them emails to ...
0
votes
1answer
29 views

Column is shifted to right in case of odd number of tables

I have 2 tables to be rendered in my email based on conditions and loops. In case of even number of tables, everything is properly fine. However, in case of odd number of tables, the 1st table in the ...
0
votes
0answers
24 views

Using Ampscript I am trying to capture two different parameters fro two different links in the same code

I have two links out of which one has account Id of salesforce and one has Sent email id of salesforce. Now the requirement goes like based on the the Ids i should be able to capture the Email address ...
0
votes
0answers
19 views

Get SMS template name using ampscript

Is it possible to get the mobile connect SMS template name using ampscript? I cannot seem to find any article that has this use case though I found something for email using the Email data strings. I ...
0
votes
0answers
13 views

How to redirect Smart Capture Form Submit depending on radio button selection

I have a form in CloudPage with a question based on radio buttons, the possible answers are YES and NO. I need to show a message based on the VALUE (YES or NO) selected by the customer. How can I ...
0
votes
2answers
32 views

Ampscript-Populate first Thursday of month in email marketing cloud

We need to populate first Thursday of month using Ampscript in email. Ex:"Thrusday,july2,2020" But my below code is not working. Pleasesuggest what went wrong here. I am not aware of ...
0
votes
0answers
23 views

If statement showing true despite the condition not being met

I am trying to see if a chosen date is between two other dates. My If/Else statement however is always showing true and displaying "Current date is before week27" despite the condition not ...
0
votes
1answer
30 views

Personalisation String in Inline If statement

Does Inline If not work for personalisation strings? I have the following code: http://www.website.com?utm_source=sfmc&utm_medium=%%=IIF(NOT EMPTY(%%Variable1%%), %%Variable1%%, "")=%% Does ...
0
votes
0answers
21 views

Marketing Cloud Ampscript to output latest data within time period issue

I have the below AMPScript that isn't quite right. What i want it to do is output data form a data extension that was added to the Data Extension within the last 24 hrs. I want to add the code to an ...
0
votes
0answers
23 views

Get Journey ID of SMS send using ampscript

I need to get the journey ID from SMS send so I created a code that should get the SendJobId set @jobid = AttributeValue('SendJobID') However I cannot retrieve any values. I was hoping to get the ...
0
votes
1answer
32 views

Show/Hide email content based on Data extension attributes

I have 2 pieces of text content I would like to make 'Dynamic' in Salesforce Marketing cloud content builder. 1) CUSTID: I currently have a data extension column called 'CUSTID', and in the email I ...

1
2 3 4 5
47