Print this page

User-Initiated Email Exclusion Script example

Knowledge Article Number 000213279
Description
Check out this example of an Exclusion Script that can be entered when creating an Email Definition using Interactions in Marketing Cloud. 
Resolution


An exclusion script can exclude "All subscribers" or include "All Subscribers" with exceptions specified in the script. The examples below include or exclude Subscribers based on their Subscriber Key.
 

Exclude All Except


To exclude "All Subscribers" within the Data Extension Send except for the Subscriber with the specified Subscriber Key, use the script below. This would only send to Subscribers sent to in the Data Extension with the Subscriber Key "1234567."
 
_SubscriberKey != 1234567



Include All Except


To send to "All Subscribers" within the Data Extension Send except the Subscriber with a specified Key, use the script below. This would send to "All Subscribers" sent to within the Data Extension except the Subscriber with the Subscriber Key equal to "1234567."
 
_SubscriberKey == 1234567




promote demote