Salesforce Streaming API: Testing Push Topics Subscription Using Workbench
Looking for Salesforce Training & HandsOn Projects?
Trailblazer Profile | LinkedIn | Salesforce Blog | Facebook | Youtube Channel | WhatsApp Community
This article walks you through testing Push Topic subscriptions using the Case object and Salesforce Workbench, empowering you to experience the power of instant notifications.
Demo: Testing Push Topic Subscriptions
- Open a new tab in your browser and log in to your Salesforce org.
- Navigate to the Cases tab.
- Click New and create a new Case record. Make sure Case details fulfils the Push Topic Query Criteria
- Switch back to the Workbench window. You should see a real-time notification with details of the newly created Case (as per your SOQL query).
Push Topic Event Object
The Pushtopic Event object represents a notification sent
through your subscribed Push Topic channel whenever records matching your SOQL
query undergo a create, update, delete, or undelete operation. Each event holds
information about the data change, allowing you to react immediately and update
your applications or dashboards accordingly.
Here is the explanation on Key Properties:
- Id: Unique identifier for the event.
- Channel: Name of the Push Topic channel associated with the event.
- ReplayId: Unique identifier for the data change event within the channel.
- createdDate: Timestamp indicating when the event was published by Salesforce.
- type: The type of change that triggered the event ("create", "update", "delete", "undelete")
- sobject: (Optional) Present only for certain event types, it contains a single Salesforce object record matching the data change.
Conclusion
Testing Push Topic subscriptions in Salesforce Workbench gives you a practical understanding of this powerful notification system. By implementing these steps with the Case object, you can experience real-time updates and unlock the potential of data-driven decision-making. Remember, Push Topics are just one piece of the puzzle. Explore Change Data Capture for a complete historical record of data changes and gain even deeper insights from your Salesforce data.
Trailblazer Profile | LinkedIn | Salesforce Blog | Facebook | Youtube Channel | WhatsApp Community
Comments
Post a Comment