I have an existing journey in journey builder. The emails it sends now have to exclude people present on another data extension. Having never used exclusion scripts before, what would I need to write to exclude subscribers who appear in another DE?
-
How is your journey triggered? By API or through automation?– MaccaJul 18, 2017 at 16:20
-
This one is triggered by an automation which runs hourly, filtering another DE and firing every few minutes.– TCassaJul 19, 2017 at 8:04
-
You should use a query activity, then, to select who you inject into the interaction. Excision scripts are great, but not for this.– MaccaJul 20, 2017 at 15:15
1 Answer
An exclusion script is simply simply with certain conditions). Take for example, you want to exclude certain subscribers from a send, you can simply use this:
(ROWCOUNT(LOOKUPROWS("ExclusionDE", "EmailAddress", emailaddr)) > 0)
This assumes that you are currently compiling the subscribers you want to exlude in the ExclusionDE
. The script just check against email address to see if they are present. If they are, they will not be sent the email.
-
Thanks that looks good but shouldn't it be greater than or equal to rather than just greater than?– TCassaJul 18, 2017 at 12:58
-
-
1
-
2There are some cases
where > 1
is correct -- like when you're checking rows from a triggered send data extension. those rows are written before the AMPScript is evaluated. Jul 18, 2017 at 14:13