@marlowe-shaeffer
Hello miss Marlowe, happy to hear from you.
Ok, yes i have read the following already in the API…
In the API ref it states: If the contact is also a site member, the member must be deleted first, and then the contact can be deleted.
And yes, i used the new one (not the depricated one)…
https://www.wix.com/velo/reference/wix-crm-backend/contacts-obj/deletecontact
And yes, first i deleted the membership…(even gave it a little time-delay, without any luck…
At first the user should be deleted from the PMD, then from Contacts, if i understood the statement in the API right.
let msgPMD = await deleteCurrentUser(); console.log(msgPMD);
setTimeout(async()=>{let msgContact = await deleteContact(); console.log(msgContact);},1500);
PMD → PrivateMembersData
//Delete-User...
export function deleteCurrentUser() {
let user = wixUsersBackend.currentUser;
wixUsersBackend.deleteUser(user.id)
.then(()=> {let message="Your account has been deleted!"; return(message)})
.catch((err) => {console.log("Something gone wrong!!!"); return(message)});
}
CRM → Contacts
export function deleteContact(contactID) {
//const contactId = "43fd5f9e-d7d4-4a31-8bfc-3bdc180cc40a";
const options = {suppressAuth: true};
return contacts.deleteContact(contactID, options)
.then(() => {let msg="Contact deleted"; return msg;})
.catch((error) => {let msg=error; return msg;});
}
As already mentioned → Everythings works.
Contacts gets deleted.
Also deletion from PMD works well.
But only thing whats not working well → When you query CONTACTS → you get all contacts again (including the deleted one).
This is not the behaviour i was expecting. Here someone should take a coding hand on this issue and make some improvements.
And by the way… the coder who will improve it, perhaps also should take a look onto the inconsitent/incomplete → ROLE-API. Why???
Comparing with the BADGE-API → The ROLE-API is very poor! It should get the same possibilities like the Badge-API.
And a last little improving-suggestion…
When quering the contacts, a lot of informations are included YES, BUT very important ones are missing inside the query…
Including for example → ROLES / BADGES and surely more important things.
Either it should be able to get all this data from CRM or from PMD.
But either the one is possible, nor the other as i see it.
That means at the end both of DBs are inconsistent and useless, so you have to create a THIRD OWN DATABASE, where you have to store all needed/wanted user-data.
Just a suggestion 
To see where such things are needed, just take a look onto my already shown Login-Example.
Edit:
Yes i know there is a given possibility to get badges…
https://www.wix.com/velo/reference/wix-users-backend/badges-obj/listmemberbadges
But it could be better, already included in one of the mentioned DATABASES.
And for ROLES, there is even absolutely no given possibility in this direction.
Just the possibility to get ROLES per single user. 






