The Salesforce Streaming API has been out for a while, and it can do some crazy great things.

But have you — yes, you — have you actually tried it?

Unless you’ve had a specific use case, it’s possible that you, like me, had nodded along a bit and promised yourself you’d get to it when you had a few spare cycles.

Well my friend today is your lucky day, because I have created the simplest possible Streaming API Example for your enjoyment.

Getting started is easy:
 

  1. Make sure you are working in a developer org.
  2. Install the unmanaged package.
  3. Select the new app, LAB Streaming API Demo.
  4. Click the Insert a Push Topic Button.
  5. Login to the same account on a different browser and start inserting or updating accounts.

Voila!  You can now see the Streaming API in action.  Feel free to modify the code and play around as you like.  Try it with Opportunities instead of Accounts.  Try it with more fields.  (Be sure to update the PushTopic or insert new ones using the Dev Console or Workbench.) Put some processing on the front end rather than displaying it as is.  You get the idea.  You’ll also want to check out the docs for details on supported and unsupported query types.

And for next steps, be sure to check out the inimitable Pat Patterson’s Event Driven Programming session from DF11 to get more ideas on how you can use it.

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS