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? – Macca Jul 18 '17 at 16:20
  • This one is triggered by an automation which runs hourly, filtering another DE and firing every few minutes. – TCassa Jul 19 '17 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 '17 at 15:15

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? – TCassa Jul 18 '17 at 12:58
  • Ah!!! good catch will update! – Samuel Dare Jul 18 '17 at 12:59
  • 1
    > 0 works just as well :) – Samuel Dare Jul 18 '17 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. – Adam Spriggs Jul 18 '17 at 14:13

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.