DELETE Member Does Not Delete

  • 2
  • Problem
  • Updated 1 year ago
  • Not a Problem
 According to the api documentation, "The member, along with any associated response and history information, will be completely removed from the database."

This is not the case.


Here is what I have observed regarding deleting/archiving Members...

Deleting a member through the Api only archives it.
  1. DELETE https://api.e2ma.net/1780403/members/5722691251
  2. Response: true
  3. View Archived Items | Contacts in Emma ui.
  4.  Member is now in Archived Items
  5.  Attempt to retrieve Member using EmmaMemberId. GET https://api.e2ma.net/1780403/members/5722691251
  6.  Response: Entity not found
  7. Attempt to retrieve Member using EmmaMemberId and deleted query string. GET https://api.e2ma.net/1780403/members/5722691251?deleted=True
  8. Response: Member returned. deleted_at field is populated.

According to the api documentation (http://api.myemma.com/api/external/members.html), "The member, along with any associated response and history information, will be completely removed from the database."

This is clearly not the case.

Why does it matter?
It matters because if I add the Member back it basically "undeletes" it. What makes this bad is that the MemberSince field of the newly "added" member is the date the Member was originally added.

This means that any Triggers that are defined to react to that field, won't.

 Example:
  1. Add a Member.
  2. A Trigger that is configured to fire two weeks after the Member is added fires two weeks later.
  3. For whatever reason, the Member is deleted. This can happen for a number of valid business reasons.
  4. At some point (maybe a couple of years later) the Member is re-added. This also can happen for a number of valid business reasons.
  5. Since the MemberSince field of the "new" reflects the original add date (2 years ago) any triggers configured to fire based on that date will not fire accurately.  
It also matters because
It would be nice to not have the Archive full of Members we intended to completely delete.

Even if I delete the Member from the Archive through the Emma ui, the original (with the original MemberSince) comes back when I re-add it. So it appears that there is no scenario under which the Member is actually "completely removed from the database."

Proposed fix:
Completely delete the Member as the documentation states.
Photo of Transnetyx

Transnetyx

  • 3 Posts
  • 0 Reply Likes

Posted 1 year ago

  • 2
Photo of Grey Stepp

Grey Stepp, Support Team Manager

  • 1695 Posts
  • 135 Reply Likes
Hey there!  

Thanks so much for your detailed information, it’s super helpful for us.  There are a couple of things at play here that I want to address:


  1. The API documentation regarding this is apparently incorrect.  I checked in with our engineering team and confirmed that the way you described the process is the intended way for the API call to work.  
  2. The reason we do not actually clear out the ENTIRETY of a contact’s record and history is because we are required to hold on to Opt-Out data.  Since that’s the case, we don’t ever allow for the contact records to be completely deleted from our system.  
WHY IT MATTERS


  1. In your first example of “Why it matters” involving the “Member Since” field.  Emma’s automation workflows cannot actually be set to trigger based on the “Member Since”  date field.  
  2. So what I’m thinking we’re talking about here is an Automation workflow being triggered by a “/signup” call.  There are some specifics around allowing the SignUp trigger to work for existing contacts, as they are technically not “signing up”. 
  3. I’d be curious to walk through what your specific use-case is so that we can find a solution that works for you, with the right settings for the Workflow to ensure contacts can re-enter the workflow if necessary.  
  4. What I can tell you that may answer it for you is that for an existing contact to Re-Enter a workflow, there are a number of combinations that could work.  
    1. If the workflow is using the “All Signups” trigger, an existing contact can re-enter the workflow if they are brought in using the /signup call AND if they are added to a new group
    2. If the workflow is using a specific signup form as the trigger, then an existing contact can re-enter the workflow either by using the specific signup form or by using the /signup call AND adding to a new group.
Again, happy to take a look at your specific use-case and help get your goals met there!  


You are absolutely correct that the documentation doesn’t state that correctly, and I’ve reached out to my team here to get that corrected in our documentation.   


Cheers!

- Grey 
Photo of Transnetyx

Transnetyx

  • 3 Posts
  • 0 Reply Likes
Grey, this is very helpful. I was thinking the MemberSince was the date SignUp triggers used.

I have been experimenting with the signup call and everything is working great. During testing we have added and deleted quite a few members. Many of them will be re-added when we go live. I just wanted to make sure that when we added them again the triggers would fire correctly. 


  1. Archive test member through emma ui
  2. Create a group
  3. Use the api to get the groupid of the new group
  4. Through the api, use the signup call to re-add the member providing the groupid.
  5. The member is added to the group and signup trigger fires even though this same member had been added and archived in the past.
  6. So success! That is what I wanted it to do.
Another interesting test...
  1. Archive test member through emma ui
  2.  Through the api, use the signup call to re-add the member providing the groupid of the group the member was in.
  3. Email does not go out. My guess is that it is because I didn't remove the member from the group before I archived it. I tested this by archiving it again, then restoring it. It is a member of the group after being restored.
Again, thank you.
 
Photo of Grey Stepp

Grey Stepp, Support Team Manager

  • 1695 Posts
  • 135 Reply Likes
Yup!  those are correct... thanks so much for the feedback and the testing info.  

Cheers!

- G