S4S with M4S
M4S is a module that works with S4S and sits between Sitecore and Salesforce. M4S and its associated M4S database improves transaction speed, allows the volume of calls to Salesforce to be controlled, and ensures key Salesforce data, like login credentials, is available to Sitecore, even if Salesforce is not.
Overview
M4S replicates Salesforce records in an out-of-the-cloud MongoDB database. Used with S4S, it can act as a highly configurable super-cache.
When S4S is used to push data to Salesforce, M4S simultaneously replicates the data in the M4S database. If Salesforce is unavailable, the data in the M4S database is flagged for sync when Salesforce returns. Data pulled from Salesforce to Sitecore with S4S is sourced from the M4S database so no Salesforce API calls are consumed.
To keep the systems in sync, a Sitecore scheduled task updates the M4S database with recent changes in Salesforce (based on date/time stamps) and, in the other direction, updates Salesforce with any flagged changes in the M4S database. Because pushes to Salesforce are bulkified by S4S, the overall API count is significantly reduced.
Why would I need S4S and M4S?
In almost every case, you will not need M4S but if you have critical concerns about the following then M4S is ideal:
- Number of API calls to Salesforce
- Daily API count needs to be reduced
- API count needs to be reduced on days when the website has very high traffic volumes
- Business continuance when Salesforce is unavailable
- Continue to collect web form data e.g. lead submissions from WFFM or a custom web form
- Still allow website visitors to log in to Sitecore if Salesforce is offline (if the S4S Security Connector is used)
- Show Salesforce records in the M4S Sitecore Launchpad application if Salesforce is offline
- Show Salesforce data normally viewable in Sitecore web pages if Salesforce is offline
- Transaction speed to and from Salesforce
- Cloud latency needs to be reduced
- Large documents or binary files are slowing processing
- Push, pull record data volumes are large and take too much time
- Visitors authenticating into Sitecore with credentials in Salesforce require a faster login (if the S4S Security Connector is used)
- Controlling the API Count in Peak Periods
- On peak days the API count needs to be reduced. On other days, transact directly with Salesforce
Is M4S a backup and restore solution for Salesforce?
The answer is yes, and no. M4S is an excellent backup solution but has constraints around restore. M4S stores Salesforce object fields, including the Salesforce relationship data with other objects, but M4S does not have mechanisms to connect them together. This means all new records created in the M4S database will be unrelated. If a relationship is required, this needs to be created in Salesforce.
What M4S can do!
Users with access to the Sitecore Launchpad can log in and view Salesforce records in M4S (those that have been chosen to sync). A record list is visible and the field data is available by clicking into each record. The list is currently read-only. Sitecore access permissions can be granted to allow the Salesforce team to access this data if Salesforce became unavailable.
Records in the M4S database can be created, read, updated or deleted by purpose-built Sitecore functionality and these changes will be reflected in Salesforce when the next sync occurs.
What M4S can't do!
There is no out-of-the-box support for relationship handling. New records created in the M4S database with relationships to other records (like account and contacts) will require the relationship to be created in Salesforce.