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

Create a form in cloudpage [closed]

I am trying to make a form on a cloudpage, I have created the DE where I want to send my data. I would like to receive the email and the user's name on the form. How can I make the email through a ...
0
votes
0answers
47 views

Lookup() function not working with Send Log DE

I am trying to retrieve the 'view as web page' link that is stored under the Send Log Data extension, but I had no luck. When I send an email to myself, the following attributes are showing correct ...
0
votes
3answers
92 views

How to Fetch Child BU Name

Currently, I'm fetching Job ID, Subscriber key of a subscriber who clicks on the landing page. Code in the Email, %%[ SET @Sub = _subscriberkey SET @CloudPageID = 1646]%% Code in the landing page ...
1
vote
1answer
45 views

Retrieve/Update Custom Object using AMPScript

I am attempting to update a custom object on Sales Cloud through a Marketing Cloud landing page. I am not using MC send, the email comes from Sales Cloud and lands on an MC page, then the form queries ...
0
votes
1answer
34 views

Journey Data connected to other Data Extension

We are using an API Entry Event that populates information into a Data extension called Purchase to trigger a first purchase journey. The Purchase DE contains just the basic purchase information and ...
1
vote
1answer
35 views

Using AMPScript for a dynamic URL

This is my first post but I thought I would ask the community for feedback. Some background: I am creating an email for a client that would then take over uploading data extensions and sending the ...
1
vote
0answers
33 views

Impersonate a Subscriber on a Cloud Page

When a Subscriber clicks on a CloudPagesURL() link in an email, they are sent to the cloud page with a QueryString (qs) parameter. This tokenized value tells the Cloud Page who the subscriber is, and ...
0
votes
1answer
45 views

Email address shows as empty with claimrow function

Puzzled about Claimrow function. We are assigning unique codes to unique email addresses in a daily automation. We have one data extension that we send to, and another data extension that keeps the ...
0
votes
1answer
59 views

How to try catch RetrieveSalesforceObjects in AMPScript

I use the RetrieveSalesforceObjects function within an Email that I send out in a Journey, recently some people have been failing in the email send. Which I suspect is because of this line, I have ...
1
vote
0answers
55 views

GET Response containing png image in Marketing Cloud

We are using this api (get method): https://rapidapi.com/qrcode-monkey/api/custom-qr-code-with-logo In order to create QR images on the fly when sending emails to our customers from Marketing Cloud. ...
0
votes
1answer
51 views

Using API Event in Journey Builder with Custom CloudPage Form

We designed a cloudpage with a simple form (bootstrap CSS utilized) that has 2 'textarea' types of fields (so, basically, free comment areas). Since this survey will be sent to our subscribers ...
0
votes
1answer
48 views

Why isn't my dynamic Ampscript rendering correctly?

I have the following lines on a CloudPage %%[ SET @dynamicCode = CONCAT("Some code goes here") TreatAsContent(CONCAT("%%[OUTPUTLINE(CONCAT('something gets printed<br>'))]%%")) /*...
0
votes
0answers
23 views

Personalised Cloudpage URL AMPSCRIPT

I have 4 fields (MobileTel) (CIF) (PURL) (RepIAC) in my DE. i want to send an sms containing a cloudpage url that is personalised and contains either: (CIF) (Agent PURL) (AgentIAC). On Cloudpage ...
1
vote
0answers
56 views

Have to Track the Campaign ID and Description using DataViews

Currently, I'm tracking the email sent details using data views and storing in a DE, I need to track campaign ID and Description in the same DE. Is there a way to track it using Data Views? In my ...
0
votes
1answer
26 views

Unsubscribing a subscriber using SSJS from a publication list based on cloudpages URL

This is what I have so far from the help documentation and it doesn't seem to work %%[ VAR @subKey SET @subKey = [Email Address] ]%% <script runat="server"> Platform.Load("Core","1"); var ...
0
votes
1answer
44 views

How to add two values from a single field with AMPscript

XML field DISCAMT is added multiple times using varying values and I'm interested to total these and show in one line. What function can be used here or just create new field/s per each product ...
0
votes
1answer
26 views

Ampscript block if not empty not collapsing

In my code I have 3 block sections. Each with replies. The way it works the data extension gets checked to see if there's content. If no content then nothing displays. But the block isn't collapsing. ...
0
votes
1answer
49 views

IF-statements producing errors in isolated cases

I'm using the following AMPscript to set variables and to allow fallback values if data isn't available for a Guardian. %%[ SET @rows = LookupRows("Contact_Salesforce","Id", _subscriberkey) SET @...
0
votes
2answers
61 views

Randomly select 5 rows from a synchronized Data Extension

I am wondering if it’s possible to randomly select 100 rows from a Synchronized Data Extension over 500 thousands records, without adding extra columns to it and using ampscript to do so at send time? ...
0
votes
1answer
39 views

Dynamic content within an attachment [closed]

Can we have dynamic content built within an attachment. E.g. i have a disclosure statement that needs to be attached with an email. This statement however will contain the customers name and address. ...
0
votes
2answers
55 views

ampscript first name personalization using a data extension

We are using a data extension to populate a subject line with the first name and it looks like this: %%[ VAR @FIRST_NAME SET @FIRST_NAME = [FIRST_NAME] /*SET @FIRST_NAME = "test"*/ if length(@...
0
votes
1answer
37 views

AMPscript lookup not returning value

fairly easy question here I guess but I'm having problems with it. So I was trying an AMPscript exercise in trailhead: Also, can be found here as exercise 3: https://trailhead.salesforce.com/...
0
votes
2answers
99 views

Variable has empty space in name. How to reference it correctly? [closed]

How do I fix the syntax issue with the empty space between Campaign & Id? %%[set @Campaign Id = __AdditionalEmailAttribute1=]%%
0
votes
1answer
41 views

Display multiple rows when more than one similar email

I have the following DE called Metering_ElecDE_email Where there is a match with Email (in this case 1)i want the Email to display as per below. Supply address: Hamilton (next line) ICP: ert (next ...
1
vote
2answers
176 views

Will using the GUID() tag ever produce a duplicate?

I don't know if this is the best way to go about this but I need to create a "back-up" data extension that stores information on every email send using InsertDE. Since a user with the same email ...
0
votes
1answer
48 views

UpdateDE on Preference Page - booleans

we created a custom unsubscribe page using the AMPscript and html/css combination. We have 3 consent types: (general) OptIn, OptIn_Products, and OptIn_Services. All 3 are type boolean. Now, since it's ...
2
votes
0answers
46 views

Unable to update Publication List in parent BU

We have developed a cloud page to update publication list to update status from Active to Unsubscribe or Unsubscribe to Active. If someone select the check box and click submit. This works fine in ...
0
votes
2answers
70 views

Dynamic phone based on Sender

Our footer currently pulls in the address using personalization strings %%Member_Addr%% %%Member_City%%, %%Member_State%% %%Member_PostalCode%%, %%Member_Country%% but then underneath that, we have ...
0
votes
2answers
60 views

Creating Triggered Email Send for Cloud Page

We created a fully-functional web-page collection in Marketing Cloud comprised of a form page and a thank-you-page. We tested it out and it works fine, i.e. after the form is filled out the data lands ...
1
vote
0answers
119 views

Add subscriber to publication list on link clicking using Ampscript [closed]

If subscriber clicks on link in email template, the subscriber data from 'All subscribers' gets added to publication list upon clicking. How to add the subscriber in the publication link upon ...
0
votes
1answer
67 views

How to transform current date-time into Unix time (Epoch) using AMPscript?

I need to have the current date/time outputted as Unix Epoch time (to add to a URL in an email), but there appear to be no functions for this in AMPscript. Is this possible any other way? Thanks!!
1
vote
1answer
88 views

Is it possible to use data in a Related Data Extension to personalize content that is sent to the parent Data Extension?

I am trying to determine if I can use data that is set up in a related (non-sendable) Data Extension to personalize an email that I will send to a parent (sendable) data extension. I have two data ...
0
votes
1answer
45 views

Marketing Cloud: “Textarea” field type on Cloud Page not updating Data Extension

We designed a cloudpage with a simple form (bootstrap CSS utilized) that has just 2 'textarea' types of fields (so, basically, free comment areas). Although the form validates without any errors, the ...
0
votes
0answers
44 views

Error when using AMPscript to show fallback value if First Name isn't present

I'm using this AMPscript to show someone's first name if it's present in the Data Extension, and if it isn't, it should just show "Hello". %%[ VAR @firstName SET @firstName = AttributeValue("First ...
1
vote
0answers
40 views

Email populated by CloudPage via HTTPGet is not tracking clicks

I'm trying to find a solution for an HTTPGet problem. As I am using a Cloudpage as my email's content source, the following code works fine with the exception of the ability to track clicks. This code ...
0
votes
1answer
79 views

Concat two column values data extention

I have a data extension and it has three columns .What I am trying to do is concat the two columns and add them to third column programmatically using AMP-script or sssjs like cl1,col2 as the value ...
0
votes
1answer
104 views

AMPScript / HTML Table formatting breaking in Marketing Cloud

I am using the following code to output data in an email to a dynamic table where the number of table rows varies depending on the data. As the code stands it works correctly however when i save it in ...
0
votes
1answer
48 views

Ampscript Disappearing from Image Block (but stays in HTML)

When building an image ref URL in Ampscript, I'm finding that it's getting mangled when saving...vs the same HTML in an HTML block (where things will save correctly). Has anyone else run into this? ...
1
vote
1answer
82 views

Using AMPScript for changing salutations?

We are setting up an invitation for an event in Marketing Cloud and want to include in the message %%salutation%% are invited to xx event however if the salutation is a single name we would like to ...
0
votes
1answer
69 views

Reporting on Advanced Content A/B Test blocks

I've set up some content items in Content Builder that use an A/B test content block. I'm testing two different images. How can I report on the performance of emails that use image A vs image B? Can ...
0
votes
1answer
60 views

Contacts not receiving SMS again once sms is Received once - Marketing Cloud Mobile Connect

I have an issue in regards to contacts not being able to receive sms again once they received an sms before. Orignally, I created a keyword attached to the "Stop". I changed it to be attached to the "...
0
votes
1answer
49 views

Success submit message with request parameter “name” value within a register form

I´m using the following example for a register form in a cloud page, but I want to show the "First Name" written by the user when the success message appears. It is possible to store this value in a ...
0
votes
0answers
37 views

Cannot get subscribers from publication (AMPScript) - Custom Preference Center

I am trying to make a custom preference center, where users can see a list of all publication lists in the business unit they belong to and then choose to subscribe/unsubscribe to such lists. What I ...
0
votes
1answer
72 views

Can I compare boolean to integer in Ampscript? - Marketing cloud

Can I compare boolean to integer in Ampscript? in some programming language a boolean value is false/true but also 0/1 how is in ampscript? for instance, can I do this %%myboolvar%% < 1? ...
2
votes
1answer
108 views

SFMC Mobile Connect, Update Data Extension After sending a Response in SMS

I need to update sales cloud and a data extension whenever a customer replied UNSUB to the sms that we send using Marketing Cloud. This is how I get the response IF Uppercase([MSG(0).NOUN(0)]) == "...
0
votes
0answers
30 views

Use first name personalization in custom reply mail management

I've created a triggered send that sends an e-mail when customers reply to an e-mail. Is it possible to use first name personalization in this e-mail? Is the only solution to use the subscriberkey of ...
0
votes
1answer
37 views

Note creation in Sales Cloud from a cloud page using AMPScript

I want to create NOTE and tag it to existing lead in sales cloud. I have created a cloud page and using ampscript to acheive this. But somehow it is not working. SET @noteCreate = ...
0
votes
1answer
53 views

How to merge multiple RetriveSalesforceObjects call into one rowset variable in ampscript

I have to retrieve Contact records, from CRM using AMPScript, based on the mobilePhone field. Now the data could be stored in international format or without the country code. In order to do so I had ...
0
votes
1answer
57 views

Trying to create a URL with shipping tracking codes using a data extension

Hi I currently have a data extension with 15 columns that are being populated by an API call. Once a record has been added any one of the 15 Attribute Values can have a tracking code in it. I need to ...
0
votes
1answer
129 views

Remove time stamp from personalization strings

I looking for a way to remove the time stamp of a date field when using personalization strings. I got this format when using PS: 3/1/2020 12:00:00 AM. I want to remove that part "12:00:00 AM". Here ...

1
3 4
5
6 7
48