0

I am trying to delete the contacts in data extension which should be removed from all sendable DEs and the All Contacts. Please note that I have already setup the contact configuration to zero days (Contacts remain in a suppressed status for 0days before permanent deletion.)

Below is the rest API call body

    {
        "deleteOperationType": "ContactAndAttributes",
        "targetList": {
            "listType": {
                "listTypeID": 3
            },
            "listKey": "External key of the data extension"
        },
    "deleteListWhenCompleted": false,
    "deleteListContentsWhenCompleted": false
    }

Response

    {
        "targetListInformation": {
            "listName": {
                "value": "contact_Deletion"
            },
            "listItemType": "ContactReference",
            "listContentsInformation": {
                "hasContactID": false,
                "hasContactKey": true,
                "isValidStorageType": true
            },
            "rowCount": 2646,
            "operationSupport": {
                "canDeleteList": true,
                "canDeleteListContents": true,
                "canClearList": true,
                "canCreateSnapshot": true,
                "canCreateSnapshotDuringApiCall": true
            },
            "listType": {
                "listTypeID": 3,
                "listTypeKey": "DataExtension"
            },
            "listIdentifier": "xxxxx",
            "listKey": "xxxxxx",
            "extendedArguments": {}
        },
        "suppressionType": "SuppressAllRequested",
        "operationInitiated": true,
        "operationID": 75,
        "priority": "Standard",
        "requestServiceMessageID": "xxxx",
        "responseDateTime": "2022-02-21T20:46:01.7021903-06:00",
        "hasErrors": false,
        "resultMessages": [
            {
                "resultType": "Validation",
                "resultClass": "Warning",
                "resultCode": "DeleteList.CanClear",
                "message": "This data extension will be cleared."
            },
            {
                "resultType": "Operational",
                "resultClass": "Information",
                "resultCode": "SourceSnapshot.TakenAtProcessing",
                "message": "The source data extension snapshot was not captured at the time of the request; The snapshot will be taken at the time of processing."
            }
        ],
        "serviceMessageID": "xxxxx"
    }

However when I see in the SFMC, only data extension which is cleared is the external key I supplied in API body. The data is still present in other sendable DEs and the all contacts.

Further when I did the Get on the Operation ID 75

https://{etdomain}.rest.marketingcloudapis.com/contacts/v1/contacts/actions/delete/status?operationID=75

I got below response with status as failed

{
    "operationMappings": [],
    "numberofRestorableDays": -1,
    "operation": {
        "contextType": 0,
        "isRestrictedForProcessing": false,
        "listTypeID": 3,
        "listIdentifier": "xxx",
        "listKey": "xxx",
        "listName": "contact_Deletion",
        "expectedListCount": 2646,
        "actualListCount": 2646,
        "deleteType": "ContactAndAttributes",
        "deleteListOnCompleted": false,
        "errorsOccurredInBatchProcess": false,
        "lastProcessedMilestone": "MovingBatchForProcessing",
        "suppressionType": "SuppressAllRequested",
        "operationID": 75,
        "eID": xxx,
        "mID": xxx,
        "employeeID": xx,
        "requestID": "xxxx",
        "status": "Failed",
        "priority": "Standard",
        "scheduledDate": "2022-02-22T02:46:01.653",
        "startDate": "2022-02-22T02:46:03.893",
        "endDate": "2022-02-22T02:46:04.757",
        "createdDate": "2022-02-22T02:46:00",
        "createdBy": xxxx,
        "modifiedDate": "2022-02-22T02:46:00",
        "modifiedBy": xxxx
    },
    "requestServiceMessageID": "xxxx",
    "responseDateTime": "2022-02-21T22:03:18.553864-06:00",
    "hasErrors": false,
    "resultMessages": [],
    "serviceMessageID": "xxxx"
}

2 Answers 2

2

Deletion is an asynchronous job and not instantaneous, even after suppression set to zero.

Depending of the size of your deletion request (1mio contacts at a time is the maximum number for a reason) and the number of sendable data extensions, likely also stack-related load, this can take a while.

You have to imagine that the system has to go through all sendable data extensions in a system and all backend tables and perform a database operation (deletion / anonymization) - this is, as far as I know, an operation that is done with lower priority so the DB is not noticeably slowed. The potential for this to happen isn't negligible in larger systems.

What I've done in the past to get an automatic indication of "where deletion currently stands" is, I automatically put all my IDs for deletion into two data extensions after starting the deletion itself:

  • One sendable (subject to deletion) a
  • One non-sendable (survives deletion) b

-> ran a regular LEFT JOIN WHERE a key is NULL sql query across the two. As long as deletion hasn't started (or reached these DEs), the result of the LEFT JOIN is zero, all data is in both DEs.

Once the result of that JOIN equals the number of records injected, deletion has at least come to the point where it has gone through some data extensions (including my sendable one a) for all contacts in deletion.

Of course you could also repeatedly call the status API and analyze the responses you get, but I liked to see movement in my data.

I also use the result of my LEFT JOIN as a history of all deleted contact ids for later analysis or reproduction.

As to your call being failed. Your deletion request looks completely fine, as you noticed it must also have started since your deletion DE is empty.

I would

a) wait and monitor as described.

b) if a) doesn't amount to anything after some days, involve SF support. they can likely tell you what happened in the backend, if you supply them the response. That actually looks pretty helpful for debugging on backend level, as it even includes the "last processing milestone".

2
  • Thank you Jonas. Actually this is a test account and I am trying to delete around 2600 records which exists in three sendable data extension. I also thought that status failed means that the call to delete contacts from All Contact failed. Do you have some more information what does the status failed means?
    – Chandan
    Feb 22, 2022 at 9:35
  • Not really. I can read as much into it as you can already guess :) - I haven't seen this happen before. like I suggested, support will be able to tell you more about what's going on in the backend. Feb 22, 2022 at 10:25
1

Seems like this was a backend issue and SFMC support was able to resolve it. They told us the following

Maximum Retry and MaxOperation Retry setting for your account did not help hence our team has updated some database settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .