Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
4
votes
1answer
61 views

Marketing Cloud - callout from CloudPage to MC API - where to store credentials

We are building a simple functionality on a CloudPage that will be making an API call to Marketing Clouds API. I was looking at documentation to find information on where we should store the Client Id ...
5
votes
1answer
54 views

Clarification - AttributeValue with CloudPagesURL

So... let's come to a topic i do not seem to fully understand: The function AttributeValue, especially in combination with the cloudpagesurl function. I will present three scenarios, two are working ...
1
vote
0answers
42 views

link tracking with httpgetwrap and TreatAsContent

I hope you guys are able to help me with my issue. I have been working on making our mailings a bit more dynamic. Technically it works as desired, however I noticed that the links are not being ...
0
votes
3answers
81 views

AMPscript to show copy dynamically

I'm trying to write a bit of AMPscript that does the following: IF firstname exists say "John, your" IF no firstname say "Your" I tried this, but it doesn't work: %%=iif(empty(@firstName),"Your", ...
0
votes
2answers
70 views

lookup table from another DE

I would like to insert a loop within a loop, this is the working first loop pulling in content from an external DE, how would I loop this over again? ---- updated working script below ------ %%[ ...
-1
votes
0answers
36 views

I want to retrieve multiple values from one content block to nested content block in marketing cloud [on hold]

I want to retrieve multiple values from one content block to nested content block in marketing cloud. Actually I one primary content block which I am using in Email Template, where in that content ...
0
votes
1answer
38 views

Using AMPscript to populate email, sending to a different DE

So here's my use case: I need to send a weekly email containing all upcoming webcasts from our ecommerce site to our our subscriber base. I have a file of website products and I have a separate DE of ...
1
vote
1answer
44 views

Suppress specified links within emails

I am looking to suppress a specified AMPscript personalization string link within the body of one of my emails. It's %%view_email_url%% that I don't want to be tracked. I tried RedirectTo and other ...
1
vote
1answer
31 views

Ampscript GET view_email_url

Hello I have a problem with an ampscript code I can not get the online version and send it in salesforce cf the following code: %%[ var @contactId, @campaignId, @id, @contactRows, @limitRow, @nom, @...
2
votes
1answer
42 views

Dependent dropdowns in Cloudpages and Dropdown values to be pulled dynamically from a DE without page refresh!

I have a cloud page set up as below. https://i.imgur.com/Fjf2zwf.png And 2 Data Extensions as below, https://i.imgur.com/ZoS4aCu.png https://i.imgur.com/cOzdEH3.png I need to achieve the below, 1) ...
0
votes
1answer
48 views

SSJS and AMPscript

I'm trying to output message if there is an error and i have very little knowledge in javascript in general. Could I get some feedback on if the following would work or how I would go about : If ...
0
votes
0answers
47 views

Marketing cloud - Amp script dynamic values cloud pages [closed]

I have 24 campaign statuses in SF CRM when an email is sent to customer through Journey builder status being set on campaign member as 1 email sent and when the same person responds to our email we ...
2
votes
1answer
34 views

AMPscript syntax

I have this piece of AMPscript which shows different preheaders based on language. Except two, GB and JP, all of the others show the relevant preheader. The data extension has the right value and it ...
3
votes
1answer
55 views

Send emails using Salesforce Reports based on Custom Object

I want to send emails using a Salesforce Report which is based on Custom Report. I have created an AMP Script Code in order to fill some fields but I don't receive the email. This is the code: %%[ ...
2
votes
1answer
49 views

Marketing Cloud - Is there a way to disable WAC String for a specific link (ex. Tracking Link) with AMPscript or otherwise?

A client recently went live with a Commerce Cloud website / Marketing Cloud integration. Marketing Cloud is sending a Shipping Confirmation triggered email. The tracking link in the Shipping ...
0
votes
1answer
29 views

Pre header Variable Question

Hello I'm fairly new with Marketing Cloud but trying my best to be on top of it. I'm doing a campaign wherein I include the number of days left for someone to redeem their freebies. I set the ...
3
votes
1answer
63 views

Collect tracking code is not working properly

I'm currently implementing the collect tracking code to capture the User info wherein I'm able to get the user's email id into the tracking data extension (IGO_PROFILES) but not able to capture the ...
0
votes
3answers
41 views

Passing subscriber values from Marketing Cloud Cloud Page to Marketing Cloud Preference Cloud Page [closed]

We have a case where we would send an email to a list of subscribers, which would have a link to a Marketing Cloud landing page with more information about the product offerings. On that page we would ...
0
votes
2answers
58 views

Date Specific AMPScript

Trying to expand on this original post to generate dynamic content based on a specific season of the year. Loading content block using AMPScript based on specific date of the year I updated my code ...
1
vote
0answers
59 views

How can 'RaiseError' and 'InsertDE' AMPscript functions be used to catch ANY error in a Triggered Send?

We currently have a Triggered Send Definition that is encountering errors occasionally and preventing further emails from sending. Marketing Cloud support has been able to provide some error messages, ...
0
votes
1answer
47 views

separate one column value having comma as delimiter

How can we separate one column value having comma as delimiter using Ampscript. Example : We have hello, world in ABC Data Extension in Column "Name" I want to separate both of them using Ampscript. ...
-4
votes
1answer
43 views

How to create a task for Salesforce cloud crm using ampscript [closed]

Please advise how to create a task for Salesforce object in MC using ampscript.please let me know is this functionality is achievable Regards Shiva
1
vote
0answers
45 views

Query String variables not showing up in URL after a RedirectTo

I am trying to set up a simple link, where the HREF points to a URL with a collection of query string parameters: Here's the <a>: Finally, after receiving the email, the URL I'm taken to ...
1
vote
1answer
35 views

Failed to convert parameter value from a string to a Int32 while all values are integers

I've encountered an issue while using a LookUp function in AMPscript in an email. I get the error "Failed to convert parameter value from a string to a Int32", when trying to LookUp a value using an ...
1
vote
1answer
40 views

Dynamic date renders differently in email preview than send

We are dynamically setting text to show the last day of the previous month. This is the AMPscript in use: %%[ SET @CurrentDate = NOW(1) SET @Month = DatePart(@CurrentDate, 'M') SET @Year = ...
0
votes
1answer
37 views

How to run UpdateData and InsertData from cloudpage

I am creating a cloudpage that will use AMPscript to update data of one data extension and insert in another. I was wondering how I could make sure that these functions would run. So created the ...
0
votes
1answer
67 views

Why are my AMPScript variables rendering in send preview, but not in test send?

I have a series of AMPScript variables and statements, that are resolving perfectly fine in the send preview. Once the test is sent out, some of these variables do not resolve and some of them do. ...
0
votes
1answer
31 views

Ampscript loops to print from second data extension

I am using two data extensions, with a primary key in both as Id, first data extension contacts fields as name, email, brand, id. second one contains id, brand, delivers. One name can have more than ...
1
vote
1answer
51 views

Generate GUID to existing records

It is possible to assign a GUID value to each existing record in a dynamic way? I'm recently add a hidden field with this value in a register form, but I need to assign a unique value to records that ...
3
votes
1answer
65 views

Formatting Date and TIME in French

I followed this question/Answer to format date in French: AMPscript Date Formating for French Language in HTML emails Following this post, I would like to know how we should add the time to the date ...
1
vote
1answer
53 views

Why does a simple multiplication DOES NOT work in ampscript?

<script runat="server" language="ampscript"> SET @x = 100 SET @y = 5 SET @output1 = @x * @y // Why this does NOT work! SET @output2 = Multiply(@x,@y) //And only this works!! ...
0
votes
4answers
49 views

Ampscript Date formatting using format or formatdate not working

I have an ORDER_DATE attribute in my data extension which is of the text datatype. The date is in the following format mm-dd-yyyy. Now I want to convert this date into European format based on ...
1
vote
1answer
39 views

How do you share variable values across multiple blocks within an email?

I have a @variable1 defined in an email HTML content block that is defined. When the email iterator starts, I would like to use the value of @variable1 in a second HTML content block. How do I do ...
0
votes
1answer
42 views

Editing an email, AMPScript does not stay in the spot I put it in after saving the email

I am having a weird, serious issue. I have an email with basic content. See screenshot - basically, the intent is to wrap if/endif around these content blocks to show the appropriate block. I've ...
1
vote
1answer
27 views

Retrieve Subscriber list using soap api in ampscript in cloud pages

Ampscript code which need to be converted to Soap API in Cloud page : %%[ SET @rr_1=CreateObject("RetrieveRequest") SetObjectProperty(@rr_1,"ObjectType","Subscriber") AddObjectArrayItem(@rr_1,"...
0
votes
1answer
69 views

How to insert csv file record inside data extension from cloud page?

I have created a cloud page where I have provided browse button and after selecting CSV file I am reading CSV file in the script so there are 100 contact records in csv and I am sending WhatsApp ...
0
votes
1answer
33 views

Ampscript Error in SMS

I am writing an IF statement for subscribers that do not have a first name: %%[IF Not Empty(First_Name) THEN]%% %%=Concat(ProperCase(First_Name)," ",you)=%% %%[ELSE]%%You%%[ENDIF]%% I am getting an ...
0
votes
1answer
21 views

Ampscript - Dynamic UTM paramters

I've figured out how to put in dynamic utm paramters to append to all links in an email with the below ampscript. %%[ Var @campaign, @pcode Set @campaignID = "%%campaignid%%" Set @pcode = "%%pcode%%"...
4
votes
0answers
49 views

claimrow() is claiming two rows for each subscriber when used in a journey

This one has me stumped. I have the following AMPScript in an email: %%[ var @em, @couponRow, @couponCode if _messagecontext == "PREVIEW" then set @couponCode = "XX TEST XX" else set @...
0
votes
2answers
35 views

AMPscript: 'For' loops duplicating content

I have an issue with my 'for' loop statement. It is producing duplicate content. My loop statement is as follows: /* look up top 3 destinations from preferred airport in EU only if preferred ...
0
votes
2answers
70 views

write some AMPscript to skip a record if its empty

I have a data extension with a CustomerId(PK) that has multiple Productid's as Productid1, ProductId2, ProductId3...ProductId10. Some of the Productid's are empty for some Customers and I'm trying ...
0
votes
1answer
26 views

Web Analytics Connector only on whitelisted domains

After enabling Web Analytics connector I have noticed some of our external links (not on our own website) break, is it possible to only allow associated parameters to be appended to "authorised/...
0
votes
1answer
58 views

Using AMPScript loop for generating content in an Email [closed]

I have defined a Generic Template Email using AMPScript. So all the content will be dynamically included when sending the Email. I am using LOOP sentences in my AMPSCript code. When sending these ...
0
votes
0answers
23 views

How to create triggered emails with Magento connected to Salesforce?

We currently have welcome newsletter, welcome account, password reset, order/shipping confirmation, unsubscribe triggered emails from dotmailer using the connection to Magento . The Magento generated ...
0
votes
1answer
59 views

Dynamic Image in Content Builder using Ampscript

I have 1 000 images stored in a file, in Content Builder. Each image corresponds with a user. Image names are the users' id. When an email is sent to a given user, I want his photo to be displayed ...
0
votes
1answer
24 views

AMPScript LookUp not retrieving any value

I've added a Lookup in my email to retrieve the language of the customer but, despite there is data, the function doesn't retrieve anything (I tried with different values or Data Extensions but with ...
1
vote
1answer
23 views

Exclusion Script for Domain in Marketing Cloud

I'm looking to do an exclusion script on 2 domains. Here's the current script, but I'd like to add another domain. domain(Email) == "noemail.com" Would I do it like this? domain(Email) == "...
0
votes
2answers
47 views

One-Click Unsubscribe that was working earlier is not working now

The below code was working perfectly but don't know what happened the code is not working now. When I'm clicking the unsubscribe link it is not updating the values. %%[ var @jid var @...
0
votes
2answers
45 views

How to separate json response in different variables? [duplicate]

How do I separate this response in one variable, like I required from below response URL only in one variable? However, "BE050-A28" this value is dynamic in every response. { "vehicle": { "...
3
votes
3answers
50 views

Show dynamic content based on percentage

I want to show a certain contentblock randomized to new subscribers. We want to ask them to leave a review on a certain website (or websites). Though, some review websites are more important than ...