0

I have an automation to send out the list of form submission in email to a list of internal contacts. The DE looks something like this:

Email | Campaign | Date
myself@team.com | Campaign One | 1 Jun 22
myself@team.com | Campaign Two | 10 Jun 22
other@team.com | Campaign Two | 10 Jun 22

I created a "Send Email Activity" and filtered out contacts from "Campaign One" under "Advanced Exclusions > Exclusion Script". However, it seems like myself@team.com was filtered out because the record is duplicated in the DE.

Question:

  1. What should I do to include contacts that appeared multiple times in the DE?
  2. How do I add multiple conditions? I tried using sometime like (AttributeValue("Campaign") != "Campaign One" AND AttributeValue("Date") != "1 Jun 22") but it doesn't work.

Exclusion Script

Any advice would be appreciated. Thank you.

3
  • 1
    "Campaign != 'Campaign One'" evaluates to "true" for anyone that does not have "Campaign One" as their Campaign. Only Campaign One records would be sent to. How do multiple clauses "not work"? Your example wouldn't evaluate to true for any of your sample records.
    – Macca
    Jun 21 at 8:19
  • It does not work because "myself@team.com" exist for both "Campaign One" and "Campaign Two", so when Exclusion script excluded the record != "Campaign One", it somehow remove the same record from "Campaign Two".
    – Farrell
    2 days ago
  • Have you tried removing deduplication of subscribers for the send? My guess is deduplication's happening before the exclusion's applied, so maybe you're just left with the first record that's excluded.
    – Macca
    2 days ago

1 Answer 1

0

If you'd like to prevent sends to anyone that has a Campaign value of "Campaign One" or if they have multiple entries in the DE, then you could do something like this in your Exclusion Script:

AttributeValue("Campaign") == "Campaign One" 
OR rowcount(lookuprows("YOURDENAME","Email", AttributeValue("emailaddr"))) > 1

Since negative logic is confusing, I always use this mnemonic preceding my exclusion script conditional:

Exclude the send to this subscriber if ___ is true

Reference:

20220627 UPDATE

You can test exclusion script logic in your email by like this:

%%[

if AttributeValue("Campaign") == "Campaign One" 
   OR rowcount(lookuprows("YOURDENAME","Email", AttributeValue("emailaddr"))) > 1 then
  set @excluded = "true"
else
  set @excluded = "false"
endif

output(concat("<br>excluded: ", @excluded))

]%%

Once you've achieved the desired results, move what's between the if and then to your Exclusion Script.

2
  • If I use this logic, then it'll exclude contacts with "Campaign One", which is not the intent since this is "Exclusion Script", right?
    – Farrell
    2 days ago
  • I'm just providing an approach. I'll leave the criteria up to you. I've updated my answer with an example for testing in the email -- outside of the send definition. I find it easier to start there. 2 days ago

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.