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

Not so public cloud pages in Marketing Cloud

I am building a cloudpage but want to restrict it to be visible only within my company network. I have a solution and it is working. I created a DE with the list of accepted IP ranges and used SSJS ...
0
votes
1answer
27 views

Conditionally include coupons in emails

I have created an email with SFMK with coupons. This is: %%[ var @couponRow, @couponCode , set @email = AttributeValue("Email Address") set @FirstName = AttributeValue("First Name&...
0
votes
1answer
17 views

Retrieve data extension from different bussines unit using AMPScript

I have 2 business units. In one of them there is a landing-page and on another data extension. Can I retrieve data from data extension on my page? Standard function like Lookup Row() doesn't work.
0
votes
0answers
28 views

AMPScript Error: “Row is null or empty”

I'm getting the following error detail from my email: Invalid row (parameter 1) passed to Field function. Row is null or empty. Function: field(@customerReferralData, 'voucher_code') Here's the ...
0
votes
1answer
15 views

UpdateDE row with 'Is_Processed' from a batch 'notification-style' email

I have a journey which includes a response capture element via Interactive Forms and a bespoke CloudPages landing page. There's a daily extract automation to pull all responses within the last 24hrs ...
0
votes
0answers
19 views

How to add subscribers to multiple different publication lists using automation

I am trying to add all the subscribers coming from a cloud page to 5 different publication lists. The subscribers data is being recorded in a data extension and want to use it to add to the 5 ...
0
votes
0answers
19 views

Synchronised Data Extension

In SFMC I am currently trying to use data from a Synchronized data extension using ampscript. I have added the ENT. in front of its name. However, when I am trying to test it, I get the error message ...
0
votes
1answer
18 views

Ampscript not displaying field because of '<' character?

I've set up a rowset and I'm defining a field, all the other fields are rendering fine, except one field and I suspect it is because the values start with '<' and end with '>'. The value of this ...
0
votes
2answers
35 views

Dynamic URLs AMP script

We are already using AMP to create dynamic URL. We are also doing A/B tests and I want to add the variant of a contentblock into the dynamic URL. Below you see the current AMP we're using to create ...
0
votes
1answer
33 views

How to make a count to show a dynamic block

In SFMC we need to show a block after the customers 4th purchase. This means when the customer have bought: 4, 8, 12 and so on. I know I could use a dynamic content block and then you add the numbers ...
0
votes
1answer
18 views

Capture Interactive Form Submission DateTime

I'm looking at implementing an interactive form as part of a campaign and would like to run a daily response extract via an extract file automation. Before extracting the users, I wanted to check if ...
0
votes
0answers
10 views

Use string as variable name in AMPScript

I have the following problem with Salesforce' AMPScript in Marketing Cloud: I have two variables, I want to combine a string and one of these variables to get the value of the other variable. I have ...
0
votes
0answers
15 views

how to redirect to a Marketing cloud profile center by making a custom link

I want to create a cloud page which needs to be hosted in the Wordpress, the cloud page will take their input as email and when clicked on the submit button it should redirect to their Marketing cloud ...
0
votes
1answer
36 views

How to fetch values using AMPScript from different data extensions?

I have a question regarding AMPScript. My Data Extensions are attached in the link at end of this question(For reference). I want to send personalised email adding product name. %%[ var @productname ...
0
votes
1answer
21 views

Retrieve status of automations of all child BUs from enterprise BU

Below is the code which I tried, but when the automation is erroring out the status is populating as paused, scheduled, stopped. The error status is not population. Code: <style> body, a, ...
0
votes
1answer
13 views

Preheader not visible in inbox

i need technical support. I inserted the preheader in the ampscript and I inserted %% = v (@Preheader) = %% in the bar with the lightning bolt. When I do the preview in "Preview and Test" ...
1
vote
1answer
25 views

How do I get SMS Shortlink API response to be a link and not a payload?

I am using the code below (just using stack exchange link for example): %%[ var @Id, @shortenUrl, @cuttlyUrl, @link, @linkName set @startDate = "2021-01-01 6:45 AM" set @endDate ...
0
votes
0answers
25 views

Subscriber UnScubscribed From Parent Business Unit

I have developed a custom ampscript in a cloud page for unsubscribing the subscriber from the Business unit only and the BU settings in the admin are also made it to unsubscribe from the BU specific ...
0
votes
1answer
36 views

User is not unsubscribing when having + in the email

Facing an issue, I noticed some cases where users are unable to unsubscribe if they have a + symbol in the email address. Example - abc+cd@gmail.com Does anyone have the same issue before? any idea ...
0
votes
1answer
44 views

Send data from one CloudPage to Another

I have a cloudpage that register some customer infos(Fname, Lname, Id...), and theses info needs to be transferred to another CloudPage in order to display the correct Content for that Customer, I'm ...
0
votes
0answers
30 views

Using ELSEIF Logic with SuccessfullyPostForm

I have a CloudPage with 2 URLs that contain unique SuccessfullyPostForm Values. My AMPscript works and I am able to publish the CloudPage UNTIL I try and add in the IF/ElSE Logic to handle the ...
1
vote
1answer
26 views

Dynamic Variables in Ampscript

Ideal state, show a calculation of field "@ytd_savings_per_participant" divided by 3 as %%=v(@Lattes)=%% within a dynamic message. The message is based as well on the field "@...
1
vote
1answer
48 views

AMPScript - Dynamically setting variable names inside a for loop

I am currently aware of the following resources: AMPScript For Loop Dynamic Variable https://gortonington.com/dynamically-creating-variables-in-ampscript/ I have a repeating code block that I want ...
1
vote
0answers
52 views

Using lookup function after updating DE returns old value

I've encountered quite strange phenomena. When retrieving a field from a DE and then updating this field to some other value - the lookup which follows the update function returns the old value (...
0
votes
1answer
44 views

AMPscript - extract certain information from a payload to display it on the email

I'm developing an email with a specific bloc that will send a payload with speicifc infomration about a product : SKU, name, URL, Image_URL : Here is what i receive from the payload : {categories:...
-1
votes
2answers
41 views

Remove UTM parameters form %%profile_center_url%%

My footer in our emails include a link to %%profile_center_url%%. How do I remove the UTM parameters from this link only? See example code in our footers. To unsubscribe from emails like this one, ...
0
votes
1answer
44 views

Date format in Marketing Cloud email based on locale

I am looking to show the date in two different formats based on locale (the locale variable is set to LocaleCode earlier in the email). For en-US it should be January 1, 2021 and all other locales it ...
0
votes
0answers
35 views

Need help in getting notification for Paused triggered sends

<script runat=server> Platform.Load("Core","1.1.1"); var mid = 'myorgMid'; var dev = 0; var allTriggers = 1; var alertEmailAddress = 'myemailId'; var ...
0
votes
1answer
19 views

Change DoB format to 'yyyymmdd' in Marketing Cloud

I am trying to pull in DoB from a Data extension via ampscript and change the date format to be 'yyyymmdd' where am i going wrong? %%[var @DoB, SET @DoB = [Date_of_Birth__c] ]%% set @DoB = ...
0
votes
1answer
30 views

How to Dynamically Use Parameter in CloudPageUrl From DataExtention?

I have a email template from wher we have a custom link for a cloud page(Unsubscribe Page). We are using cloudpageUrl() function to open a cloud page and page value to it. It works fine when we just ...
0
votes
1answer
26 views

How to update Sales cloud Record for PersonAccount from CloudPage?

I have PersonAccounts enabled in the Sales cloud Org. We are using Subscriber Key as PersonContactId in Marketing cloud. We have a cloud page from which we need to update PersonAccount in Salescloud ...
1
vote
1answer
25 views

AMPscript variable name illegal character error

Please can someone help identify why I'm getting the error: A variable name is not a valid because contains illegal characters. Variable names must begin with the @ symbol followed by one or more ...
0
votes
1answer
42 views

Multiplying a value with Ampscipt

I'd like to multiply the quantity value I have stored in my DE by 1.25. The DE field is set to number. I've named the variable @Pens. I created another variable @PensCost to store the value of @Pens x ...
0
votes
1answer
24 views

How can I use Ampscript to replace a variable or string that occurs many times, with an incrementally increasing number?

We are using concatenated tracking tags, on our links. One of the values in the concatenation is a unique identifying number which needs to be manually replaced in each email that is sent. E.g. L01, ...
0
votes
1answer
55 views

How to find attribute name with the highest value from a Data Extension?

I have those attributes with number type in a DE and want to get the attribute name with the highest value from a record. This following code is what I'm trying to do that purpose, the code didn't get ...
1
vote
0answers
26 views

How can I use RegExMatch to minify CSS?

The use case is that I have created an email template in SFMC, and I am including the CSS via %%=ContentBlockByID('xxxxxx')=%% I would like to use RegEx to minify the CSS at the point which it is ...
0
votes
1answer
16 views

Can i show or hide content based on Sender Profile or Send Classification in business unit?

To marketing cloud developers Is there a way to show/hide content based on the orgs "Sender Profile" or "Send Classification" with AMPscript? The scenario is that I only want to ...
0
votes
1answer
40 views

AMP Script to display related text according to categories

I am trying to write an AMP script where I need to display Category types based on different Category's. The column may contain multiple categories, thus the output should be all category types ...
0
votes
1answer
22 views

Unsubscribe link being pulled from a DE is not working

I have a DE with multiple languages and in the unsubscribe field within the DE I have: Wenn du diese E-Mails nicht mehr bekommen möchtest, kannst du dich hier von dem Newsletter <a href="%%...
0
votes
0answers
21 views

send image from Mail tracking

i'm trying to send email with the picture from the ( mail tracking details). how can i convert the image from "EmailThumbnail" to html img tag src see ampscript code set @imageSource ...
0
votes
0answers
20 views

Import Crypto JS Libraires, Generate Encrypted one and update to DE [duplicate]

Use-case: After FB leads insert into DE, i have to do a encryption on the email address and update the DE to one of the field, I have to use base64encode, HMACSHA256. i am able to retiever records(...
0
votes
1answer
31 views

Interactive emoticons on cloud page - IF/ELSE IF statements

As seen in the below picture, if I select emoticon 2 (sad face) in an email, on the cloud page, it displays blue emoticons up until emoticon 2. But I want to write a code that says, if I select ...
0
votes
0answers
21 views

Inserting record to shared data extension using AMPScript

I am trying to insert new record from form handler page to the shared data extension using AMPScript. But I am getting some access issue while inserting new record. Issue: ExactTarget.OMM....
0
votes
1answer
24 views

Marketing Cloud interactive email to include a catch-all triggered send upon successful submission

We're rolling out a campaign with an interactive email trial included, inviting customer's who we've identified as having a non-communicating meter (we're a utility provider) the opportunity to submit ...
0
votes
2answers
78 views

How to create dateadd function in SSJS by calling dateadd in ampscript

I'm trying to create a dateAdd function in SSJS by calling the dateAdd function in Ampscript. The code below works. But I cannot figure out how to make the date argument dynamic. This means the ...
0
votes
1answer
39 views

How to retrieve content block in SSJS

I'm trying to retrieve a content block for a script in ssjs. I tried already several functions but it seems not working. The scope is with a script to retrieve a content from a content area and push ...
1
vote
0answers
45 views

Shortening URL with AMPscript (Bit.ly)

Hi i am trying to send values to the cloud page . my code is this: %%[ Set @caseId= [CaseID] set @lastremdate=[Last Reminder Date] Set @Subscriber_ID= [Subscriber_ID] Set @link = URLEncode(...
0
votes
0answers
53 views

Update sales cloud object field from cloud page landing page using ampscript

Step1:Code1 I am processing on click of a unsubscribe button with a checkbox. Step 2: Code 2 processing the list for unsubscribing using amp script. Step 3: Code 3 It is updating the object field in ...
0
votes
1answer
48 views

Unsubscribe matching email address in all subscribers using ampscript [closed]

Hi I'm new in ampscript and I have a requirement to unsubscribe all matching email address in all subscribers once they click the unsubscribe button. Is this possible using Ampscript? Thank you!
0
votes
0answers
38 views

Marketing Cloud - Variable Value not displayed in Dynamic HTML content

We are having problem passing variable value dynamically to Content block. I have added code snippet below. Any advice will be a big help. Thank you. IF @language == 'de' THEN SET @Salutation =...

1
2 3 4 5
52