7

I have an existing workflow rule on a custom object that fires on create or edit. The criteria looks for changes in specific custom fields.

When the criteria are meet the outbound message is sent to a web service containing a number of fields from the custom object.

The web service loops through all the notifications in the request and performs the appropriate actions. It then sends back a ACK.

This all works well, except if there are multiple objects updated in a single transaction.

For example:

List<CustomerObject__c> records = [Select Id, CustomField__c from CustomerObject__c];
for(CustomerObject__c record : records) {
    // Will trigger workflow
    order.CustomField__c = order.CustomField__c + 'Test';
}
update records;

Say there are 40 custom objects returned, this results in 40 outbound messages with 1 notification each rather than 1 outbound message with 40 notifications.
Update: The above statement isn't correct. I wasn't seeing the collections correctly in my logging. All 40 customer objects are actually correctly batched up into a single outbound notification.

I did see the idea Outbound Messaging Batch Size Limit Configuration which suggested:

... as of Winter 12, I can get upto 100 objects in a single outbound message.

I'd be happy with 100 for a start. How do I go about this?

1 Answer 1

4

You can't control this, the background delivery process will deliver whatever is ready the next time it checks, although it is unusual to not get bunched notifications when you update multiple rows in a single transaction.

3
  • Hmm. Maybe I am mistaken about how many records are in each Outbound Message. I'm going to run some more checks to make sure I'm not doing something stupid on my end. Mar 12, 2013 at 21:09
  • in my org, I updated 30 contacts in a single transaction and got 2 messages, 1 with 1 record and the 2nd with 29 records.
    – superfell
    Mar 12, 2013 at 21:40
  • Doh! There was a problem with my logging and I wasn't seeing the notifications as all coming from the same outbound notification. PEBKAC Mar 13, 2013 at 2:00

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.