Application Integration

Exploring SalesForce PushTopic Queries

We are studying how SalesForce is enabling users with the SalesForce Streaming API, and felt that the Salesforce PushTopic queries was worth a little more exploration. A PushTopic query is the foundation of what they consider to be a PushTopic channel, which defines any event that might occur via a SalesForce object when it is created, updated, deleted, or undeleted, which depending on the query will generate a streaming event and notification via any subscribed client.

Salesforce PushTopic queries use what they call SOQL to define each event, working very similar to SQL, and allowing you to select your object, and structure which fields are present, and the parameters of filter to apply when each event is triggered. Allowing a simple statement like

SELECT Id, Name, Status__c FROM InvoiceStatement__c WHERE Status__c = 'Open'

Which can become a notification event that can be streamed to any client, with the following structure:

{
     "channel": "/topic/InvoiceStatementUpdates",
     "data":
          {
          "event":
               {
               "type": "updated",
               "createdDate": "2017-11-03T15:59:06.000+0000"
               },
          "sobject":
               {
               "Name": "INV-0001",
               "Id": "a00D0000008o6y8IAA",
               "Status__c": "Open"
               }
          }
}

Exploring SalesForce PushTopic QueriesMaking for a pretty customizable, event-driven layer for the entire SalesForce platform. Ok, so why are we highlighting this on the Streamdata.io blog? Well, because we find it valuable to be up on the features of other streaming solutions, working to understand how they are driving value for their consumers. We are also interested in understanding how different streaming, and publish / subscribe models are implemented, so we can consider as part of the evolution of the Streamdata.io road map. Understanding the streaming API landscape, means our solutions are the best that they can be.

While Streamdata.io doesn’t have a publish and subscribe, or a query language layers yet, it is important for us to help our clients best understand what the possibilities are. Staying in tune with what our competition is up to, as well as understanding where the API sector is headed by learning from API pioneers like SalesForce. What SalesForce is up to reflects where the rest of the API sector is headed, and as many API providers are working to invest in their own event-driven architecture, we want them to consider using solutions like Streamdata.io to gain and edge, without all the overhead it would take to deliver on their own.

A Modern API Toolbox

**Original source: streamdata.io blog