function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
osf_teamosf_team 

Streaming API : Pushtopic query limitations

Hi,

While reading the Salesforce Streaming API guide, I found the below restrictions:

1. To receive notifications on the IsClosed field, the subscriber must subscribe to the Status field referenced in the query.

2. To receive notifications on the WhoCount and WhatCount fields, the subscriber must subscribe to the WhoId and WhatId fields. Subscriptions based only on the WhoCount or WhatCount fields aren’t supported.

But, when I tried these scenarios, following were the results:

1. To receive notifications on the IsClosed field, the subscriber must subscribe to the Status field referenced in the query.
Analysis: I created a pushtopic with the following query : "Select id, isClosed, name from Opportunity", and I was able to receive notifications on workbench. Please note, I haven't subscribed to "Status" field, still I am able getting events from Salesforce.

2. To receive notifications on the WhoCount and WhatCount fields, the subscriber must subscribe to the WhoId and WhatId fields. Subscriptions based only on the WhoCount or WhatCount fields aren’t supported.
Analysis: I created a pushtopic with the following query : "SELECT Id, whoCount FROM Task", and I was able to receive notifications on workbench. Please note, I haven't subscribed to "whoId" field, still I am able getting events from Salesforce.

Is it like the document has not been updated with latest information, or I am missing something on my end?

Thanks
Shalindra Singh
ShashankShashank (Salesforce Developers) 
I tried the same in my test org and did not see the behavior you mentioned. I am using API version 33. Which version are you using?

It may also be possible that changing the stage of the opportunity is, due to a trigger or a workflow rule, changing the name of the opportunity. In this case, the behavior you mentioned in expected.