This article describes the detailed steps to configure the replay options for a Connector listener. Instructions described in this article are for webMethods Product version 10.5 onwards.
Event Replay in Salesforce:
Salesforce supports guaranteed delivery of events from API version 37.0 onward. It does this by storing standard event volumes for 24 hours. Events are published to the event bus. In Salesforce each event is assigned a unique id stored in the ReplayId field of the corresponding event object. It mostly refers to the position of the event in the event stream. A subscriber can retrieve missed event objects using these ReplayId values.
For further information please go through the salesforce documentation:
- Create a Salesforce.com developer account.
- Create a push topic. Use the Developer Console to create the PushTopic record that contains a SOQL query.
- Open the Developer Console.
- Click Debug | Open Execute Anonymous Window.
- In the Enter Apex Code window, paste in the following Apex code, and click Execute
- Install the WmSalesforceProvider package of 10.4 or higher version from the TECHCommunity to your IS.
- Create a CloudStreams connection for Salesforce CRM connector (version 44.0 onwards) to connect to Salesforce.com by logging into the Integration Server Administrator.
- Create a Connector Listener for Salesforce connector using SoftwareAG designer (service development). Refer to article: How to configure connector listener for salesforce and get the notifications.
- In the listener, configure the Push Topic Name in the parameter tab as shown below to get the realtime notification for any salesforce object, for example: Contact.
- Go to Event tab of listener and configure the processing action for the incoming events by using the Add Action option.
- Once the listener is configured in designer, go to CloudStreams admin page and choose Salesforce CRM connector ( version 44.0 onwards).
- Go to listener tab and it will list your listener configured in designer.
- Click on the Configure button of the listener and provide the instance of your salesforce account in the Streaming API endpoint.
- Configure the replay option field as ALL to receive all the events in the 24 hours window.
- Save changes and enable the listener.
- Now create one Contact object in salesforce using Cloud Connector Service or at the Salesforce UI.
- Once the contact is created, the configured connector listener receives the notification and executes the configured action.
- Disable the listener and create 3-4 contacts object in salesforce. Since listener is disabled, it will not receive any notification.However once you enable the listener, you will receive all the notifications in the 24 hour retention window inclusing the missed notifications because replay option has been set as ALL for the listener.