0

I am wondering if it’s possible to randomly select 100 rows from a Synchronized Data Extension over 500 thousands records, without adding extra columns to it and using ampscript to do so at send time? Based on the selection show those 100 rows a specific promo code.

  • You could do it with sql and populate a new de, and reference that in the send – EazyE Feb 28 at 2:18
  • @Gold If my answer helped, please mark it as accepted, so others can easily see this has been resolved. – Markus Slabina Mar 2 at 15:05
  • @MarkusSlabina : sure will do once I complete my test! – Gold Mar 2 at 19:23
2

As far as I know there is no straight forward approach using AMPscript and it won't possibly lead to the desired outcome anyways as the AMPscript will be evaluated for every email that is sent out, rather than per job.

Depending on how your sendout happens, there are a couple of approaches:

  • Creating a random data extension to select your lucky subscribers, who receive the coupon. Use this data extension for the sendout/selection and suppression if you also like to send to the rest of your subscribers.
  • Use an SQL query in an automation to randomly select your lucky subscribers. Use this data extension for the sendout/selection and suppression if you also like to send to the rest of your subscribers.
  • ..

The SQL could look something like this:

SELECT TOP 100
    Id,
    EmailAddress,
    FirstName,
    LastName
FROM
    Contact_Salesforce
ORDER BY newid()

Related documentation:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.