SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Streaming API-PushTopic
and Generic Events
SalesforceCodex.com 1
SalesforceCodex.com 2
About Me
Dhanik Lal Sahni
Technical Architect
Conduent Business Solution
Certified Application Architect
Twitter : @dhaniksahni
Blog : salesforcecodex.com
SalesforceCodex.com 3
Session 11-Agenda
• In a given scenario, recommend when to use API-based
integrations, such as SOAP, REST, Bulk, Streaming, Canvas,
Workflow outbound, APEX (Callouts, @ future, etc.), and
Lightning Connect to achieve business requirements.
• Compare and contrast the advantages and drawbacks (design
trade-offs) of using API-based integrations such as SOAP, REST,
Bulk, Streaming, Canvas, Workflow outbound, APEX (Callouts,
@future, etc.), and Lightning Connect.
28%
17%
15%
10%
15%
10%
5%
Integration Architecture
Designer Exam
1 2 3 4 5 6 7
Salesforce Integration Capabilities:: 28%
SalesforceCodex.com 4
AGENDA
• What is Streaming Event?
• Push vs Pull Technology
• Short Vs Long Polling
• Overview of Push Topic
• Overview of Generic Events
• Streaming Events Comparison
• Use Cases
SalesforceCodex.com 5
Streaming API
• Streaming API enables transmitting of real time data from Salesforce Platform
• Transmission of data done using push technology
• Push technology transfers information that is initiated from a server to the client.
• Provides a subscription mechanism for receiving events in near real time.
• Push technology also called the publish/subscribe model
Push Topic
Generic Event Platform Event
Change Data Capture
L
e
g
a
c
y
C
u
r
r
e
n
t
SalesforceCodex.com 6
STREAMING API USAGE
Platform to External App Platform to PlatformExternal App to Platform
SalesforceCodex.com 7
STREAMING EVENT TECHNOLOGY
Pull Technology
Push Technology • Notifications are sent to the subscriber in real time.
• No pooling required.
• Clients request data from the server periodically.
• Clients poll the server for data updates, and freshness of data depends on the
poll frequency.
• Clients can make excessive calls and cause server slowdown.
SalesforceCodex.com 8
MECHANISM OF STREAMING API
Short Polling
Long Polling
• Clients send requests for information but with the expectation the server may
not respond immediately.
• Server respond when data is changed for object
• Long polling supported using Bayeux Protocol or CometD
• Client keeps sending request to make active connection
• To enable Publisher/Subscriber model, active connection is required between Salesforce and each client
SalesforceCodex.com 9
PUSH TOPIC
PushTopic events provide a secure and scalable way to receive
notifications for changes to Salesforce data that match a SOQL query
you define.
Use PushTopic events to:
Receive notifications of Salesforce record changes, including create, update, delete, and undelete
operations.
Capture changes for the fields and records that match a SOQL query.
Receive change notifications for only the records a user has access to based on sharing
rules.
SalesforceCodex.com 10
PUSH TOPIC
Create PushTopic PushTopic Name
PushTopic inserted
in database
Notification
condition/event
• All
• Referenced(default)
• Select
• Where
SOQL Query
SalesforceCodex.com 11
PUSH TOPIC SECURITY
• To receive notification user must have access to object
• Field Level Access required
• Only record where user has access will be returned
SalesforceCodex.com 12
Considerations - Multiple Notifications in Same Transaction
Streaming API Notifications
Sent in Reverse Order Within a
Transaction
• In general, event notifications are delivered in the order of record changes.
• When a record triggers multiple notifications within the same transaction, the
last notifications are delivered first.
Multiple Streaming API
Notifications for the Same
Record and Untracked Fields
If field change triggers other field changes on the same record, more
notifications are sent for those fields.
Only Last PushTopic
Notification Sent for the Same
Record
When multiple PushTopic notifications are generated for the same record within
about one millisecond and in the same transaction, only the last notification is
sent.
SalesforceCodex.com 13
PushTopic Streaming Allocation
Description Performance and
Unlimited Editions
Enterprise
Edition
All other supported
editions
Maximum number of topics (PushTopic records) per org 100 50 40
Maximum number of concurrent clients (subscribers)
across all channels and for all event types
2,000 1,000 20
Maximum number of delivered event notifications within
a 24-hour period, shared by all CometD clients
1,000,000 200,000 50,000 (10,000 for
free orgs)
Socket timeout during connection (CometD session) 110 seconds 110 seconds 110 seconds
Timeout to reconnect after successful connection
(keepalive)
40 seconds 40 seconds 40 seconds
Maximum length of the SOQL query in the Query field of
a PushTopic record
1,300 characters 1,300 characters 1,300 characters
Maximum length for a PushTopic name 25 characters 25 characters 25 char
SalesforceCodex.com 14
GENERIC EVENTS
Use generic events to send custom notifications that are not tied to
Salesforce data changes.
Use Generic Events to:
Publish and receive arbitrary payloads in JSON without a predefined event schema
Broadcast notifications to a target set of users, specific teams, or your entire org
Send notifications for events that are external to Salesforce
SalesforceCodex.com 15
HOW TO USE GENERIC EVENTS
1. A StreamingChannel that defines the channel, with a name that is case-sensitive
2. It is object and can be accessed from app menusStreaming Channel
Clients
Streaming Channel
Push REST API
One or more clients subscribed to the channel
Streaming Channel Push REST API to monitor and invoke push events on the
channel
SalesforceCodex.com 16
USE CASE -1
Robert is developing a custom app for a client, which is used by the
client’s service reps and displays a feed of case records from
Salesforce
Requirement:
• The feed stays up-to-date and displays the latest changes from Salesforce without the
need for reps to click the Refresh button.
• If a new case is assigned to a rep, the case is added to the feed.
• If the status or subject of a case is changed, the data is refreshed in the case feed.
• If a case is escalated, a red exclamation point is added to the case in the feed.
Stream Events to use : PushTopic
SalesforceCodex.com 17
USE CASE -2
Robert’s client wants a custom app that lets its users place orders for
parts.
Requirement:
• When a user places an order through the Salesforce app, the app notifies the external
parts supplier service.
• When the supplier ships the parts order, the Salesforce app is notified, posts a message
in Chatter, and updates a case.
Stream Events to use : Platform events
SalesforceCodex.com 18
USE CASE -3
Robert wants to develop an app for service reps that display
notification messages that the service rep manager sends from a
console app in Salesforce.
Example:
Robert’s manager can send notifications to specific reps about important events, such as
system maintenance announcements or warnings of a rep’s low number of resolved cases.
Stream Events to use : Generic Events
SalesforceCodex.com 19
USE CASE -4
Robert’s client wants an integration that synchronizes Salesforce
record data changes with their HR system, which is external to
Salesforce.
Example:
1. Every new or changed Employee__c record is replicated in the HR data store.
2. All Employee__c records are replicated along with their fields.
3. The replication is transaction-based. If multiple updates are in a single transaction, the
integration app sends these updates as part of one transaction as well.
4. If the data replication process fails, it’s possible to resume the replication from past event
notifications that are stored for up to three days.
Stream Events to use : Change Data Capture
SalesforceCodex.com 20
STREAMING EVENT - FEATURE COMPARISON
SalesforceCodex.com 21
STREAMING EVENT - FEATURE COMPARISON
salesforcecodex.com 22
Share some inspiring words about
@salesforcecodex on twitter
salesforcecodex.com 23
Keep Exploring. Keep Learning.

Weitere ähnliche Inhalte

Was ist angesagt?

Lightning web components
Lightning web componentsLightning web components
Lightning web componentsAmit Chaudhary
 
Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceJitendra Zaa
 
Salesforce Security Best Practices for Every Admin
Salesforce Security Best Practices for Every AdminSalesforce Security Best Practices for Every Admin
Salesforce Security Best Practices for Every AdminCloud Analogy
 
Salesforce apex hours : Introduction to external services
Salesforce apex hours : Introduction to external servicesSalesforce apex hours : Introduction to external services
Salesforce apex hours : Introduction to external servicesAmit Chaudhary
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce IntegrationJoshua Hoskins
 
Episode 10 - External Services in Salesforce
Episode 10 - External Services in SalesforceEpisode 10 - External Services in Salesforce
Episode 10 - External Services in SalesforceJitendra Zaa
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilitySalesforce Developers
 
REST API in Salesforce
REST API in SalesforceREST API in Salesforce
REST API in SalesforceVivek Deepak
 
Performing a successful technical debt assessment in Salesforce
Performing a successful technical debt assessment in SalesforcePerforming a successful technical debt assessment in Salesforce
Performing a successful technical debt assessment in SalesforceCoforge (Erstwhile WHISHWORKS)
 
Setting up Security in Your Salesforce Instance
Setting up Security in Your Salesforce InstanceSetting up Security in Your Salesforce Instance
Setting up Security in Your Salesforce InstanceSalesforce Developers
 
Automate All The Things with Flow
Automate All The Things with FlowAutomate All The Things with Flow
Automate All The Things with FlowSalesforce Admins
 
Flow in Salesforce
Flow in SalesforceFlow in Salesforce
Flow in Salesforcevikas singh
 
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)Yury Bondarau
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platformJohn Stevenson
 
Salesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best PracticesSalesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best Practicespanayaofficial
 
Best Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfBest Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfMohith Shrivastava
 
Salesforce Service cloud 3 presentation
Salesforce Service cloud 3 presentation Salesforce Service cloud 3 presentation
Salesforce Service cloud 3 presentation missmeryl
 
Advanced Uses of Salesforce's Login Flows
Advanced Uses of Salesforce's Login FlowsAdvanced Uses of Salesforce's Login Flows
Advanced Uses of Salesforce's Login FlowsSalesforce Developers
 
Demystify Salesforce Bulk API
Demystify Salesforce Bulk APIDemystify Salesforce Bulk API
Demystify Salesforce Bulk APIDhanik Sahni
 
Sharing and security in Salesforce
Sharing and security in SalesforceSharing and security in Salesforce
Sharing and security in SalesforceSaurabh Kulkarni
 

Was ist angesagt? (20)

Lightning web components
Lightning web componentsLightning web components
Lightning web components
 
Episode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in SalesforceEpisode 20 - Trigger Frameworks in Salesforce
Episode 20 - Trigger Frameworks in Salesforce
 
Salesforce Security Best Practices for Every Admin
Salesforce Security Best Practices for Every AdminSalesforce Security Best Practices for Every Admin
Salesforce Security Best Practices for Every Admin
 
Salesforce apex hours : Introduction to external services
Salesforce apex hours : Introduction to external servicesSalesforce apex hours : Introduction to external services
Salesforce apex hours : Introduction to external services
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
Episode 10 - External Services in Salesforce
Episode 10 - External Services in SalesforceEpisode 10 - External Services in Salesforce
Episode 10 - External Services in Salesforce
 
LWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura InteroperabilityLWC Episode 3- Component Communication and Aura Interoperability
LWC Episode 3- Component Communication and Aura Interoperability
 
REST API in Salesforce
REST API in SalesforceREST API in Salesforce
REST API in Salesforce
 
Performing a successful technical debt assessment in Salesforce
Performing a successful technical debt assessment in SalesforcePerforming a successful technical debt assessment in Salesforce
Performing a successful technical debt assessment in Salesforce
 
Setting up Security in Your Salesforce Instance
Setting up Security in Your Salesforce InstanceSetting up Security in Your Salesforce Instance
Setting up Security in Your Salesforce Instance
 
Automate All The Things with Flow
Automate All The Things with FlowAutomate All The Things with Flow
Automate All The Things with Flow
 
Flow in Salesforce
Flow in SalesforceFlow in Salesforce
Flow in Salesforce
 
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
Salesforce Security Model (Dmitry Goshko, Igor Haritonovich)
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platform
 
Salesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best PracticesSalesforce Flows Architecture Best Practices
Salesforce Flows Architecture Best Practices
 
Best Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdfBest Practices with Apex in 2022.pdf
Best Practices with Apex in 2022.pdf
 
Salesforce Service cloud 3 presentation
Salesforce Service cloud 3 presentation Salesforce Service cloud 3 presentation
Salesforce Service cloud 3 presentation
 
Advanced Uses of Salesforce's Login Flows
Advanced Uses of Salesforce's Login FlowsAdvanced Uses of Salesforce's Login Flows
Advanced Uses of Salesforce's Login Flows
 
Demystify Salesforce Bulk API
Demystify Salesforce Bulk APIDemystify Salesforce Bulk API
Demystify Salesforce Bulk API
 
Sharing and security in Salesforce
Sharing and security in SalesforceSharing and security in Salesforce
Sharing and security in Salesforce
 

Ähnlich wie Salesforce Streaming event - PushTopic and Generic Events

February 2020 Salesforce API Review
February 2020 Salesforce API ReviewFebruary 2020 Salesforce API Review
February 2020 Salesforce API ReviewLydon Bergin
 
Control your world using the Salesforce1 Platform (IoT)
Control your world using the Salesforce1 Platform (IoT)Control your world using the Salesforce1 Platform (IoT)
Control your world using the Salesforce1 Platform (IoT)InternetCreations
 
Integrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast Iron
Integrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast IronIntegrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast Iron
Integrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast IronProlifics
 
Integrating SFDC and Oracle ERP with IBM Websphere CastIron Appliance
Integrating SFDC and Oracle ERP with IBM Websphere CastIron ApplianceIntegrating SFDC and Oracle ERP with IBM Websphere CastIron Appliance
Integrating SFDC and Oracle ERP with IBM Websphere CastIron ApplianceSandeep Chellingi
 
ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)Salesforce Partners
 
Durable Streaming and Enterprise Messaging
Durable Streaming and Enterprise MessagingDurable Streaming and Enterprise Messaging
Durable Streaming and Enterprise MessagingSalesforce Developers
 
Forcelandia 2018 - Create lively lightning components with streaming api
Forcelandia 2018 - Create lively lightning components with streaming apiForcelandia 2018 - Create lively lightning components with streaming api
Forcelandia 2018 - Create lively lightning components with streaming apiAnshul Verma
 
Unlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with ConfluentUnlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with ConfluentAaronLieberman5
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsDreamforce
 
JDF18 - Connecting the customer success platform
JDF18 - Connecting the customer success platformJDF18 - Connecting the customer success platform
JDF18 - Connecting the customer success platformDeepu Chacko
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Appsdreamforce2006
 
Doctor Flow- Best practices Microsoft flow - Techorama 2019
Doctor Flow- Best practices Microsoft flow - Techorama 2019Doctor Flow- Best practices Microsoft flow - Techorama 2019
Doctor Flow- Best practices Microsoft flow - Techorama 2019serge luca
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014David Scruggs
 
Streaming in the Wild with Apache Flink
Streaming in the Wild with Apache FlinkStreaming in the Wild with Apache Flink
Streaming in the Wild with Apache FlinkKostas Tzoumas
 
3 reasons to pick a time series platform for monitoring dev ops driven contai...
3 reasons to pick a time series platform for monitoring dev ops driven contai...3 reasons to pick a time series platform for monitoring dev ops driven contai...
3 reasons to pick a time series platform for monitoring dev ops driven contai...DevOps.com
 
Enterprise API New Features and Roadmap
Enterprise API New Features and RoadmapEnterprise API New Features and Roadmap
Enterprise API New Features and RoadmapSalesforce Developers
 
Deep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDeep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDhanik Sahni
 
Partner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - AprilPartner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - Aprilconfluent
 
Living the DevOps Dream: Self-Managed Application Environments-as-a-Service
Living the DevOps Dream: Self-Managed Application Environments-as-a-ServiceLiving the DevOps Dream: Self-Managed Application Environments-as-a-Service
Living the DevOps Dream: Self-Managed Application Environments-as-a-ServiceVictoria Livschitz
 

Ähnlich wie Salesforce Streaming event - PushTopic and Generic Events (20)

No Refresh Needed
No Refresh NeededNo Refresh Needed
No Refresh Needed
 
February 2020 Salesforce API Review
February 2020 Salesforce API ReviewFebruary 2020 Salesforce API Review
February 2020 Salesforce API Review
 
Control your world using the Salesforce1 Platform (IoT)
Control your world using the Salesforce1 Platform (IoT)Control your world using the Salesforce1 Platform (IoT)
Control your world using the Salesforce1 Platform (IoT)
 
Integrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast Iron
Integrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast IronIntegrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast Iron
Integrating Salesforce.com and Oracle ERP Using IBM WebSphere Cast Iron
 
Integrating SFDC and Oracle ERP with IBM Websphere CastIron Appliance
Integrating SFDC and Oracle ERP with IBM Websphere CastIron ApplianceIntegrating SFDC and Oracle ERP with IBM Websphere CastIron Appliance
Integrating SFDC and Oracle ERP with IBM Websphere CastIron Appliance
 
ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)
 
Durable Streaming and Enterprise Messaging
Durable Streaming and Enterprise MessagingDurable Streaming and Enterprise Messaging
Durable Streaming and Enterprise Messaging
 
Forcelandia 2018 - Create lively lightning components with streaming api
Forcelandia 2018 - Create lively lightning components with streaming apiForcelandia 2018 - Create lively lightning components with streaming api
Forcelandia 2018 - Create lively lightning components with streaming api
 
Unlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with ConfluentUnlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with Confluent
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
 
JDF18 - Connecting the customer success platform
JDF18 - Connecting the customer success platformJDF18 - Connecting the customer success platform
JDF18 - Connecting the customer success platform
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Apps
 
Doctor Flow- Best practices Microsoft flow - Techorama 2019
Doctor Flow- Best practices Microsoft flow - Techorama 2019Doctor Flow- Best practices Microsoft flow - Techorama 2019
Doctor Flow- Best practices Microsoft flow - Techorama 2019
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014
 
Streaming in the Wild with Apache Flink
Streaming in the Wild with Apache FlinkStreaming in the Wild with Apache Flink
Streaming in the Wild with Apache Flink
 
3 reasons to pick a time series platform for monitoring dev ops driven contai...
3 reasons to pick a time series platform for monitoring dev ops driven contai...3 reasons to pick a time series platform for monitoring dev ops driven contai...
3 reasons to pick a time series platform for monitoring dev ops driven contai...
 
Enterprise API New Features and Roadmap
Enterprise API New Features and RoadmapEnterprise API New Features and Roadmap
Enterprise API New Features and Roadmap
 
Deep dive into Salesforce Connected App
Deep dive into Salesforce Connected AppDeep dive into Salesforce Connected App
Deep dive into Salesforce Connected App
 
Partner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - AprilPartner Connect APAC - 2022 - April
Partner Connect APAC - 2022 - April
 
Living the DevOps Dream: Self-Managed Application Environments-as-a-Service
Living the DevOps Dream: Self-Managed Application Environments-as-a-ServiceLiving the DevOps Dream: Self-Managed Application Environments-as-a-Service
Living the DevOps Dream: Self-Managed Application Environments-as-a-Service
 

Kürzlich hochgeladen

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Salesforce Streaming event - PushTopic and Generic Events

  • 1. Streaming API-PushTopic and Generic Events SalesforceCodex.com 1
  • 2. SalesforceCodex.com 2 About Me Dhanik Lal Sahni Technical Architect Conduent Business Solution Certified Application Architect Twitter : @dhaniksahni Blog : salesforcecodex.com
  • 3. SalesforceCodex.com 3 Session 11-Agenda • In a given scenario, recommend when to use API-based integrations, such as SOAP, REST, Bulk, Streaming, Canvas, Workflow outbound, APEX (Callouts, @ future, etc.), and Lightning Connect to achieve business requirements. • Compare and contrast the advantages and drawbacks (design trade-offs) of using API-based integrations such as SOAP, REST, Bulk, Streaming, Canvas, Workflow outbound, APEX (Callouts, @future, etc.), and Lightning Connect. 28% 17% 15% 10% 15% 10% 5% Integration Architecture Designer Exam 1 2 3 4 5 6 7 Salesforce Integration Capabilities:: 28%
  • 4. SalesforceCodex.com 4 AGENDA • What is Streaming Event? • Push vs Pull Technology • Short Vs Long Polling • Overview of Push Topic • Overview of Generic Events • Streaming Events Comparison • Use Cases
  • 5. SalesforceCodex.com 5 Streaming API • Streaming API enables transmitting of real time data from Salesforce Platform • Transmission of data done using push technology • Push technology transfers information that is initiated from a server to the client. • Provides a subscription mechanism for receiving events in near real time. • Push technology also called the publish/subscribe model Push Topic Generic Event Platform Event Change Data Capture L e g a c y C u r r e n t
  • 6. SalesforceCodex.com 6 STREAMING API USAGE Platform to External App Platform to PlatformExternal App to Platform
  • 7. SalesforceCodex.com 7 STREAMING EVENT TECHNOLOGY Pull Technology Push Technology • Notifications are sent to the subscriber in real time. • No pooling required. • Clients request data from the server periodically. • Clients poll the server for data updates, and freshness of data depends on the poll frequency. • Clients can make excessive calls and cause server slowdown.
  • 8. SalesforceCodex.com 8 MECHANISM OF STREAMING API Short Polling Long Polling • Clients send requests for information but with the expectation the server may not respond immediately. • Server respond when data is changed for object • Long polling supported using Bayeux Protocol or CometD • Client keeps sending request to make active connection • To enable Publisher/Subscriber model, active connection is required between Salesforce and each client
  • 9. SalesforceCodex.com 9 PUSH TOPIC PushTopic events provide a secure and scalable way to receive notifications for changes to Salesforce data that match a SOQL query you define. Use PushTopic events to: Receive notifications of Salesforce record changes, including create, update, delete, and undelete operations. Capture changes for the fields and records that match a SOQL query. Receive change notifications for only the records a user has access to based on sharing rules.
  • 10. SalesforceCodex.com 10 PUSH TOPIC Create PushTopic PushTopic Name PushTopic inserted in database Notification condition/event • All • Referenced(default) • Select • Where SOQL Query
  • 11. SalesforceCodex.com 11 PUSH TOPIC SECURITY • To receive notification user must have access to object • Field Level Access required • Only record where user has access will be returned
  • 12. SalesforceCodex.com 12 Considerations - Multiple Notifications in Same Transaction Streaming API Notifications Sent in Reverse Order Within a Transaction • In general, event notifications are delivered in the order of record changes. • When a record triggers multiple notifications within the same transaction, the last notifications are delivered first. Multiple Streaming API Notifications for the Same Record and Untracked Fields If field change triggers other field changes on the same record, more notifications are sent for those fields. Only Last PushTopic Notification Sent for the Same Record When multiple PushTopic notifications are generated for the same record within about one millisecond and in the same transaction, only the last notification is sent.
  • 13. SalesforceCodex.com 13 PushTopic Streaming Allocation Description Performance and Unlimited Editions Enterprise Edition All other supported editions Maximum number of topics (PushTopic records) per org 100 50 40 Maximum number of concurrent clients (subscribers) across all channels and for all event types 2,000 1,000 20 Maximum number of delivered event notifications within a 24-hour period, shared by all CometD clients 1,000,000 200,000 50,000 (10,000 for free orgs) Socket timeout during connection (CometD session) 110 seconds 110 seconds 110 seconds Timeout to reconnect after successful connection (keepalive) 40 seconds 40 seconds 40 seconds Maximum length of the SOQL query in the Query field of a PushTopic record 1,300 characters 1,300 characters 1,300 characters Maximum length for a PushTopic name 25 characters 25 characters 25 char
  • 14. SalesforceCodex.com 14 GENERIC EVENTS Use generic events to send custom notifications that are not tied to Salesforce data changes. Use Generic Events to: Publish and receive arbitrary payloads in JSON without a predefined event schema Broadcast notifications to a target set of users, specific teams, or your entire org Send notifications for events that are external to Salesforce
  • 15. SalesforceCodex.com 15 HOW TO USE GENERIC EVENTS 1. A StreamingChannel that defines the channel, with a name that is case-sensitive 2. It is object and can be accessed from app menusStreaming Channel Clients Streaming Channel Push REST API One or more clients subscribed to the channel Streaming Channel Push REST API to monitor and invoke push events on the channel
  • 16. SalesforceCodex.com 16 USE CASE -1 Robert is developing a custom app for a client, which is used by the client’s service reps and displays a feed of case records from Salesforce Requirement: • The feed stays up-to-date and displays the latest changes from Salesforce without the need for reps to click the Refresh button. • If a new case is assigned to a rep, the case is added to the feed. • If the status or subject of a case is changed, the data is refreshed in the case feed. • If a case is escalated, a red exclamation point is added to the case in the feed. Stream Events to use : PushTopic
  • 17. SalesforceCodex.com 17 USE CASE -2 Robert’s client wants a custom app that lets its users place orders for parts. Requirement: • When a user places an order through the Salesforce app, the app notifies the external parts supplier service. • When the supplier ships the parts order, the Salesforce app is notified, posts a message in Chatter, and updates a case. Stream Events to use : Platform events
  • 18. SalesforceCodex.com 18 USE CASE -3 Robert wants to develop an app for service reps that display notification messages that the service rep manager sends from a console app in Salesforce. Example: Robert’s manager can send notifications to specific reps about important events, such as system maintenance announcements or warnings of a rep’s low number of resolved cases. Stream Events to use : Generic Events
  • 19. SalesforceCodex.com 19 USE CASE -4 Robert’s client wants an integration that synchronizes Salesforce record data changes with their HR system, which is external to Salesforce. Example: 1. Every new or changed Employee__c record is replicated in the HR data store. 2. All Employee__c records are replicated along with their fields. 3. The replication is transaction-based. If multiple updates are in a single transaction, the integration app sends these updates as part of one transaction as well. 4. If the data replication process fails, it’s possible to resume the replication from past event notifications that are stored for up to three days. Stream Events to use : Change Data Capture
  • 22. salesforcecodex.com 22 Share some inspiring words about @salesforcecodex on twitter