I have about 25,000 contacts who are not in Email, SMS or any known channel. I need to completely remove them from the system, but you can't query for them since they are not in a channel. I'm trying to use the API to retrieve them and I found this call which will retrieve contacts by Channel
Endpoint: /contacts/v1/addresses/search/Channel
Body:
{
"attributeName":"Channel",
"filterConditionOperator":"Is",
"filterConditionValue":"EMAIL"
}
If I remove EMAIL it will return everybody. That would work except that the call only brings back 50 contacts at a time, and I do not see a way of controlling which 50, otherwise I could write a loop to grab 50 at a time until I have them all.
Here is the documentation page for this which is only slightly helpful:
https://developer.salesforce.com/docs/api-explorer/sfmc/contacts/post-contacts-v1-addresses-search-attributename
I'm hoping there is more "off the books" knowledge on this as there are for some other Marketing Cloud items.
UPDATE: I actually did find a way to loop through all contacts. By setting the parameters page and pageSize and loop through, I was able to retrieve 500 contacts. Unfortunately, the returned data still does not have anything that allows me to differentiate who is in a channel and who is not.
/contacts/v1/addresses/search/Channel?$page=1&$pageSize=50
/contacts/v1/addresses/search/Channel?$page=2&$pageSize=50
etc, etc.
Best Answer
There's no way to query all contacts at the moment. You need to raise a support ticket to get an extract in a data extension. I described the reason and the way to proceed here.
With this base data extension you can use further queries to isolate the contacts that you want to delete.