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
2answers
44 views

Salesforce email Ampcript/conditions to display values from data extension

Data extension field: Subscription_Status I want to write an inline ampscript in email, to say, if 'Sub_Item' is CH+, display "XYZ" and have multiple of these i.e., if 'Sub_Item' is D+, display "ABC" ...
0
votes
1answer
32 views

Can we capture parameters from website into a Cloudpage?

I am creating a new lead capture form in cloud pages, but we are going to host it on our website and the user will not be entering his customer_id again. Is there any way we can pass the customer_id ...
0
votes
1answer
46 views

Issue with my ampscript if statement conditioning

I have two amp script conditions in the email, Condition1: (to show the content based on country code) IF @CountryCode == "RU" THEN SET @CountryCode = "EN" ELSEIF @CountryCode == "RO" THEN SET @...
0
votes
1answer
43 views

Unable to create TriggeredSendDefinition

I am unable to create TriggerSendDefinition using SOAP API call in POSTMAN. I am following the official docs to create the TriggersendDefination. Not sure where I am doing wrong. Please find the below ...
0
votes
0answers
29 views

Ampscript vs. Dynamic Rules - Marketing Cloud

Is there a reason that one would build an email or data extension based off a dynamic rule vs. Ampscript, or the other way around? We had a couple of our email developers pose this question, and other ...
0
votes
1answer
67 views

Custom Profile Center - CloudpagesURL returns error 500 (Marketing Cloud)

I am implementing a Custom Profile center. I tried to follow the method suggested by Adam here: Custom Profile/subscription center But get a 500 error when trying to load the page, So, I further ...
0
votes
1answer
32 views

amp script fallback content

I am trying to pull blog info in one of our emails. the issue that I have is that I do not have a field that I can match on between the Sendable Data Extension & the non sendable data extension ...
1
vote
1answer
47 views

Trigger Send email - completed count and other details for reporting

I've created a Trigger Email (Email Studio> Interactions> Triggered Emails) whose external key is 2241. This has 64 in completed count and 0 in queued and errored. I'm trying to get this 'completed' ...
2
votes
2answers
147 views

AMPScript displaying wrong Date inside Journey that is triggered by automation - Reason?

The Problem A wrong date gets calculated by AMPScript GetSendDate with SystemDateToLocalDate inside a journey that is triggered by automations. Our SendLog DataExtensions has senddates displayed in ...
0
votes
1answer
29 views

Need to populate Date of Birth field using Ampscript, but its populating current date not populating Date of Birth from my DE

I am using the below script to populate Date of birth: %%[ var @emailaddress var @data var @dtenvio, @year, @month, @day SET @dtenvio = iif(empty(QueryParameter("Date_Of_Birth")),Now(),...
0
votes
0answers
31 views

Getting an Error while using HTTPPost2 in a cloudpage

I am only getting this error when trying to recover the client ID and Client secret from the D.E, if I set them manually I can get the accesstoken, This is my AMPScript in the cloud page : **%%[ ...
0
votes
0answers
71 views

CreateSalesforceObject AMPScript method is failing

I am using Cloud Page to sync Marketing Cloud Data Extension records from SFMC to Salesforce CRM custom Object. I am using CreateSalesforceObject AMPScript method to create salesforce object. ...
2
votes
2answers
44 views

AMPscript link concat not working when I send a test

I have problems with a link and I can't figure out what I'am doing wrong. From the preview when I click on the image link I get the expected result but when I send a test I'm getting this error. If ...
0
votes
1answer
55 views

Need help diagnosing Ampscript issue

I am trying to implement the following code but not having any luck. I want the form to only create a new Person Account record IF they don't already exist in Salesforce. Form works fine creating the ...
0
votes
1answer
111 views

Ampscript Lookup function on field which is null

I am using this function: %%=Lookup("ENT.SBQQ__QuoteLine__c_Salesforce","SBQQ__ProductName__c","sbqq__quote__c", "a0n5E000002KZHQQA4", "SBQQ__Required", @required)=%% which works all the times (it ...
1
vote
0answers
33 views

Tracking links contained in Ampscript variable

Given following code: SET @link1 = "http://www.salesforce.com/" SET @linkvar = "This is <a href='%%=RedirectTo(@link1)=%%'>Link number one</a> and this is <a href='http://www....
0
votes
1answer
50 views

Remove ASCII signs - problem with regexmatch function in AMPScript

I'm trying to remove from the beginning and end of the word the \x00-\x20 signs. I don't know what is not working when I'm applying the code I'm not receiving any result. Any thoughts? SET @regex = ...
1
vote
2answers
99 views

Update AccountUser via WSProxy

Has anybody been able to update the AccountUser object. For example, disable a user or delete a user. I was not able to find any documentation about it. I almost got my WSProxy code working the only ...
0
votes
1answer
30 views

Trying to create Person Account via marketing cloud using CreateSalesforceObject in Ampscript

hoping someone can help. My code ie below is trying to create a Person Account in Salesforce via a cloud page in marketing cloud. I keep getting an error. if RequestParameter("submitted") == true ...
0
votes
0answers
30 views

Debugging a CloudPage with AMPScript loop with SSJS inside

I need to debug a CloudPage consisting of an AMPScript for loop. In a loop it makes a http request, parses the result with parseJSON and sets a variable via SSJS, and then processes the result with ...
0
votes
1answer
40 views

How to retreive ContactKey of the subscriber in the SMS message

I need to retrieve a value from a data extension (DE) into the SMS message. Specifically, the GlobalID value which is the same as the contact key. The contact key is existing in the system table - all ...
-1
votes
1answer
30 views

Linking email button to a column in the DE

i have a Covid email message we are sending to our business customers which will have a button that they can click which will take them to a landing page. I have created this landing page in Cloud ...
0
votes
0answers
26 views

Passing value to AMPscript varible from SSJS is adding hidden chars

From some reason, using the following SSJS code: Platform.Variable.SetValue("@sid", missed[0]["SubscriberKey"]); Adds some hidden characters to the end of the string. %E2%80%8E is added, which is ...
0
votes
1answer
54 views

AMPscript - Referencing a Shared Data Extension

I'm using Lookuprows to retrieve data from a Data Extension. When used in an email, it's not erroring, but it's not pulling in any data either. The top part of the AMPscript looks like this: %%[ ...
0
votes
1answer
31 views

AMPScript for Dynamic Sender Profile not firing

I’m trying to write a short Lookup script for a Dynamic Sender Profile and I’m struggling with it. I have an email that I want to send to the members of a Data Extension, and I want the email come ...
0
votes
1answer
40 views

Making IFs ELSEIFs & ANDs work

I have the below AMPscript that is throwing this error: Multiple logical conditions for a script IF/ELSEIF exist but the required logical AND or OR operator joining a secondary condition is missing....
1
vote
1answer
152 views

AMPscript, how to learn?

I'm a designer and I need to learn AMPscript. I wonder if you know any courses. And also do you need to be a developer or know programming languages ​​to learn AMPscript?
0
votes
1answer
36 views

Data Extension field has Colon

I am attempting to use an exclusion script on my emails in Journey Builder. We are loading a data extension with opportunities that we would want to exclude from the send. Our exclusion looks like ...
0
votes
1answer
45 views

Access UTM parameters inside AmpScript

I want to access the addition parameter[utm_campaign] inside an email to supply it to a connected app using an HTML attribute. How can I fetch the attribute?
0
votes
1answer
65 views

dynamic from name for SMS

Is it possible to change the from name (sender ID) for MobileConnect with ampscript? Based on telecom regulations we need to send SMSes with different from names based on which country we're sending ...
0
votes
1answer
47 views

use ampscript for URL image on EMAIL TEMPLATE

I use an email template, and I put an image with a URL on email. The link contains a query string, something like: https://google.com/?privateId=X I want to make X to dynamic for each user AND ...
0
votes
1answer
38 views

AMPScript Link Tracking - Does RedirectTo has to be Inline? Understanding

The Question(s): Does RedirectTo has to be Inline to work properly? Can RedirectTo be somehow used in AMP-Script Blocks to work as a variable? My experiment ;D Works Inside a ContentBlock in the e-...
1
vote
1answer
141 views

Help with inline IIF ampscript statement

I am trying to write an inline IFF statement for use in our Web Analytics Connector parameter string. Currently I have the following: ...&utm_content=%%=iif(IndexOf("%%linkname%%","http")>0,"...
1
vote
3answers
57 views

Is this valid AMPscript?

Is the "AND FALSE" portion proper AMPscript syntax? I came across this kind of statement but am not sure what to think of it. %%[ IF @TableName == "Cornelius" AND FALSE THEN SET @data = "12345" ENDIF ...
1
vote
0answers
39 views

Random Space Insertion When Using Replace() Function in Content Builder

We service multiple regions with regional copy and links in our emails. Because of this, we often rely on the use of data extensions with region IDs as a unique identifier and "tags" in the copy that ...
0
votes
1answer
22 views

Exclude all send from one particular email of journey

I came across a need of exclusion script which can exclude all the email send from one particular email of a journey. if I just add "1" in the exclusion script does it exclude all the email send from ...
0
votes
2answers
191 views

What is the difference between 'Lookup' Function and 'LookupOrderedRows' function in AMPscript? Which has faster performance?

I'm studying for Marketing Cloud consultant exam. One of the questions relates to performance of the two functions Lookup Function and LookupOrderedRows function, specifically which is faster? I ...
0
votes
1answer
50 views

ClaimRow function for dynamic coupon

I've been having a look at the ClaimRow function to build a dynamic coupon code email and wondered if anyone can help me with a few things... It's advised to add an IsClaimed field to your DE for ...
0
votes
0answers
24 views

UpdateSingleSalesforceObject function not managing properly exceptions handling situations

I am in the process of doing my unit tests for my implementation. I am using in a landing page the UpdateSingleSalesforceObject() function. When I try to update a record in SalesCloud and I get a ...
1
vote
1answer
47 views

How to fetch the values from two DE's and insert into another DE

I'm trying to track the landing pages opens/clicks data into a Data Extension. I'm fetching the CHILD BU details and LANDING PAGE details through two DE's (here I'm storing and fetching the data )and ...
1
vote
1answer
44 views

How do i use multiple AMPScript functions for a single variable?

I have a variable that that is pulling from another variable and applying the Field function to it as below. set @CampaignStartTime = Field(@CampTypeRows,"Event_Time_Text__c") I now want to apply ...
0
votes
3answers
113 views

Fetching the landing page details

I'm fetching Job ID, Subscriber key of a subscriber into a Data Extension who clicks the landing page. Code in the Email %%[ SET @Sub = _subscriberkey SET @CloudPageID = 1234]%% Code in landing ...
0
votes
1answer
61 views

Uploading image via Cloud Page form and then retrieving Content Builder image URL

I have created a Cloud Page with a form to upload an image using this tutorial: https://sfmarketing.cloud/2020/02/29/create-a-cloudpages-form-with-an-image-file-upload-option/. I am able to ...
0
votes
3answers
87 views

Remove HTML element with AMPscript?

Can AMPscript be used to find HTML within the body and delete/replace it? Trying to do this in Salesforce Content Builder. For instance, find <span style="color:red;"></span> and delete/...
0
votes
1answer
98 views

Why can't I make multiple LookupRows in Salesforce Marketing Cloud?

On a CloudPage, I want to accomplish 3 loops. In each loop, I want to retrieve the total number of records from a Data Extension and insert a new record. Here is the code I came up with. %%[ SET @...
1
vote
1answer
111 views

Smart Capture Form - insert record into Salesforce

I have a Cloud Page with a Smart Capture form. The Smart capture form works as intended and stores the information into a specific Data Extension. In addition to that, I would like to capture the ...
0
votes
1answer
67 views

_dataSourceName for SMS activity in journey builder?

I'm trying to create a SMS activity in Journey Builder and use the entry source (data extension) name in the ampscript. Is this even possible? This is the ampscript %%[ set @dataSourceName = ...
1
vote
1answer
31 views

Only show AttributeValues when they are not empty

I have a client who has up to 42 profile attributes that he wants to display in an email. Some subscribers might have all 42, some might just have 2. I'm trying to use BuildRowsetFromString and a for ...
0
votes
1answer
39 views

encode in md5 a field of a form in cloudpage

I have a form on cloudpages, my question is if it is possible to be able to encode one of the fields in md5, to send it to the DE as subscriberkey. I have tried javascript but I have problems because ...
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 ...

1 2 3
4
5
48