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

Use Dynamic content

I have a master DE with all interest, permissions etc. This is also an attribute group. I want to use a field in this master DE as a value for dynamic content.   I use a different DE to send the email ...
0
votes
1answer
14 views

Unable to Remove Duplicate records in Query Activity

I'm using the below query to fetch only the unique "emailid" field value but still I'm getting duplicates SELECT Distinct Emailid , EmailName FROM _job a WHERE a.SuppressTracking=0 and a....
0
votes
2answers
27 views

Creating DE or Audience based on email link clicks?

I have a requirement. Whenever someone clicks a link in an email sent, an audience or a Data Extension needs to be created.Is this possible using Automation Studio? If not is there a specific ...
0
votes
1answer
37 views

Insert form fields in a data extension with AMP Script

I'm very new to AMP script and I'm having trouble setting up an HTML form in cloud pages that can pull all the record information in a DE. I also then want to use the DE to trigger an email. The form ...
1
vote
1answer
21 views

Creating ampscript loop that will only show rows of data that contain a certain value

I have an xml field in a DE that contains order product data. I only want to show the products from that order that have an xml value ofclothing. Is there a way to write a loop to cycle through these ...
1
vote
0answers
48 views

Post custom HANDLER URL reCAPTCHA

I am trying to implement reCAPTCHA validation via Marketing Cloud - cloud page. I have used this guide to do that: https://ampscript.xyz/how-tos/how-to-implement-google-recaptcha-on-marketing-cloud-...
0
votes
2answers
44 views

I am trying to update a field of a data extension via SSJS within a script in automation but it does not update me

Platform.Load("core","1"); var subs = DataExtension.Init('cambio_estado'); var data = subs.Rows.Retrieve(); try {for (var i = 0 ; i < data.length ; i ++) { var ...
0
votes
0answers
21 views

how to update a status field from active to unsubscribed from a in javascript data extension [closed]

I have an automation that makes a query sql to select the subscribers who are active to a list of publication and I must disable them every day, I thought through javascript make a simple code that ...
0
votes
2answers
37 views

Unable to display 0 value in the output

I'm displaying the record count of a DE Column, %%[ VAR @rows, @row, @rowCount, @ID SET @Lookup = "Yes" SET @rows = LookupRows("Job","Lookup", @Lookup) SET @rowCount = ...
0
votes
0answers
25 views

How to AES encrypt a link within Marketing Cloud and decrypt it in a third Party system [duplicate]

I currently have the following problem: I am working in a Marketing Cloud Email and need some of my customers attributes to be stored in a Json and then to be aes-256 encrypted. The resulting string ...
0
votes
1answer
34 views

AMPscript loop function Question

Thanks for taking your time to review my question. We have a complex situation that we need to use ampscript to display different content based on the webinar attendance. The data is stored in Three ...
0
votes
1answer
29 views

HTTPGET function call to intranet api on landing page is giving remote name could not be resolved

I am using HTTPGET function call to my organization intranet api on landing page to get current logged in user details. When i am running the script on landing page it is giving remote name could not ...
0
votes
0answers
60 views

Update AMPScript functions not working in LINE message

Using journey builder we send both LINE and EMAIL communications on the same journey. Each contact key has more than one record and we need to send communication to all the records based on unique ...
0
votes
1answer
31 views

Smart capture - prefill form on external web page

Is it possible to create a smart capture form using cloudpages, prefill the fields in the same form (using process like outlined in the link below), and then embed the form on an external web page (...
0
votes
2answers
43 views

AMPScript IF statement or Loop?

I am hoping to get some help from you guys. We have a Scenario that we wan to send different content to people who attended our Web_Event. In this case, we have Event A, Event B, and Event C. For some ...
0
votes
2answers
49 views

Modified date of Records in Data extension using SSJS

I want to fetch the date when a data extension record was modified . I want to exclude all the records modified in last 15 days or DE itself if any of its record has been modified in last 15 days. I ...
0
votes
1answer
42 views

SSJS is not printing variable value in cloudpage

I am trying to print the value of a SSJS variable in cloud page so that i can use it in my HTML to display over cloud page . but page keeps loading without any output. <body> <script runat=&...
0
votes
1answer
31 views

Using if, elseif statement from LookupOrderedRow

I am having an issue with the script below. I need to get the VAR @topic to read the Topic_Name entry in the DE. If I use lookuprow function and select the DE, it works but if I use LookupOrderedRows ...
0
votes
1answer
30 views

How to retrieve random DE rows without matching criteria using AMP script?

I have a situation where we want to assign a CouponCode to anyone who registers through our web form. I am using a landing page with AMP script to insert the form filled into DE(Data Extension), ...
0
votes
0answers
10 views

ampscript cloud page not perform result

I have one problem in a cloud pages, this cloud page is load after an other cloudpage is submited. I didn't have error 500 but my salecloud is not ubdated. Please, can you take a look in this ...
0
votes
0answers
21 views

track the replies into a Data extensions with 'Forward using Triggered Send'

i'm trying to track the replies into a DE so i've added the following into the email used by the triggered send but it's not adding records into the de, does anyone know what's wrong with this? %%[ ...
0
votes
1answer
23 views

statements if in ampscript within an html

good day I'm trying to activate or deactivate some checkboxes according to some specific rules, when I do it with only one checkbox it works perfectly <label class=""> <!--%%=v(@...
0
votes
0answers
25 views

LogUnsubEvent not working in AMPscript

code is as follows: SET @lue = CreateObject('ExecuteRequest') SetObjectProperty(@lue,'Name','LogUnsubEvent') SET @lue_prop = CreateObject("APIProperty") SetObjectProperty(@...
0
votes
1answer
42 views

Issue with passing value to data extension from the marketing cloud page

I have a use case as below, I'm sending an email from the email studio when the audience clicks on the email CTA button, it takes them to a cloud landing page then I want to send a user's value to ...
1
vote
1answer
31 views

Rendering different images based on OS (iOS/Android)

I am trying to implement the functionality of rendering different image based on the device's OS it is getting rendered on for eg: iOS, Android. I have written the below SSJS code in my Freeform block ...
0
votes
1answer
29 views

AMP script bar code: how to introduce email of the subscriber?

I have this code: <p> <img style='width: 400px; height: 200px' title=barcode border=0 hspace=0 alt=barcode src='%%=BarCodeURL('BBY01-397101069285','Code128Auto', 400, 200, 0)=%%' width=400 ...
2
votes
0answers
34 views

Marketing Cloud Barcodes

I've got the following code generating a barcode: %%[ set @BarcodeURL = BarCodeURL(@Barcode, "Code128Auto", 100, 50)]%% <p><img src="%%=v(@BarcodeURL)=%%"></p> ...
0
votes
0answers
34 views

Marketing Cloud Automations Failing - Transfer Activity - Eye Symbol

We started experiencing a group of automations failing. Automations that hadn't failed in the past but for some reason began to fail upon the file transfer activity. When I look at the file transfer ...
0
votes
1answer
17 views

Can you use CloudPagesUrl() with a Code Resource?

I'd like to provide wrapped links in my emails that direct my subscribers to a CloudPages Code Resource, rather than a conventional landing page. I need to pass personally identifiable data to the ...
1
vote
1answer
47 views

Can I save SSJS Variables in the Client?

I was wondering if I can save data from an SSJS function in the client to use in JS scripts that run on the client-side after page load. For example, get value from ampscript, then set that value as a ...
0
votes
1answer
31 views

Could AMPScript's RetrieveSalesforceObjects function used in SMS lead to performance issues with large sends?

We intend to use AMPScript's RetrieveSalesforceObjects to return Campaign Member ID from Service Cloud. SMS is sent within the journey and we expect some large numbers of contacts to enter this ...
0
votes
2answers
33 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
0answers
26 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
25 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
42 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
2answers
29 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
38 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
6 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
67 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
43 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
52 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
1answer
22 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
29 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
35 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
13 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
1answer
28 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
31 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
67 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
42 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
32 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 '...

1
2 3 4 5
48