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 exclusion script are of type Boolean. Below is the code I am using

%%[ RowCount(LookupRows("WebianrDEFinal", "Active","true","Registered","true"))>0 ]%%

WebianrDEFinal is the name of my DE. The exclusion scripts remove all the subscriber and no emails are getting delivered from JB to any contacts, although there are contacts in the DE which do not meets the exclusion script criteria. If I change the code to

%%[ RowCount(LookupRows("WebianrDEFinal", "Active","true","Registered","true"))<0 ]%%

The emails are getting delivered to all the contacts without referring to the exclusion script. Someone could please help me to correct my script.

enter image description here

enter image description here


Try adjusting your lookups to use 1 or 0 instead of "true" and "false" strings.

RowCount(LookupRows("WebinarDEFinal", "Active",1,"Registered",1)) > 0

And do not use an AMPScript block (%%[ and ]%%). Those are implied.

EDIT: Looks like you may need to include the subscriber's email address in your exclusion script as well.

RowCount(LookupRows("WebinarDEFinal", "Active",1,"Registered",1, "EmailAddress", emailaddr)) > 0
| improve this answer | |
  • I used exactly the same code in my JB mail. The journey is showing 5 contacts entering the journey but none of the contacts are getting email. I cross verified from Tracking data info for JB sends, the send shows 0 mail sent. As per the data i provided 4 contacts should have received the email and 1 should be excluded via exclusion script. However none of the contacts are getting emails – user6366199 Jun 29 '16 at 13:09
  • What are the re-entry rules on your Journey? Are you testing with new email addresses each time? – Adam Spriggs Jun 29 '16 at 13:16
  • My entry event do not specify any criteria and all the contacts enters into the journey. Don't have any re entry rule either. Have attached the screenshot of the journey with event source for your reference. The contact re entry is set to re entry only after existing. Its a simple journey having an email with exlcsuion script. Unable to figure out why the script in not suppressing the emails. – user6366199 Jun 30 '16 at 5:32
  • When the Subscriber would be unsubscribed he would not receive the E-Mail. Have you checked the subscriber status of these contacts? (Only needs Tonne checked if commercial email) – Johannes Schapdick Feb 19 at 17:17

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.