How to select last order on SF Marketing Cloud?

I have a database consisting of over 1 million orders, I’m looking to select the last order (indicated by OrderDate) for a customer (indicated as CustomerID). Here’s what I’ve tried so far: SELECT MAX(ORDERDATE) AS ORDERDATE, ORDERID, ORDERITEMID, ITEMID, MENUITEMNAME, ITEMSIZE, CUSTOMERID, ORDERDATETIME, APPNAME, UNITID, UNIT_NAME, UNIT_DETAIL_NAME, SECTOR, STOREID, STORENAME, ADDRESS_COUNTRY, TRANSACTIONTYPEREFID, BRANDNAME, PAYMENTTYPE, VOLANTETRANSACTIONID, … Read more

SQL Query to pull only Hard Bounces?

I currently manually update a database by exporting bounced email addresses using the code below: SELECT DISTINCT UPPER(EmailAddress) as EmailAddress, SubscriberKey FROM _Subscribers WHERE Status = ‘held’ OR Status = ‘bounced’ We want to change this so we only get hard bounces and can still email addresses with a soft bounce. The BounceCategory column appears … Read more

Link disappears in only 1 section in Outlook ’16

I have an email that is populated via Dynamic Content and there’s just one section of the email where the URL disappears only in Outlook 16. If you “view source” the URL is there. If you click “View Online” the URL is there. The URL works just fine in other platforms. The HTML code has … Read more

How to URLencode a URL in ampscript?

I am trying to set URL in my ampscript, but it changes the “?” in the url into “&”. I tried to wrap the url between URLEncode(“www.sample.com?12234”) Answer According to documentation, you can choose multiple options on what an how to URL Encode your string. What you are looking for is probably this solution: URLEncode(‘http://example.com?p=exampl√©’,1,0) … Read more

can we Include naming convention in the Link Tooltip field for each link- for tracking the click behavior of a particular image

can we Include naming convention in the Link Tooltip field for each link- for tracking the click behavior of a particular image . what are the different methods would ensure click behaviour on these images if tracked with the naming convention Answer I believe what you are looking for is the alias attribute. <a href=”http://salesforce.com” … Read more

How can I render different content in a marketing cloud email based on the device type?

In the email body I have different content I want to show based on whether the device is android or iOS, is there an attribute available to create dynamic content for this logic? Answer Unless you have it stored inside of a DE that person X always (or as close to always as you can … Read more

Prepopulate HTML Text Area using AmpScript

I’m trying to Prefill a form in the cloud page by querying against salesforce campaigns and campaign members. I was able to set values for input fields just fine using amp script variables. For Text area when doing same way as the input fields it actually inserts placeholder special characters but not the actual values. … Read more