Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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
1 answer
27 views

Send email only if attachment exists in import SFTP Marketing Cloud

I have an incoming zip file containing multiple csv files. I extract and run an automation activity on a specific file name pattern, this is the master data file containing which file goes as an ...
IHaveAQuestion's user avatar
0 votes
1 answer
36 views

Hiding HTML table of code within Ampscript IF-ELSE Statement - Reduce file size?

I am working on an email template with a large number of modules. If I add these modules within the AmpScript IF-ELSE statement - for eg: Display module 1 table of code within in the If statement and ...
user1373287's user avatar
0 votes
1 answer
52 views

Redirect not working in if/else but working in some part of the code

In This code Line 62 & 65 where i have commented out { Redirect(concat(@loginPageURL,"?invalidtoken=",1,"&referer=",@referer)) } The code does not work when i include these ...
UTKARSH SINGH's user avatar
1 vote
1 answer
49 views

Why isn't my link getting populated when using AMPscript

I'm using Salesforce Marketing Cloud and need to populate a link using AMPscript. For example, the link is https://website.com/%%=v(@variable1)=%%/%%=v(@variable2)=%%/%%=v(@variable3)=%% The link ...
hihihi's user avatar
  • 11
1 vote
1 answer
27 views

How to Correctly Exclude Checkout Day in Daily Rate Calculation with AMPscript?

I am using AMPscript in Salesforce Marketing Cloud to parse serialized JSON data for hotel reservations. Each entry contains start and end dates along with a daily rate. I need to calculate and ...
Matt Black's user avatar
0 votes
1 answer
48 views

Update Demographics Object using AMPScript

When trying to update the Contact object using an AMPScript on my SFMC cloud page, my script works fine. However, I haven't been able to figure out how to update the Demographics object using the same ...
NDSF's user avatar
  • 7
0 votes
1 answer
52 views

Required Field Missing Error on Landing Page

I'm encountering the following error when I'm trying to publish landing page: Error Message: "Call to create the salesforceobject Account failed! Error status code: REQUIRED_FIELD_MISSING Error ...
salesforce Developer's user avatar
0 votes
1 answer
46 views

ampscript lookup does not work when field length of the lookup field is not set

This is my amp script code : %%[ Var @email Set @email = Lookup("forgot_password", "email","locale","en-US") ]%% %%=v(@email)=%% The locale field length ...
New Developer's user avatar
0 votes
1 answer
45 views

How to end BuildRowSetFromString in a period

In my DE, I have a list of last 4 of account numbers in one field. The list is delimited by a pipe and will be different for each record in the DE (could be 2 account numbers, could be 100 account ...
butternut_squash_100's user avatar
3 votes
2 answers
77 views

AMPscript Current Sunday

I'm attempting to build a call by date and have that date be the Saturday of the given week. These emails are sent Monday - Friday, I'm struggling to lock down the AMPscript for it. Here is what I ...
Alex Martin's user avatar
1 vote
2 answers
59 views

Use ampscript to check data extension has an EmailAddress field

I've got a custom process which allows users to match manually uploaded data to SF ContactID values. It relies on the EmailAddress field being called EmailAddress and having the correct field type to ...
TCassa's user avatar
  • 878
0 votes
0 answers
33 views

update preferences from a community page to salesforce marketing clouds data extension

I would like to know if I could update the preferences of a subscriber from the community clouds page to SFMC's Data Extension.
Lakshmi's user avatar
  • 11
0 votes
1 answer
78 views

How to update data on data extension using AMPscript?

I need help with updating existing data in a data extension. When a user clicks on an email link to change their status, I need it to be changed in the data extension. For example, if user A has ...
xhb's user avatar
  • 21
0 votes
1 answer
65 views

Pre Header in Salesforce

Ive created a data extension with several attributes , one of them being pre header. This is where my content lies. When I add ampscript in my email it pulls the pre header however when I do the real ...
Molo's user avatar
  • 23
0 votes
1 answer
31 views

How to find the Page ID of the same page where the AMP script is written

Print Page ID on Landing page using AMPscript I am in the process of creating a page to store information from customers who come to the landing page. I want to write it as follows, and I have had no ...
Minkyeong Kwon's user avatar
0 votes
1 answer
44 views

How to show place holder when value is ampscript?

When I want to see TT.MM.JJJJ as a default but because ampscript is used it shows dd/mm/yyyy I have added placeholder and timezone as well but it is not working. Could you please advise on that? set @...
Gokce Altunkanat's user avatar
0 votes
1 answer
48 views

Update the DE using Ampscript from Cloudpage

I've developed a landing page with two submit buttons, CTA1 and CTA2. When a user clicks on CTA1, data should be updated/inserted into DE1. Similarly, clicking on CTA2 should update/insert data into ...
Jain's user avatar
  • 1
0 votes
1 answer
65 views

Invalid index (parameter2) Passed to row function. Index must be less than or equal to the row count -

I am trying to display 3 hotel contents in a for loop but I am getting the error while previewing only for specific contacts. Not able to solve this. Any help would be greatly appreciated. This is my ...
Archana Selvakumaran's user avatar
1 vote
1 answer
80 views

Does SFMC Push Message support Amscript RaiseError Function?

thank you for your time. I wonder if Amscript RaiseError Function works for push message? I tried a few test and it's not working on my end, however I couldn't find any evidence that confirm or deny ...
Khoa Nguyen's user avatar
1 vote
1 answer
80 views

SMS Character Limit with AMPScript

We're using AMPScript to create a send log for all email and SMS sends. In MobileConnect, I can include the AMPScript and the SMS text fine and it's reported as one send however, when using Journey ...
James Lunn's user avatar
0 votes
1 answer
37 views

Upload resulting gif of AMPscript BarcodeURL() to content builder

I want to send a member card as barcode via SFMC/Whatsapp. However, Whatsapp content does not allow the use of the BarcodeURL() function to generate the barcode image. My plan now is to use a code ...
Arthur Noort's user avatar
1 vote
1 answer
85 views

Cloudpage doesn't retrieve the subscriber to update their preferences

I'm setting up a subscription center. It seems like my code works fine when I open the link from the preview email. It recognizes the subscriber and updates the record without any issue. However, when ...
AskingCore's user avatar
0 votes
2 answers
120 views

Cloudpage reloading causing duplicate triggered send

I'm having an issue whereby i have a 'thank you' cloudpage which customer lands on after submitting a form in email. The cloudpage then sends a triggered send email. The problem is that customers are ...
CRMdelaCRM's user avatar
0 votes
1 answer
42 views

Display no content if the condition is not met AMP script

I'm trying to build a dynamic email with different blocks displaying based on the if/else check. I can't understand how do I display nothing and go to the next step if the condition is not met. Here ...
Mikhail's user avatar
0 votes
1 answer
61 views

Strange behavior JSON data

In a data extension we receive some basic JSON data. Like this: [ { "adressoort": 1, "is_ontvangstadres": "true", "persoonsnaam": "Test", ...
Martijn e's user avatar
  • 143
1 vote
1 answer
60 views

Calling an External API using AMPscript in SMS Asset. Unable to reference Columns from Data Extension in Payload

I have the following codesnippet which I reference as content block by key in my SMS Asset. Unfortunately I am not able to get the price from the API. How do I make the payload dynamic such that it ...
aryashah2k's user avatar
0 votes
0 answers
45 views

AMPscript Code Email

Hi I have 2 Data extension Unique MO Credit Limit 80 out 100 used CCA 1001 I'm querying Unique MO and for each unique Mo i have multiple dealers data in 2nd DE which is Credit Limit 80 out 100 used ...
UTKARSH SINGH's user avatar
0 votes
0 answers
106 views

Passing info from a smart capture form into the thank you page

I've created a Data Extension with 14 fields in it. I've used that data extension to create a Smart Capture Form/Cloud Page. Under the submit options there are the Confirmation Message and URL ...
Jason G's user avatar
0 votes
0 answers
44 views

Javascript variable not being passed to ampscript when using Save button. The form should not be submitted

<form> <input id="firstName" name="firstName" type="text" placeholder="First Name"> <input id="lastName" name="lastName" type=...
James S's user avatar
0 votes
0 answers
66 views

Unable to create html email asset in SFMC using REST API

I am trying to create an html email, which is already stored in a field of one of my Data extension. The email is retrieved correctly and even i am able to print it in cloud page, but i am getting bad ...
arjunmn's user avatar
0 votes
1 answer
40 views

Inserting data from data extension into email using ampscript

I'm trying to create a report like email that will send an email to me that includes all the data in the data extension. When I run do preview and test the email, I get the fall back message - No ...
Gbengoose Wuru's user avatar
1 vote
1 answer
154 views

Dynamic Preheader not rendering

I am aware of the bug about the preheader which is not displayed once the email is sent. I would like to render a dynamic preheader based on a field on a DE. My email is structured as follows: I have ...
Maria's user avatar
  • 15
0 votes
1 answer
43 views

profile center ampscript not working

I build a profile center using ampscript and cloudpage, I tried to update all subscribers status use below code but it did not update the subscriber's status at sfmc: IF RequestParameter("...
user3277721's user avatar
0 votes
1 answer
60 views

Prepopulate SmartCapture Form with AMPscript

I am trying to prefill a SmartCapture form using AMPscript and I am not sure why it is not working. In my org the API field Name for the contact Id is ContactId18digit__ Here is my code: %%[ VAR @...
AllMight's user avatar
0 votes
1 answer
49 views

Ovewrite a data extension field in the send log

I am trying to overwrite the data that comes into the send-log from a Data Extension field on an email send. I've researched UpdateDE but I'm not trying to permanently alter the data extension. I'm ...
Jason G's user avatar
0 votes
1 answer
67 views

How to stop AmpScript from using ELSE statement as primary value?

I am changing marketing emails to ampscript so there will be fewer steps in the future when editing emails across multiple languages. The Data Extension this pulls from has subject lines in multiple ...
Bulldogstall's user avatar
0 votes
1 answer
63 views

Updating data extension with ampscript: Invalid object property name. Object Type: System.String Property Name: Id

I have a cloud page with form where I collect some data into DE. I have to use automation to update Contact id if same email exists in SF if not I have to create contact and populate the DE. I have ...
cameron harwood's user avatar
0 votes
1 answer
102 views

How to change AMPscript logic such that it results in a one-click unsubscribe?

%%[ /*AMPSCRIPT PROCESSING GOES HERE*/ /*GRAB SUBSCRIBER INFO*/ SET @email = RequestParameter('emailaddr') SET @subKey = RequestParameter('_subscriberkey') SET @result = RequestParameter('result') ...
Faseeh Ur Rehman's user avatar
0 votes
1 answer
89 views

OMM_FUNC_SYNTAX_ERR ON UpdateSingleSalesforceObject and repeating parameters

I have a cloudpage which collects information by html form to DE. I have SubscriberKey, EmailAddress, FirstName, LastName, Study_Program_Type, Date_time, ContactId, Program_Duration columns and ...
cameron harwood's user avatar
2 votes
1 answer
69 views

How do you only display decimal places if they aren’t zero?

I have numerical data being passed into an email to two decimal places, it could be 10.00 or 10.16 for example. Is there a way I can easily show just 10 if the original number is 10.00, but show 10.16 ...
John D's user avatar
  • 23
-1 votes
1 answer
120 views

Unique Clicks per Subscriber and Unique Clicks per subscriber per link/url

I am trying to achieve following results using SFMC data views and SQL but unable to produce a query that can meet all these requirements in one piece of code. Also, my requirement is to create a net ...
Pardeep Singh's user avatar
0 votes
2 answers
51 views

Load information into CloudPage form

I have a cloudpage in sfmc with a form to update some customers' information. The function is to pass the subscriberkey parameter in the URL and search Salesforce for this ID. Check if this ID exists ...
Daniel Tazinaffo's user avatar
0 votes
0 answers
85 views

How to capture Contacts and Leads with AMPscript CreateSalesforceObject in Marketing Cloud?

I am trying to capture Leads and Contacts using the CreateSalesforceObject. However, with my code so far, I am only able to capture Leads. What I want to achieve is that whenever someone submits a ...
AllMight's user avatar
-2 votes
1 answer
67 views

An Ampscript loop that will show columns in a foreach instead of rows

I don't think this is possible, but has anyone ever created an ampscript loop that went on column data instead of row data in a lookup data extension? I was thinking of using a BuildRowsetFromString ...
scoopzilla's user avatar
0 votes
0 answers
53 views

Proposal for Ensuring Clean Data in SFMC: Email Address Validation

We've identified a significant number of email addresses in our SFMC org that have been bounced or suppressed due to List Detective. To ensure a clean and accurate database, we have recently cleansed ...
Ranjan's user avatar
  • 67
0 votes
1 answer
141 views

Capture Data on Thankyou page after Smart Capture form submit

I’m trying to find a workaround to capture submitted Smart Capture form values and passing them onto another DataExtension in addition to saving it to the DE that was initially defined in the ...
Yevgeni Y's user avatar
0 votes
1 answer
39 views

problem with AMPscript - deletedate function

I'm trying to use DELETEDATA function in AMPscript in unsubscribe process in order to remove record from 2 places ( Data Extensions) AMPscript code is not working when adding this part: SET @TCX_LOCAL ...
Natalia's user avatar
0 votes
2 answers
74 views

500 internal error at profile center

I try to build a profile center in marketing cloud cloud page, but got this 500 internal server error" is there anything wrong with my amp script my ampscript: %%[ SET @contactId = Id IF NOT ...
user3277721's user avatar
0 votes
0 answers
64 views

Hide\Delete Smart Capture specific Element, based on Cloudpage parameter

First of all, i'm not a developer but a good learner (thanks to comunities like this!). And i know: smart capture forms are a great challenge (and a risky one). This is my context: two different ...
pdb9000's user avatar
0 votes
1 answer
40 views

Trying to use contains in Ampscript

I am trying to find the values in a string using Indexof in ampscript. set @edt= "0,00" set @displaySaving='initial' if IndexOf(@entryDiscountsTotal,@edt) > 0 ...
Harsha S's user avatar

1
2 3 4 5
66