I'm using Salesforce Streaming API to handle agent status in a Call Center application, every time the agent make a call or is answering one agent status is changing and as I'm suscribed to a push topic it is generating event.

I would like to know how to avoid the limits or the best practices to use Streaming API.

I checked Streaming API limits information in this link (http://www.salesforce.com/us/developer/docs/api_streaming/Content/limits.htm) but maybe exist something that can give the best way to implement this approach.


1 Answer 1


You can take advantage of the URL parameters to get the right data for each of your agents. So instead of creating a PushTopic for each person, you can use one master PushTopic that lives around the appropriate interface and parameterize the client subscriptions.

You can insert a PushTopic like:

insert new PushTopic(
    Name        = 'Doers',
    Query       = 'SELECT Id, Doer__c FROM Object1__c', //WHERE <snip>
    ApiVersion  = 29.0


basic filtering available in the form:


Conditions can be combined by using an & for example:


This translates into OR condition: User__c == 005A0000000gqi6IAA OR Id == {ID-18Char}

This is not nearly as robust as MVEL operations but can help reduce the number of received events


You must log in to answer this question.

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