How to store all "Contact Keys" within All Contacts into a Data Extension

How to store all "Contact Keys" within All Contacts into a Data Extension


No alt text provided for this image

Have you ever thought about storing all "Contact Keys" within All Contacts into a Data Extension?

As a use case for storing Data Extensions, for example, if you want to know "Who is present in All Contacts but not in All Subscribers", you can extract it by constructing an SQL query. (The SQL query is provided below.) Therefore, I will introduce the method of storing all "Contact Keys" within All Contacts into a Data Extension

Solution:

This method is very simple. In conclusion, when you create a Filtered Mobile List of the "GroupConnect" channel in Contact Builder, the Data Extension is automatically generated

Step 1: From the Marketing Cloud Application Switcher, select Contact Builder within Audience Builder

No alt text provided for this image

Step 2: Click on the All Contacts tab in Contact Builder

No alt text provided for this image

Step 3: Click on Mobile Lists and then click on the Create Mobile List button

No alt text provided for this image


Step 4: Select GroupConnect in the Select a channel

No alt text provided for this image

Note: If you create Filtered Mobile Lists for the MobileConnect or MobilePush channel, Data Extensions won't be created.


Step 5: Choose Filtered List as the list creation method. Then, click the OK button

No alt text provided for this image




Step 6: To set the filter criteria for creating the Mobile List, go to the Attribute Library, select System Data

Step 7: Click on Contact


No alt text provided for this image

Step 8: Drag and drop Contact ID in the Filter Criteria section


No alt text provided for this image



Step 9: Set the Filter Criteria as Contact ID is not null to extract all contacts

No alt text provided for this image


Step 10: Click on Save as Filter to begin saving the list

Step 11: Decide on a Name. In this example, I used "All_Contacts". Keep the Format as the default, and select Standard. Click the Save button


No alt text provided for this image


Step 12: After saving, the Data Extension is created in the Audiences folder of either Email Studio or Contact Builder. The name decided upon during the list saving will become the name of that Data Extension


Step 13: When you open the record of the Data Extension, you will find the Contact Key on the far left (referred to as SubscriberKey here)


No alt text provided for this image


 

Note: You can also export this Data Extension as a CSV file. Additionally, in this scenario, I extracted all "Contact Keys", but you can extract data according to your specific needs by modifying the filter criteria of the Mobile List. Feel free to utilize it as necessary.

Sample SQL Query: 

SELECT a.Subscriberkey
FROM All_Contacts a
LEFT OUTER JOIN _Subscribers b on a.Subscriberkey = b.Subscriberkey
WHERE b.Subscriberkey IS NULL        

You’re done!



Dilip Sharma

Marketing Cloud Consultant | Salesforce Marketer, Sawai Madhopur- Group Leader | Trailblazer Mentor | Marketing Cloud Practice | Pardot | #SFMC Expert

2mo

Felipe D. Thanks 😊

Like
Reply
Felipe D.

PhD researcher, Marketing Cloud Solutions Architect

2mo

Dilip Sharma great article!

Like
Reply
Maitri Parekh

Salesforce Marketing Cloud Developer

1y

I tried this one it work for my criteria. But, i want also the all EmailAddress so in that case what can i have to do 

Like
Reply
Nobuyuki Watanabe

Salesforce Marketing Cloud Consultant (Japan) | Trailblazer Community Forum Ambassador | Marketing Champion

1y

I appreciate that you covered this article! Dilip Sharma

To view or add a comment, sign in

More articles by Dilip Sharma

Insights from the community

Others also viewed

Explore topics