Exclusion script not working for Journey builder send emails

Salesforce Asked by user6366199 on January 6, 2022

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

One Answer

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

Answered by Adam Spriggs on January 6, 2022

Add your own answers!

Related Questions

How to truncate a string to a specific length if it is longer?

4  Asked on February 10, 2021 by imajmdf


Update contact activity in Journey builder

1  Asked on February 10, 2021 by mary-jon


Hide iframe url

1  Asked on February 8, 2021 by cloudy-ritz


How can we add placeholder for lightning:InputField?

1  Asked on February 6, 2021 by aakash-poudel


LWC OSS Build Command

1  Asked on February 3, 2021 by scott-morrison


%%_PreHeader%% Personalization String

1  Asked on February 2, 2021 by victorcorey


Marketing cloud new Transactional Messaging API

1  Asked on January 30, 2021 by martijn-e


Can’t send to a list in marketing cloud?

1  Asked on January 30, 2021 by 4kaudio


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP