Refining targets by excluding query results

Last update: 2023-09-22
  • Created for:
  • Beginner

Learn how to refine your target by applying a standard exclusion to a workflow. You will also learn how to create predefined filters and how to trouble shoot your workflow.


In this module, you will learn to apply standard exclusions and create a predefined filter. You will also learn how to troubleshoot workflow by examining its log. Exclusion activity is used to remove the results of query activities from the result of one main query that identifies your target population. The excluded queries identify people you don’t want to target. For example, you may want to exclude profiles that have been block listed, or that have opted out of email communications. In this example, the main query is targeting profiles that are 21 years of age or older, and there are 16,000 results. We want to exclude any profiles with empty email addresses from this population.

2000 profiles in the target don’t have an email address. So the final target population is 14,000.

Businesses typically abide by marketing best practices and have a standard definition of who they want to exclude from their target population, such as block listed profiles or the ones that have opted out of communication.

In Campaign Classic, these types of business rules are managed using typology rules and they’re applied just prior to the delivery being sent. Profiles that shouldn’t be targeted based on these rules, will be excluded from the final send list. However, as a best practice, you will want to exclude these profiles upfront in the targeting of your workflow. This will provide you with a more accurate estimate of the population that will be targeted in the delivery.

In Campaign Classic, filters allow you to apply these types of business rules within your queries. Campaign comes out of the box with predefined filters that you can use for your filtering conditions, such as block listed email addresses, or you can define your own filters and save them for reuse.

I’ll now show you how to apply standard exclusions within a Campaign workflow, how to create your own predefined filter and how to examine the workflow logs to troubleshoot workflow errors. In this example, we will continue building a workflow that we have started building in a previous module. We will add a query that excludes recipients that do not have an email address in their profile, as well as blocked list recipients.

We’ll start by creating a predefined filter for profiles with an empty email address.

So let’s get started. In Explorer, go to profiles and targets and select predefined filters.

On the right, click new and add a label.

You can see the document type as recipients, which means we are filtering on the recipients table. I will change the internal name as well.

To configure the conditions, is just like configuring the conditions in the query. So in the expression field, I will click on the edit expression button and then double click on email.

In the operator column, I will select empty.

Let’s check if we’re getting the correct results. Click preview, and then to add the email field, I just have to right click in the list and select configure list. And then I’ll double click on the email to add the column to the list.

And now we can see that the recipients do not have email addresses. So the filter is working correctly. I’ll click save.

Let’s go to the workflow.

In the Explorer, under campaign management, campaigns, I will select the marketing campaign the workflow is in.

On the targeting and workflows tab, I’ll select my Apparel Sales for Men workflow.

You can see that I have already created a main query and I’m going to add a third query. I can edit the query by double clicking. Now I will add the target selection. I can now use the predefined filter. So there is an add button here. And when I click the arrow, you can see that my predefined filter is listed. I will select the filter I created earlier. And now you can see the value of a predefined filter. Since this is a filtering condition that I will likely use for multiple campaigns, it really saves a lot of time, as I do not need to recreate it each time I want to use it with any one of my campaigns. Now let’s add the block listing filter. I can select the block listed email address that is available out of the box. I will change the operator to or. I’m using or here, because I would like to identify all profiles that either do not have an email or that are block listed.

I’ll have to save the workflow.

Next step, I will need to add an exclusion. So I’ll drag and drop it over from the pallet and attach it to the union.

And then attach the new query to it as well.

Let me start the workflow.

An error has occurred.

Let’s investigate the error. There are a few ways to do that. The first way is to right click on the exclusion and select display logs. This shows us the log messages related to the selected activity. So in this case, the exclusion. But I don’t want to troubleshoot just yet.

And let me show you another option to view the logs. At the bottom of the console, click on the journal tab. This now shows us the log messages for the whole workflow, not just the field activity.

Click on edit and we’re back on the workflow. And at the top of the workflow is an option to display the tasks and logs. So when I click on that, and then select the journal tab again, I will again get the list of all the messages for the workflow, but now I can filter on them. So I will click on my activity with the error and you can see that it will now display the message just for the activity I had selected. When you click anywhere in the workflow, not on an activity, the whole list will become visible again.

And you could see there are three types of messages. The first one with a red icon is an error. The ones with the blue call out bubble with the I in it, are just information. And the yellow call outs with the I are warnings. Okay, let’s take a look at our error.

It says, you must define the main set of exclusions. So what I didn’t do is set the primary set. So in the exclusion, I must say which incoming set is the main target population that the other set will be excluded from. So I’ll close the workflow logs and I’ll modify the exclusion. So double click on the exclusion activity. That way I can edit it. And then from the primary check dropdown, I’ll select the union, that’s our main target population. And we want to exclude the other query from the main target.

Now I’ll show you another way of validating results while you’re executing. First, I’ll right click on the exclusion and select enable but do not execute then I’ll restart the workflow.

I’ll hit yes. And what happened is that the workflow has executed all the way to the exclusion activity, but it’s not executing the exclusion activity itself. It’s paused before it.

So what this option does is it allows us to view the results that are coming from these transitions of the activities that are leading up to the exclusion activity. When you right click on one of the transitions and select display target, the results coming from the query are displayed. If you want to check the results, you can configure the list and let’s add the fields that we should be checking. So in our case, we will want to see the email addresses. And then we would also like to see if the block list attributes are correct. For this, choose no longer contact by channel.

So we can see in the results here that the profiles have yes, to be no longer contacted, which is correct. So let’s solidate for the email addresses. Actually, you can do that by sorting the email column. Now you can see that there are recipients that do not have emails. And even though they are no to the block list, they don’t have emails, so they’re added to this list. So we can see that it is either one or the other and our results so far look correct.

Now let’s finish executing the workflow. To do that, I will need to set the exclusion activity back to normal execution. However, I do not want to restart the workflow from the beginning, but I would like to move to the next activity from where we are. So to do that, I will right click again on the exclusion and then select normal exclusion. Once I’ve done that, I will need to save the workflow so that it picks up the last change I made. So once it’s saved, I can just click on start the workflow and it will complete by executing the exclusion activity. So it moves on from where it was on hold. And we can see that we have 6,456 recipients that will be targeted. And we can also see that it is less than the target population. So we know that some results have been excluded from the main list. As a best practice, let me stop the workflow. And that ends our exercise. -

On this page