0

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?

3
  • How is your journey triggered? By API or through automation?
    – Macca
    Jul 18, 2017 at 16:20
  • This one is triggered by an automation which runs hourly, filtering another DE and firing every few minutes.
    – TCassa
    Jul 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.
    – Macca
    Jul 20, 2017 at 15:15

1 Answer 1

3

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.

4
  • Thanks that looks good but shouldn't it be greater than or equal to rather than just greater than?
    – TCassa
    Jul 18, 2017 at 12:58
  • Ah!!! good catch will update!
    – 0xsegfault
    Jul 18, 2017 at 12:59
  • 1
    > 0 works just as well :)
    – 0xsegfault
    Jul 18, 2017 at 12:59
  • 2
    There 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .