Deleting Error Leads/Contacts

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • Answered
Hello,
We are running low on data space in Salesforce.  I noticed the Emma contact errors are syncing to Salesforce.  I'd like to delete them in SF, but I'm wondering - will the sync just recreate them?
Photo of Center for Executive & Professional Education CEP010

Posted 10 months ago

  • 0
  • 1
Photo of Heather Sturm

Heather Sturm, Integrations Support Specialist

  • 99 Posts
  • 3 Reply Likes
Hi!

Thanks for reaching out. Deleting the error contacts from Salesforce won't necessarily reduce the amount of storage that the integration uses. Typically, the two main sources of storage uses by the integration are "Emma Group Memberships" and "Emma Response Activities." 

If you have a lot of groups, and some of them are no longer in use, we'd recommend archiving the groups. This will remove the groups and the associated group memberships from Salesforce (though the contacts/leads will remain).

Each group membership takes about 2KB of storage in your Salesforce instance, so if you have 100 groups and each group has 1000 members, that is 2KB x 100 x 1000 = 20MB of storage.

We'd also recommend setting up a mailing purge schedule if you don't already have one set up - this can reduce the "Emma Response Activities" storage. Each open, click, etc takes up about 2KB of storage here as well.

All of that storage can add up. Additionally, if you are using the Create Activities option or the Emma Action Table, you may see the integration using more storage.

If you'd like for us to take a closer look at your Salesforce instance and help identify some ways for you to reduce your storage, please grant support access by following the instructions here.

Please also include your Salesforce Org ID so we can locate your account!

I hope this helps!
Heather
Hi Heather, 
That does help.  Yes, if your team could take a look, that would be terrific.  Incidentally, we do have 54362 error contacts from what I can gather, so would that equate to 54MB of data savings?  I'd still like to delete the errors from Salesforce since the errors have bad contact info anyway; no one will be able to reach them, so there's no point in them being in SF.  Will they resync though? 
Thanks again,
Justin
Photo of Heather Sturm

Heather Sturm, Integrations Support Specialist

  • 99 Posts
  • 3 Reply Likes
Hi Justin,

Removing the error contacts from the Emma Groups would be the best way to reduce storage here. It's not the contact itself that takes up storage, but rather the contacts' group memberships.

Alternately, you could archive the contacts from Emma. This will essentially remove them from their respective Emma groups, but will not delete them from Salesforce.

If you are trying to prevent them from returning to either audience, you'd want to archive them from Emma and delete them from Salesforce. 

I'm happy to take a look if you've granted access - could you provide the Salesforce org name or ID so that I can locate your account? Thanks in advance!

Heather
Here is our org ID:  00D41000000FFKX
Thanks, Justin! 

I took a look inside both accounts. It looks like there are closer to 30K in that error status - if you're adding up totals from group to group, you might get a higher number since members can be in more than one group.

Regardless, if you archive the error contacts from Emma, it will remove them from the corresponding Salesforce group(s) and thus save data from all of those memberships. This could end up being about 54MB if those members are indeed in more than one group.

To do this, you can go to Emma > Audience > View All Contacts (grey button on the right side of the page). Change the dropdown from "Selected Contacts" to "All Contacts" and choose "Delete them" followed by "Delete" to confirm you want them removed from all groups and the audience.

I did a small test and verified that the records won't sync back over. They will remain in the Salesforce audience, but the Emma Group Memberships will be deleted.

It looks like most of these are Salesforce leads in your case - I made a few reports in Salesforce to cross check numbers. I left them for your reference - Emma Leads in Error Status and Emma Contacts in Error Status.

I might also recommend turning off the "Create Activities" and the "Use Emma Action Table" options in Step 3 of Emma Setup.

The "Create Activities" adds completed Salesforce tasks for Emma Mailings to each record, and I noticed that "Tasks" are taking up a healthy percentage of your storage as well. If you don't need or rely on Salesforce tasks, you may be able to turn this off. 

Similarly, the "Use Emma Action Table" option collects granular data for each open & click of a mailing, which can add up over time. Without this turned on, the data is still collected, but is less granular. So, for instance, instead of indicating on my Salesforce record that I have opened your mailing multiple times, the data would simply show that I've opened it.

Lastly, you may wish to set up a mailing purge schedule in Step 3 as well. Emma retains mailing history for 18 months, regardless of what you choose here. If you don't need access to the Emma mailing information in Salesforce after "x" amount of days, you can set that time frame and click "Create Schedule" to activate it.

I hope this helps! These are recommendations for you that will help reduce storage, but are not requirements moving forward. All would depend on your specific use case and how you use Salesforce. Please let us know if you have additional questions or if you'd like further clarification on anything before proceeding!

Best,
Heather
(Edited)
Thank you for the help on this Heather.  I deleted the error contacts from Emma, but they haven't been removed from Salesforce.  Is there anything else I need to do to get this to sync over?  
Photo of Heather Sturm

Heather Sturm, Integrations Support Specialist

  • 99 Posts
  • 3 Reply Likes
Hi Justin,

By design, deleting the error contacts from Emma will not delete them from Salesforce - it will only remove them from the respective Emma Groups, which will reduce storage taken up by the group memberships.

If you want to remove those contacts from Salesforce, you'll need to perform that deletion from inside of Salesforce. 

That being said, I re-ran a sync of your audience to try and remove those error members from the groups inside of Salesforce, and it looks like the updating of the records was unsuccessful because of a validation rule that is requiring "Lead Source" to be populated before saving the record.

If you no longer need those members in Salesforce, I'd suggest mass deleting them using the reports you already have created in Salesforce. 

It may not make sense to go through the steps of making the leads editable and re-sync to remove them from groups, since you'll need to manually delete them from Salesforce regardless.

However, if you are editing leads in Emma and expect those changes to sync without issue moving forward, you may want to add the "Lead Source" to your field mapping in Step 2 of Emma Setup and make sure that "Lead Source" has an included Default Value. To add this, click on "Set Default Values" and then "Add New Default Field Value." Choose Lead Source and then select a value from your drop down menu. This value will be assigned to any new leads that enter Salesforce from Emma.



If you have additional questions, please let us know!

Heather
Thank you for all your help and recommendation.  I'm now getting an error and wondering if you could help.  

Is this related to the work we've been doing?  Could you suggest ways to resolve it?
Apex script unhandled exception by user/organization: 00541000002uhuq/00D41000000FFKX
Failed to process batch for class 'emma.EmmaConnectorMailingPurgeBatch' for job id '7074100004OYQNd'
caused by: System.DmlException: Delete failed. First exception on row 0 with id a0841000009k40WAAQ; first error: DELETE_OPERATION_TOO_LARGE, Cascade deleting too many records: occurring when cascading to Email Action records: []
Class.emma.EmmaConnectorMailingPurgeBatch.execute: line 19, column 1
Photo of Heather Sturm

Heather Sturm, Integrations Support Specialist

  • 99 Posts
  • 3 Reply Likes
Hi Justin,

Our developers recently identified and resolved an issue that was occurring when large amounts of records were deleted. It looks like your account is experiencing that, according to that error. If you'd like to regrant access to your Salesforce instance, I can install the update that contains the fix and verify that it resolves the issue in your account.

Alternately, you can use this link to perform the update yourself while you are logged into Salesforce as a System Administrator. You can choose "Install for All Users" when prompted. The next time the mailing purge cycle runs, you should no longer see that error. 

Let us know how you prefer to proceed!

Heather
(Edited)