Tutorial

  1. Home
  2. Docs
  3. Tutorial
  4. 24. How to use streaming api with Agent?

24. How to use streaming api with Agent?

Learning Objectives:-

This tutorial Describes:-

  • What is a streaming API?
  • Why do we need it?

What is Streaming API?

Streaming API is a feature used in Agent for real-time data change scenarios. When there is a new record inserted or a record updated on the Salesforce side, it automatically changes the data on the client-side. Use Streaming API to receive notifications for changes to Salesforce data that match a SOQL query you define.

The configuration of Streaming API in SFDC?

To enable the interface for Streaming API feature, go to outbound interface detail on Salesforce, in the Streaming and Bulk Configuration section. Check the Use Streaming API checkbox.

 

Before configuring Streaming API, there are some rules you must know:-

  • Use Streaming API: Enable streaming feature, so Agent will be able to subscribe to this interface.
  • Notification for fields: To change which fields trigger notifications. For example, the default is ‘Referenced’ which mean that the fields in the SELECT and WHERE clauses are evaluated. Notifications are generated for the evaluated records only if they match the criteria specified in the WHERE clause. Set this parameter to one of these values. The default is ‘Referenced’.
  • Notification For Operation:
  1. Create: Uncheck this parameter if you want to change the default behavior. The default behavior is set to true which mean that you will get a notification in case the record is created.
  2. Delete: Uncheck this parameter if you want to change the default behaviour. The default behaviour is set to true which mean that you will get a notification in case the record is deleted.
  3. Undelete: Uncheck this parameter if you want to change the default behavior. The default behavior is set to true which means that you will get a notification in case the record is undeleted.
  4. Update: Uncheck this parameter if you want to change the default behavior. The default behavior is set to true which means that you will get a notification in case the record is updated.
  5. Replay Option: This option indicates how the client, subscribed to the Push Topic,
    read the missing data in case it is online again after a failure.

For detail information:-
https://trailhead.salesforce.com/en/modules/api_basics/units/api_basics_streaming.

Streaming API rule:-

The following are examples of supported SOQL statements:-

  • Custom Object
  • Standard objects (may include custom fields): Account, Campaign, Case,Contact, Lead, Opportunity and Task.

The following SOQL statements are not supported queries:-

  • Queries without an Id in the selected fields list
  • Semi-joins and anti-joins
  • Aggregate queries (queries that use AVG, MAX, MIN, and SUM) COUNT, LIMIT,
    ORDER BY, GROUP BY, NOT, OFFSET, TYPEOF

For detail information about soql rule:- https://developer.salesforce.com/docs/atlas.enus.api_streaming.meta/api_streaming/supported_soql.htm

To subscribe in Agent:-

To be able to subscribe in Agent please run SKYVVA Integration Agent > Integration Wizard.

  • Choose your property file.

  • Go to interface detail by double click any interface in the interface list.

 

Was this article helpful to you? Yes No

How can we help?