4

I am trying to setup a filter for my triggered sends. I want to exclude all of my users who exist in a certain Data extension: "DE_1" and have the column 'Email_Hater' with value 'True'. DE_1 has two columns: Custom_ID (Text) & Email_Hater (Text)

I want to use an exclusion filter like this:

exclusion_filter='ROWCOUNT(LOOKUPROWS("DE_1", "Custom_ID", customid, "Email_Hater", "true")) > 0'

My custom_ID is hooked up with in my Contact builder, and I reference it a lot in my amp-script emails. However it looks like the exlusion_filter is not recogizing it.

I have used exclusion filter before using email address i.e.

exclusion_filter='ROWCOUNT(LOOKUPROWS("OPTOUTS", "EmailAddress", emailaddr, )) > 0'

However since DE_1 doesn't have email as a column, and it would be a trouble to add it, I was wondering if exlusion_filters can only reference ID's of the subscriber objects or something (i.e EmailAddress, SubscriberKey)

Thanks for the help!

  • Might be too obvious, it because customid appears to be misspelled in your first rowCount()? – David Jackman Feb 19 '16 at 14:09
  • 1
    No that query isn't copy and pasted, thanks for the catch though – dupes Feb 19 '16 at 18:58
0

Ampscript wont infer contact builder relations in many parts of the app. Eventually(tm), Guide Template Language will handle that. You'll need to recreate the relations with multiple lookups.

Another approach - you could utilize ampscript in the email to conditionally call RaiseError with the secondary argument set to 1:

RaiseError("Something ain't right",1)  

This will cause just that send to fail, but not kill the whole job.

From a best practices perspective, Triggered sends are ment to be very functional - the 'right' answer is that, if you dont want someone to get a triggered send, dont send the API call in the first place. That might not be relevant or easy with your use case, but i figured i'd call it out.

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.