Integration Flashcards
You use Salesforce to manage customer cases. A customer service rep is on the phone with a customer working on a case. The customer makes a payment and the customer service rep needs to see a real-time update in Salesforce from the payment processing application.
Which pattern does this describe?
UI Update based on Data Changes
What is the recommended solution for the UI Updates based on Data Changes Pattern?
The Salesforce Streaming API using:
1- A push topic
2- Bayeux/CometD JS implementation
3- VF or Lightning component
4- JS lib included as a static resoruce
What are the benefits of using the Streaming API to update the UI based on changes?
No need to write a custom poller
No need to have the user manually poll
What are the limitations of using the Streaming API to update the UI based on changes?
1- Delivery of notifications isn’t guaranteed
2- Order of notifications isn’t guaranteed
3- Notifications aren’t generated from record changes made by Bulk API
A telecommunications company uses Salesforce to manage customer cases. The customer service managers want to be notified when a case is successfully closed by one of their customer service reps.
Describe what the solution for this use case would look like.
- Create a PushTopic that sends a notification when a case is saved with a status of Closed and resolution of Successful
- Create custom UI and subscribe the UI to the PushTopic Channel
- Implement logic in the UI that shows alerts generated by that managers reps
What are two implementation drivers for Streaming API solutions?
- Appliations that poll frequently
- General notification of data changes in the org.
T/F: A PushTopic can define specific criteria about which it will notify subscribers.
TRUE
What is Bayeaux?
A Protocol for transporting asynchronous messages, primarily over HTTP.
What is CometD?
A scalable HTTP-based routing bus that uses an AJAX push technology pattern known as Comet. It implements the Bayeaux protocol.
What five CometD methods are supported by the Streaming API?
Connect
Disconnect
Handshake
Subscribe
unsubscribe
What are two major differences between a PushTopic and a Change Data Capture?
PushTopic send only specific fields, wheereas CDC send all of the fields that changed.
CDC also sends details of the change in the header
What is the retention period for a PushTopic Event?
24 hours
What is the retention period for a Change Data Capture Event?
72 hours
What is the retention period for a regular Platform Event?
24 Hours
What is the retention period for a High-volume Platform Event?
72 hours
What is the retention period for a Generic Event?
1 Day
What are Generic Events?
Generic events send custom notifications that are not tied to Salesforce Data Changes
What is a replay ID and what is it’s impact on Event Durability?
The ReplayID is a value populated by the system to represent the event’s position in the event stream.
The replay even can be used to retrieve events that are within the retention window
True/False:
A subscriber can choose which events to retrieve as long as the event is within its retention window or starting after a particular event.
TRUE
What events will a subscriber receive by default after subscribing to a messaging queue?
The default is to receive only the new events sent after subscribing.
If there are ten messages in a queue, and a subscriber tries to replay events using the replayId of -1, what events will the subscriber receive?
the subscriber will receive all events after the client subscribes.
If there are ten messages in a queue, and a subscriber tries to replay events using the replayId of -2, what events will the subscriber receive?
the subscriber will receive all events that are within the retention window + all new events.
If there are ten messages in a queue, and a subscriber tries to replay events using the replayId of 5, what events will the subscriber receive?
the subscriber will receive events 6-10 (NOT 5) + all new events
What is a PushTopic?
What’s included?
A PushTopic triggers notifications for changes to Salesforce records resulting from a create, update, delete or undelete.
The PT Notification is based on the criteria specified in the PushTopic record and the SOQL query defined to retrieve the notification.