I'm not sure if what I am doing is possible but I would like to find out. I am connecting to my sandbox environment through the Force.com Streaming API (and Oauth2) using a Nodejs server and the nforce library.

Is it possible to detect changes in a Case using the Streaming API if only an attachment is added, changed, removed or in any other way modified? Is it an nforce issue where it only picks up specific API triggers? For the case, it will fire on anything under Case Detail and Additional Information edits, but will not fire on Solutions, Open Activities, Activity History, Case Comments or Attachments. How can I pick up changes to these parts of a case through the Streaming API (if it's even possible)?

The following is my current PushTopic:

pushTopic.Name = 'NAME';
pushtopic.Query = 'SELECT Id, Subject FROM case';
pushTopic.ApiVersion = 32.0;
pushTopic.NotifyForOperationCreate = true;
pushTopic.NotifyForOperationUpdate = true;
pushTopic.NotifyForOperationUndelete = true;
pushTopic.NotifyForOperationDelete = true;
pushTopic.NotifyForFields = 'All';

If this is not achievable through the Streaming API, is there an alternate method that I should investigate? What I want is the application listen for changes in the attachments for my cases and be notified when those changes occur.

1 Answer 1


Since I am looking for changes in attachments, I have decided to use APEX inside my SalesForce dev environment to implement an APEX trigger that would catch the inserted or updated attachments as they are being attached/changed.

trigger InterceptAttachment on Attachment (before insert, before update) 
    //Do Stuff

From here I can have the trigger a change in the case by doing a simple update call and that will end up triggering the Streaming API. As far as I have seen in the documentation, the Streaming API does not support listening in on attachment changes at the time of this answer.

You must log in to answer this question.

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