For the managed package runtime, streaming API lets you push a stream of notifications from Salesforce to client apps based on criteria that you define. It has a persistent connection that continues to deliver new data as it becomes available, rather than using client polling. Polling is the most traditional way to get data from a data source that produces the stream of events and updates. The client makes requests periodically, and the server sends data if there is a response. In case there is no data to be sent by the server, an empty response is returned.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Streaming API uses push technology, a publish and subscribe model that transfers information that is initiated from a server to the client. Push technology transfers information that is initiated from a server to the client. This type of communication is the opposite of polling where a request for information is made from a client to the server. The main benefits of using the Streaming API are a reduced number of API calls and improved performance.
For details about the Streaming API, see the Use Streaming API topics and the Streaming API Developer Guide in the Salesforce help.
This illustration shows the difference between Polling and Streaming API:
Streaming API Types
The Vlocity Streaming API types include:
|
Type |
Description |
Example |
|---|---|---|
|
Streaming Channel |
The Streaming Channel API type uses the Streaming API to send notifications of general events that are not tied to Salesforce data changes. |
|
|
PushTopic |
A PushTopic is an SOQL query that returns a result that notifies listeners of changes to records in a Salesforce organization. The PushTopic defines a Streaming API channel. |
|
|
Platform Event |
Platform Events are part of Salesforce’s enterprise messaging platform. The platform provides an event-driven messaging architecture to enable apps to communicate inside and outside of Salesforce. A Platform Event combines PushTopic and Streaming Channel. Instead of working with an sObject, Platform Events work with custom objects. |
- Streaming Channel Data Source (Managed Package)
For the managed package runtime, the Streaming Channel API type uses the Streaming API to send notifications of general events that are not tied to Salesforce data changes. - PushTopic Data Source (Managed Package)
For the managed package runtime, the Streaming Channel API type uses the Streaming API to send notifications of general events that are not tied to Salesforce data changes. Use the Streaming Channel API when you want to send and receive notifications based on custom events that you specify. You can use Streaming Channel API for any application that sends custom notifications, such as a Chat application. Streaming API is known as Generic Streaming in Salesforce. - Platform Event Data Source (Managed Package)
For the managed package runtime, configure a Platform Event data source to enable apps to communicate inside and outside of Salesforce.