Activation Studio works with the _Subscribers Data View to create segments. This means al contacts in in Contact Builder that are eligible to be emailed should be imported in to the All Subscribers List. Otherwise contacts could be missing in your segment.
To avoid this, it is best practice to create an Automation in Automation Studio that checks if all contacts that can be emailed are imported into the All Subscribers list. Follow the steps below to create such an automation.
Step 1: Create a Data Extension to store the contacts
- Create a new Data Extension and name it ‘import_SF_contacts’
- Create these fields:
- SubscriberKey (text)
- EmailAddress (emailAddress)
- Status (text)
You can import more fields, but these are the ones that are mandetory.
Step 2: Create a SQL activity to select contacts missing in the All Subscribers list
This is really depending on the specific situation within your company. Are there for example business rules that apply to eligible contacts? In the example below we query everyone that has an email address in Sales Cloud.
select
Contact_Salesforce.Id as SubscriberKey,
Contact_Salesforce.Email as EmailAddress,
'Active' AS status
from
Contact_Salesforce
left join _Subscribers
ON _Subscribers.SubscriberKey = Contact_Salesforce.Id
WHERE
_Subscribers.SubscriberKey is null
and Contact_Salesforce.Email is not null
Save the result of the Query Activity into the Data Extension above.
Step 3: Create a Data Extract Activity
- Navigate to Automation Studio >> Activities
- Create a new Data Extract Activity
- Use these properties:
- File Naming Pattern: sfcontacts.csv
- Extract Type: Data Extension Extract
- DECustomer Key: the EXTERNAL KEY of the Data Extension above
- Has Column Headers: true
- Save activity
Step 4: Create File Transfer Activity
- Create new File Transfer Activity
- Use File Action: Move a File From Safehouse
- File Naming Pattern: sfcontacts.csv (same name as above)
- Destination: ExactTarget Enhanced FTP
Step 5: Create Import File Activity
- Create a new File Import Activity
- File Naming Pattern: sfcontacts.csv (same name as above)
- Delimiter: Comma
- Destination: Subscriber List >> My subscribers >> All Subscribers
- When mapping the file:
- Create an export of your Data Extension
- Choose Map manually
- Map EmailAddress, Status and SubscriberKey
- Save Activity
Step 6: Create Automation
- Navigate to Automation Studio
- Create new automation
- Drag in the following activities
- SQL Query: step 2
- Verification: check if the count count is less than 1
- Data Extract: step 3
- File Transfer: step 4
- Import File: step 5
- Test your automation
- Choose a repeat interfal
- Save automation