0

enter image description hereI have a flow that I built to put several roll-up summaries on a custom object with a lookup relationship to the contacts object. And because that flow was working so well. I also used to run some calculations on the numbers in the roll-up summary fields to generate analytics.

The flow is autolaunched. When there is a change to a contact it loops through all contacts assigned to that owner counts them, counts the sum of the scores from Pardot, the sum of email opt outs and the sum of records created in the last 90 days. The flow is working fine. If I am in the sandbox and make a change to a contact. It fails when I try to do a bulk upload on all contact records. There are 36000 contacts and I wanted to fire the flow to update by uploading the IDs.

Should I break the flow up? Just do smaller uploads etc? There are 4 fields getting assigments and then 8 fields getting fast updates.enter image description here

0

1 Answer 1

2

The issue

You're summing all of an owners contacts per contact which means you're very very likely updating the same records multiple times.

Reverse your logic

Change your logic around so that instead of firing it when you upload the contacts, upload your contacts and then fire it once from the parent record so that you only update the records 1 time each.

I can definitely understanding wanting the flow for when contacts are created/updated 1 at a time by a rep, but during bulk operations it's super inefficient. Understanding these are 2 different use cases and adjusting your needs accordingly is a must.

Disable Triggers

You can also consider turning off the contact/account triggers during the upload; however, this is more challenging in prod unless you have a custom setting set up like we do. This also doesn't work if you need the trigger to run for whatever other reason.

Other Options

That being said, this is still a rather inefficient way to achieve what you want. There are a few tools available for rolling up data via look-up fields:

These handle the operations very efficiently and could also help fix your problems.

4
  • Thanks for the advice. How would I reverse the logic? Just change Process Builder to fire when the Custom Object is changed instead of when the Contact object is changed? Jun 13, 2018 at 17:14
  • That and update it to accept the ID of your custom object instead of the ID of a contact to that it queries the objects correctly.
    – gNerb
    Jun 13, 2018 at 17:19
  • That is working pretty well. Except for one rep with move than 3K contacts. Is that number always going to break the Flow or if I ran flows with fewer assignment fields would it solve the issue. Jun 13, 2018 at 18:50
  • I personally wouldn't use a flow for this as flows have proven to be inefficient. I would use one of the tools I liked. Those are pretty solid.
    – gNerb
    Jun 13, 2018 at 19:02

You must log in to answer this question.

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