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?