Loading

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

Publiceringsdatum: Jun 9, 2025
Beskrivning
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.
Lösning

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


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

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

Step 4: Select GroupConnect in the Select a channel

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

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

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

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

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

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)
 

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.

Step 14: To identify "Who is present in All Contacts but not in All Subscribers", you can use below Sample SQL Query:

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!

__________________________________________

Written by: Nobuyuki Watanabe | Salesforce Answers Leader

Nobuyuki works at a Japanese Salesforce partner company, serving as a Marketing Cloud specialist. He has been deeply impressed by the Salesforce ecosystem and actively participates in platforms like the Answers Community. Furthermore, he has created numerous articles related to Marketing Cloud for Japanese users, generously sharing a wealth of knowledge with them
 

Submissions reflect only the opinions of the user who made available the Submission and not the opinions of Salesforce, regardless of whether the user is affiliated with Salesforce, and may contain or constitute products, services, information, data, content and other materials made available by or on behalf of third parties ("Third Party Materials).  Salesforce neither controls nor endorses, nor is Salesforce responsible for, any Third  Party Materials, including their accuracy, validity, timeliness, completeness, reliability, integrity, quality, legality,  usefulness or safety, or any applicable intellectual property rights. Any Submissions made available through any message board or forum in response to posted questions, or that otherwise purports to answer any questions, including any questions about Salesforce or Programs, are made available for your general knowledge only and should never be relied upon as answers to your specific questions (even if an answer is marked as a “best” answer or with any similar qualifications). You should always contact Salesforce support for answers to your specific questions. Salesforce has no control over Submissions, and is not responsible for any use or misuse (including any distribution) by any third party of Submissions.

If you have questions, tap into the wisdom of our entire Trailblazer Community here: https://trailhead.salesforce.com/trailblazer-community/feed

Knowledge-artikelnummer

000395932

 
Laddar
Salesforce Help | Article