4

I have a process that fires upon creation of a custom object called Eventbrite Order Line Item (OLI). The OLI object has a lookup to contact and a lookup to campaign that are populated upon the creation of the record.

In the criteria step, I check that both lookups are populated, and then a Field Update takes text from a campaign picklist and assigns it to a contact picklist via a Reference in the process.

The app that the OLI is a part of (eventbrite sync) allows you to create OLI records individually or in bulk. The Process I've created works just fine when I create an Eventbrite OLI one at a time, but it throws an error whenever it's processed in bulk. Screenshots and error, below. The error is: Failed to update records that meet the filter criteria (otherwise it seems to be meeting all the criteria along the way). I've checked debug logs but it's a managed package so I only see that the queries are run.

What I've tried: I've tried checking the lookups are filled via a formula on OLI instead of w/ criteria in the process itself. I've tried chaining processes together by writing text from the campaign to an OLI text field first. I've even just tried writing a straight picklist value from the custom object to the related contact, with no reference to any other object. I've checked that there are no validation rules on Contact, and my user has permission to edit records owned by inactive users. I've reviewed as much data as I can think of--don't see anything that would stop a contact from being updated, and as I said, it works individually just fine.

Is there any good documentation on when Processes are still not builkified, or does anyone see what I'm missing? I can tell this definitely isn't bulkified, but I'd really like to know why, so I stop hitting scenarios through trial and error, and of course if there's anything I can do to fix this. THANKS!

Screenshot: Check lookups are populated & record needs updating Update Contact picklist w/ value from Campaign picklist

ERRORS-- All 200 errors look like this below (one per batch member, I assume; I can't control batch size):

Error element myRule_3_A1 (FlowRecordUpdate).
The flow tried to update these records: 003A000001sLEdBIAW. This error occurred: ALL_OR_NONE_OPERATION_ROLLED_BACK: Record rolled back because not all records were valid and the request was using AllOrNone header. For details, see API Exceptions.

Flow Details
Flow Name: Eventbrite
Type: Workflow
Version: 21
Status: Active
Flow Interview Details
Interview Label: Eventbrite-21_InterviewLabel
Current User: Percolator Consulting (005A0000005b7oA)
Start time: 2/21/2017 12:42 AM
Duration: 5 seconds
How the Interview Started
Percolator Consulting (005A0000005b7oA) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = a23A0000000TBdkIAG
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "2/21/2017 12:42 AM"
DECISION: myDecision
DECISION: myDecision2
Executed this outcome: myRule_3
Outcome conditions: and
1. {!myVariable_current.EventbriteSync__AttendeeContact__c} (003A000001sLEdBIAW) Is null false
2. {!myVariable_current.EventbriteSync__Campaign__c} (701A0000000GHSwIAO) Is null false
3. {!myVariable_current.EventbriteSync__AttendeeContact__r.Newsletter_List__c} (null) Does not equal {!myVariable_current.Campaign_Region__c} (Seattle)
Logic: All conditions must be true (AND)
RECORD UPDATE: myRule_3_A1
Find all Contact records where:
Id Equals {!myVariable_current.EventbriteSync__AttendeeContact__c} (003A000001sLEdBIAW)
Update the records’ field values.
Newsletter_List__c = {!myVariable_current.EventbriteSync__Campaign__r.Region_Vested2__c} (Seattle)
Result
Failed to update records that meet the filter criteria.
Error Occurred: The flow tried to update these records: 003A000001sLEdBIAW. This error occurred: ALL_OR_NONE_OPERATION_ROLLED_BACK: Record rolled back because not all records were valid and the request was using AllOrNone header. For details, see API Exceptions.
  • 1
    From my experience, Processes itself are not performing well in bulk processing - not always though, depending on a use case. – o-lexi Feb 21 '17 at 16:44
  • 1
    Thanks @Oleksiy. That is sometimes my experience, too, but just sometimes... I'd really like to know where/why/when so I don't bother starting from a process but still also start from a process when it's the easiest option. Clicks, not code, right? :) Thanks! – BRC Feb 21 '17 at 20:59
0

Look, maybe not helpful, but this is what I know and what I have found.

I would post this as a comment, but I don't have the rep to do that yet.

Processes are not good at bulkification. It's easy to hit an SOQL limit error on something that should take three queries. The way that a bulk process executes is very opaque - there is (as far as I can find) no documentation on this. So, that is one part of the problem.

The other half is the managed package you are updating. Many managed packages (even popular high-scale ones) are built with some pretty poor design/coding. The issue may easily drill down to a flaw with the managed package.

I would say contact the provider, but this is usually a waste of time. Are you able to try the same operation via apex?

Also, you cannot change the batch size of a process - this occurs at the default batch size of 200 - the same as any batchable class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.