I have Salesforce system with clients data and Cases(client issues). I would like to extend some functionality of Salesforce and integrate the Cases with our external System. Since we need the Case related information the Case Feed also should be synced in some way, at least only text messages including attachments if exist.
Right now I see that both Salesforce -> System and System -> Salesforce integrations should be implemented. So, if something was changed in Case(including Case Feed text comments, attachments) the data should be synced to external System. If user created new Case thought the external System it should be created in Salesforce. The UI will be simple with possibility to attach files and communicate with support in close to real time chat.
Except Cases I also should take care about syncing the users data from Salesforce to my System. Right now it's only one custom Salesforce object.
I see the following steps for such integration:
- Do the first data sync and get all required data from Salesforce. Data Loader/ETL/Bulk API can be used. Probably the Data Loader is good enough for it.
- Bidirectional data sync in near real time when the data has been changed(CRUD operations). For System -> Salesforce integration I decided to use REST API. For Salesforce -> System integration I see two good options Streaming API with Data Capture and Outbound Messages with Workflow Rules and Apex triggers(to cover delete operations). But looks like the Streaming API can't sync the CaseFeed. And CometD client library support for my stack(.net core and C#) is poor.
- Do the sync for new data that should be handled by Salesforce and\or System. The Data Loader again probably the good choice for it.
Questions :
- Does the integration approach smart. Can you give some suggestions?
- Can I use Streaming API to sync CaseFeed from Salesforce to System? I see that both Data Capture events and PushTopics can't do it. Is it possible to use the Platform event notifications?
- Will the Outbound Message actions with Workflow Rules and Apex triggers(to cover delete operations) are good enough for the described Salesforce to System sync? I need to cover Case, CaseFeed and one custom object.
- Does it smart to mix the Streaming API and Outbound Messages(with Apex triggers)? For example I can do data sync using Data Capture events for Cases and my custom object. And for CaseFeed I can create Outbound Message actions with Apex trigger.
- How I can filter the only CaseFeed related messages/items using Workflow Rules? I see that in Workflow Rule I have the filter by FeedItemType. I have found all available FeedItemTypes in the Salesforce. But I'm still not sure which Items related to CaseFeed. For example the TextPost type presented in CaseeFeed but I believe this type also can be in other feeds.