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

how to reuse code in ampscript?

I have the following code in a Cloud Page %%[ var @avisoprivet1 @llamadas1, @sms1, @terceros1, @email1, @estado_cliente1 %%[IF NOT EMPTY(@avisoprivet1) AND @avisoprivet1 == &...
0
votes
2answers
30 views

SMS +Signs in Dynamic URL using bitly API in Ampscript

I am using the below code in SMS. However somehow the "+" sign in URL is being converted into %20, which is not being recognized by website. URL should look like this.. https://abc/apex/...
0
votes
1answer
377 views

Best Practice on sending an email confirmation from Marketing when an Order with multiple lines is created in Sales Cloud

What is the best way to send an order confirmation email from Marketing cloud when an order with multiple lines is created in Sales Cloud. Here we using two custom objects from Sales Cloud to capture ...
0
votes
1answer
21 views

How can I populate Bullet points through AMP script

I wanted to understand how I can populate bullet points through AMP script in an email when my imported file has a column of values separated like this below: hazelcast-hibernate5 (devOpsHazelcast);...
0
votes
2answers
28 views

can you create a content area on a page in the cloud? or only in Content Builder?

is a subscription center that receives the preferences in 5 variables per publication list as shown in the image, and from these preferences, it subscribes or unsubscribes the user from the ...
1
vote
2answers
98 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
47 views

Insert form fields in a data extension with AMP Script

I'm very new to AMP script and I'm having trouble setting up an HTML form in cloud pages that can pull all the record information in a DE. I also then want to use the DE to trigger an email. The form ...
5
votes
3answers
2k views

Decrypt a string encrypted by the EncryptSymmetric() AMPscript function using PHP

I read elsewhere in StackExchange that it's not possible to decrypt AES strings originating from AMPScript in PHP. Is this true? It seems that it should be possible with mcrypt. Also, part two for ...
0
votes
1answer
23 views

Use Dynamic content

I have a master DE with all interest, permissions etc. This is also an attribute group. I want to use a field in this master DE as a value for dynamic content.   I use a different DE to send the email ...
0
votes
1answer
23 views

Unable to Remove Duplicate records in Query Activity

I'm using the below query to fetch only the unique "emailid" field value but still I'm getting duplicates SELECT Distinct Emailid , EmailName FROM _job a WHERE a.SuppressTracking=0 and a....
1
vote
2answers
442 views

RetrieveSalesforceObjects where rowcount = 0

I've got this code segment in an SFMC cloud page: set @contactIDcheck = RetrieveSalesforceObjects('Contact', 'id, Only_Send_Monthly_Newsletter__c', 'Id', '=', @subscriberKeyForSSJS) IF (...
6
votes
1answer
819 views

How does Guide Template Language parse a straight JSON array?

I'm learning Guide, and I've been able to parse an array of objects... AmpScript: set @json = '[{"voucher":"123456789"}, {"voucher":"234567890"}]' Guide: {{.dataobject JsonVar type=variable ...
0
votes
2answers
29 views

Creating DE or Audience based on email link clicks? [closed]

I have a requirement. Whenever someone clicks a link in an email sent, an audience or a Data Extension needs to be created.Is this possible using Automation Studio? If not is there a specific ...
1
vote
1answer
452 views

LookupOrderedRows sort order

We have an AMPscript page using LookupOrderedRows() to create a list of resources ordered by the company name. I noticed that the list begins with a name starting with lowercase "a" then firms with ...
0
votes
1answer
378 views

Using AMP script vs SSJS in email template for an API callout

We have created a email and for which the content is populated from a external source and we are using API callouts.The response from the API callout is very huge JSON output which comes around 5000 ...
0
votes
1answer
435 views

AMPScript to change output of HTTPGet function

Is it possible to change the code of a page which is loaded into my email through a HTTPget() function? Example: There is a link with the parameter &id=[id]. Can I replace [id] for a variable? ...
0
votes
3answers
502 views

Submitting HTML characters to a Data Extension via Landing Page and SSJS

I have tried to push data to data extension through a landing page using SSJS. The form fields contain HTML characters (which will import to the Data Extension fine). I'm getting this error when I ...
0
votes
2answers
737 views

Building a Dynamic Table in Marketing Cloud

I am trying to build a table within Marketing Cloud, where I have three rows and 2 columns. For all records, there will be a value in both columns of the first row, however, for some this will be it,...
1
vote
0answers
49 views

Post custom HANDLER URL reCAPTCHA

I am trying to implement reCAPTCHA validation via Marketing Cloud - cloud page. I have used this guide to do that: https://ampscript.xyz/how-tos/how-to-implement-google-recaptcha-on-marketing-cloud-...
1
vote
1answer
22 views

Creating ampscript loop that will only show rows of data that contain a certain value

I have an xml field in a DE that contains order product data. I only want to show the products from that order that have an xml value ofclothing. Is there a way to write a loop to cycle through these ...
0
votes
3answers
783 views

Show dynamic content block based on date and last update

I have created a dynamic content block, which is meant to be added to our email template. It is a top banner, which should only be shown if a customer have made updates to their basket within the last ...
2
votes
1answer
379 views

AMPScript for product grid created from RSS feed

We would like to populate a product grid pulled from an product category RSS feed. Below is code pulled from the help doc for using RSS feed in email. Within the grid we need to include product's (...
0
votes
0answers
35 views

SFMC AMPScript Lookups in Multi Org Child Business Unit

Trying to use AMPScript to do a lookup in an email to populate various data. I'm using the synced data extension name, which because I'm using a multi org connector I'm getting this error message. The ...
0
votes
2answers
47 views

I am trying to update a field of a data extension via SSJS within a script in automation but it does not update me

Platform.Load("core","1"); var subs = DataExtension.Init('cambio_estado'); var data = subs.Rows.Retrieve(); try {for (var i = 0 ; i < data.length ; i ++) { var ...
0
votes
1answer
34 views

Smart capture - prefill form on external web page

Is it possible to create a smart capture form using cloudpages, prefill the fields in the same form (using process like outlined in the link below), and then embed the form on an external web page (...
1
vote
1answer
668 views

500 error on Cloud Page

Here is the code on my cloud page. I'm a trying to change the status of a campaign member to Responded if they click on the RSVP button in an email. I am getting a 500 error. Does anyone see ...
0
votes
0answers
22 views

how to update a status field from active to unsubscribed from a in javascript data extension [closed]

I have an automation that makes a query sql to select the subscribers who are active to a list of publication and I must disable them every day, I thought through javascript make a simple code that ...
0
votes
1answer
35 views

AMPscript loop function Question

Thanks for taking your time to review my question. We have a complex situation that we need to use ampscript to display different content based on the webinar attendance. The data is stored in Three ...
0
votes
2answers
37 views

Unable to display 0 value in the output

I'm displaying the record count of a DE Column, %%[ VAR @rows, @row, @rowCount, @ID SET @Lookup = "Yes" SET @rows = LookupRows("Job","Lookup", @Lookup) SET @rowCount = ...
0
votes
2answers
836 views

AMPScript try catch

I am using AMPScript in my email and some time it return error so my interaction journey failed. I have two questions. If I have 20 contacts to add to journey and one of the email going to fail due ...
0
votes
0answers
25 views

How to AES encrypt a link within Marketing Cloud and decrypt it in a third Party system [duplicate]

I currently have the following problem: I am working in a Marketing Cloud Email and need some of my customers attributes to be stored in a Json and then to be aes-256 encrypted. The resulting string ...
0
votes
1answer
42 views

SSJS is not printing variable value in cloudpage

I am trying to print the value of a SSJS variable in cloud page so that i can use it in my HTML to display over cloud page . but page keeps loading without any output. <body> <script runat=&...
0
votes
1answer
689 views

Exclusion script not working for Journey builder send emails

I am trying to use an exclusion script to exclude the contacts from the DataExtension marked as root. Refer to the screenshot of the data and DE structure. The two fields I am referring to in the ...
0
votes
1answer
29 views

HTTPGET function call to intranet api on landing page is giving remote name could not be resolved

I am using HTTPGET function call to my organization intranet api on landing page to get current logged in user details. When i am running the script on landing page it is giving remote name could not ...
0
votes
0answers
61 views

Update AMPScript functions not working in LINE message

Using journey builder we send both LINE and EMAIL communications on the same journey. Each contact key has more than one record and we need to send communication to all the records based on unique ...
0
votes
2answers
43 views

AMPScript IF statement or Loop?

I am hoping to get some help from you guys. We have a Scenario that we wan to send different content to people who attended our Web_Event. In this case, we have Event A, Event B, and Event C. For some ...
0
votes
2answers
49 views

Modified date of Records in Data extension using SSJS

I want to fetch the date when a data extension record was modified . I want to exclude all the records modified in last 15 days or DE itself if any of its record has been modified in last 15 days. I ...
0
votes
1answer
30 views

Marketing Cloud Ampscript to output latest data within time period issue

I have the below AMPScript that isn't quite right. What i want it to do is output data form a data extension that was added to the Data Extension within the last 24 hrs. I want to add the code to an ...
0
votes
1answer
33 views

Get Journey ID of SMS send using ampscript

I need to get the journey ID from SMS send so I created a code that should get the SendJobId set @jobid = AttributeValue('SendJobID') However I cannot retrieve any values. I was hoping to get the ...
4
votes
2answers
365 views

Using AMPScript to pull in RSS feed content in SFMC

I am attempting to pull in content from a blog feed using AMPscript but am experiencing some issues in attempt to do so. It is probably worth noting that all I need to pull in is the title, ...
0
votes
1answer
590 views

AMPScript gives an error about not able to find an attribute

I am trying to retrieve data from a synchronised data extension with AMPScript . I have a field named Contact__c which contains the contactID. This contactID is connected to zero, one or multiple ...
0
votes
1answer
58 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 ...
0
votes
1answer
674 views

Validate duplicate form information in a Cloudpage smart capture form

I've created a simple landing page in Cloud Pages using the new Content Builder editor. I've then created a simple smart capture form for a survey to send to customers. This smart capture form is ...
0
votes
1answer
31 views

Using if, elseif statement from LookupOrderedRow

I am having an issue with the script below. I need to get the VAR @topic to read the Topic_Name entry in the DE. If I use lookuprow function and select the DE, it works but if I use LookupOrderedRows ...
0
votes
1answer
30 views

How to retrieve random DE rows without matching criteria using AMP script?

I have a situation where we want to assign a CouponCode to anyone who registers through our web form. I am using a landing page with AMP script to insert the form filled into DE(Data Extension), ...
0
votes
2answers
376 views

Dynamic Image from DE fields and a default image

We have a requirement to show a dynamic image of a profile photo. There are a couple of approaches I can think of: 1. Upload the images to the porfolio (URL/firstname_lastname.jpg). Then build the ...
0
votes
1answer
508 views

How do I replace characters from dynamic variables in a loop?

I am trying to replace multiple special characters from dynamic variable in loop of products (set @product1 = Name® of Product One™, @product2 = Name® of Product Two™, @product3 = Name® of Product ...
1
vote
1answer
506 views

Issue with Dynamic Sender Profile in Triggered Emails

I want to dynamically change my From Email Address in the Sender Profile for a Triggered Send. I tried creating a dynamic sender profile using 'ContentBlockByKey' in the FromName and FromEmail. ...
0
votes
2answers
468 views

Data Extension Lookup returns nothing

I have a DE called content with the following 2 columns - language | text I need it to return the text from the text column when the language is en This is what I have, It validates and runs but ...
0
votes
1answer
23 views

statements if in ampscript within an html

good day I'm trying to activate or deactivate some checkboxes according to some specific rules, when I do it with only one checkbox it works perfectly <label class=""> <!--%%=v(@...

1
2 3 4 5
48