WHITEPAPER Top 5 Salesforce Integration Patterns

Transcription

WHITEPAPERTop 5 Salesforceintegration patternsBest practices for integrating Salesforce

Table of contentsIntroduction.Top 5 Salesforce integration patterns3.4Pattern No. 1: migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5Pattern No. 2: broadcast.6Pattern No. 3: aggregation.Pattern No. 4: bidirectional syncPattern No. 5: correlation8.10.12Get started: Anypoint Templates for Salesforceintegration.Better Together: MuleSoft SalesforceAbout MuleSoft14.16.172

IntroductionWe are in the midst of the fourth industrial revolution. Ninetyseven percent of businesses have joined the race to deliverconnected customer experiences. Delivering these experiencesrequires more than just providing products and services in atimely manner. It requires creating organic connections withreal people at every touchpoint of their journey.As the world’s No. 1 customer relationship management (CRM)platform, Salesforce enables companies to seamlessly connectcustomer experiences across every touchpoint in the business:sales, service, marketing, and more.The challenge many businesses face is how to connectSalesforce with their core systems and applications such asdatabases, enterprise resource planning (ERP) systems, andcustom applications. Though every integration scenario isunique, there are several common requirements and issuesthat developers must resolve. This whitepaper describes thestrategies, in the form of patterns, that many developers use tointegrate with Salesforce.3

Top 5 Salesforce integration patternsIntegration plays a critical role in creating seamless customerexperiences across channels, departments, and systems. Tospeed up Salesforce integration, organizations typically applyintegration applications based on five patterns. These patternsare the most logical sequence of steps to solve specific types ofintegration problems, documented from real-world use cases.An integration application includes a pattern and a businessuse case. The pattern is the use of the generic process for datamovement and handling. The business use case is comprisedof the value obtained from an integration.When thinking about the format of a simple point-to-point,atomic integration one can use the following structure:Application(s) A to application(s) B – object(s) – patternTo templatize common Salesforce integration needs, basepatterns, or best practices, it must first be established to makeintegrations atomic, reusable, extensible, and easilyunderstandable. The essence of a pattern includes somecombination of at least one of the following elements:›› A source system where data resides prior to execution.›› The criteria which determines the scope of data to becopied, moved, or replicated.›› Transformation from one format to another.›› A destination system where the data will be inserted.›› Results capture which compares the final state withthe desired state.The five most common integration patterns are migration,broadcast, aggregation, correlation, and bidirectionalsynchronization.4

Pattern No. 1: migrationData migration is the act of moving a specific set of data at apoint in time from one system to another. A migration patternallows developers to create automated integration services forfunctionality that will be shared across multiple teams.Developers can set configuration parameters to pass into anAPI call so that the migration application can dynamicallymigrate scoped Salesforce data in or out of Salesforce eitheron command or in the form of an API. Creating reusableservices for frequent migrations can save an exceptionalamount of time for development and operations teams.There are numerous Salesforce integration scenarios that mayrequire a migration pattern including, migrating data from alegacy CRM system to Salesforce or from one Salesforceorganization to another, backing up a master data set,consolidating CRM systems, populating Salesforce product datafrom SAP, and more. Migration patterns are tuned to handlelarge volumes of data, process many records in batches, andhave to fail gracefully in case of error(s).Migrations are essential to any data system and are executedextensively in any organization that has data operations.Migrations keep data agnostic from the tools used to create it,view it, and manage it and ensure that data is not lost whentools are changed.5

Pattern No. 2: broadcastBroadcast is the act of moving data from a single sourcesystem to many destination systems in real time, near realtime, or on an ongoing basis. Essentially, it is one-waysynchronization from one to many. Typically “one-way sync”implies a one-to-one relationship; however, the broadcastpattern can also be a one-to-many relationship.In contrast to the migration pattern, the broadcast pattern istransactional. It executes logic only for items that have beenrecently modified and is optimized for processing records asquickly as possible. Broadcast patterns are highly flexible andused to keep data up to date between multiple systems, acrosstime. A broadcast pattern should be highly reliable to avoidlosing critical data in transit. Reliability is also necessary toemploy integrations with low human oversight across missioncritical applications as broadcast patterns are usually initiatedby a push notification or a scheduled job.The broadcast pattern allows for the immediate transfer ofcustomer data between systems, whether from two instancesof Salesforce or between Salesforce and other systems. Forinstance, the pattern can broadcast update to a customer6

record between Salesforce organizations or can enable anaction in Salesforce to immediately translate into orderfulfillment processing. Examples of use cases for the broadcastpattern include the following:›› A sales order in SAP should be created when anopportunity is marked as CLOSED WON in Salesforce.›› Real-time data needs to be synchronized fromSiebel to Salesforce.›› Insert/update to a Salesforce record must be reflected inother adjacent enterprise applications.7

Pattern No. 3: aggregationAggregation is the simplest way to extract and process data frommultiple systems into one application or report in real time. Thealternative to aggregation is to run multiple migrations on a dailybasis, which requires manual maintenance to keep dataaccurate, synchronized, and up to date. Broadcasting data frommultiple systems, though real time, does require maintaining adatabase to store replicated data to be queried. By using anintegration template built on an aggregation pattern, developerscan easily query multiple systems on demand and merge datasets to use data however and whenever needed. This way, onecan create or store reports in .csv or other formats of choice.Examples of uses for the aggregation patterninclude the following:›› Creating a dashboard that pulls data from multipleSalesforce instances, while ensuring data consistency.›› Updating Salesforce with data from multiple back-endsystems such as ERP and issue-tracking systems.›› Building APIs that collect and return data from multiplesystems, or report across multiple systems.8

Since the aggregation pattern allows developers to extract andprocess data from multiple systems and merge them into oneapplication, data is always up to date, does not get replicated,and can be processed or merged to produce any desired dataset or report. This avoids the need to have a separateoperational database for merged content and makes reportsavailable in any format or within any repository.The aggregation pattern is particularly helpful in thefollowing scenarios:›› When creating orchestration APIs that get data frommultiple systems to “modernize” legacy systems byprocessing data into one response.›› When creating reports or dashboards which have to pulldata from multiple systems and create anexperience with that data.›› When systems used for compliance or auditing purposesneed to have related data from multiple systems. With theaggregation pattern, compliance data can be collected frommultiple systems, but be housed in a central,compliant repository.When using the aggregation pattern to integrate data andapplications, key considerations include collecting data, thescope of the source data and insert data, merging multipledata sets, formatting data, and any additional destinations. Forexample, when collecting data, there are two ways to do so:either create an application - that listens for messages frommultiple systems and aggregates them in real time, or createan application - that is triggered by an event. When combiningmultiple data sets, it is important to consider how to mergethem and how to present the data in the final report ordestination system.9

Pattern No. 4: bidirectional syncBidirectional sync is the act of uniting two or more data setsfrom two or more different systems to behave as one systemthat recognizes the existence of different data sets. This type ofintegration is useful when different tools or different systems,which are needed in their own right and for their own specificpurposes, must accomplish different functions on the samedata set. Using bidirectional sync to share the data set enablesthe use of both systems, while maintaining a consistentreal-time view of the data across systems.Enterprises can use bidirectional sync integration to:›› Optimize organizational processes.›› Closely align data representations to reality in both systems.›› Reduce the compound cost of manually addressinginconsistencies, lack of data, or the impact on business as aresult of inconsistencies.›› Hand pick and customize a suite of tools with best-of-breedapplications used collectively for specificorganizational aims.Applied to Salesforce, bidirectional sync supports examplessuch as integration of multiple systems that contribute tooperational efficiencies and a streamlined quote-to-cash flow.Salesforce can play the role of the primary system of records ora secondary system where all data are synchronized to.10

Bidirectional sync integration enables each system to performoptimally while maintaining data integrity across bothsynchronized systems. It can provide flexibility to modularlyadd and remove two or more systems that subspecialize insidea domain as storage. And sync is particularly advantageouswhen object representations of reality must becomprehensive and consistent.Bidirectional sync is a pattern that can unify the most relevantand best performing applications to enhance Salesforcefunctionalities and result in overall growth in sales.11

Pattern No. 5: correlationCorrelation and bidirectional sync are very similar but thepatterns have one critical difference. Whereas bidirectionalsynchronization aims to replicate the same data elements intwo locations, correlation is used to associate disparate datarecords without copying the data itself. Bidirectionalsynchronization will create new records if they are found in onesystem and not the other. The correlation pattern is notdiscerning in terms of origination of objects. It will agnosticallysynchronize objects as long as they are found in both systems.Correlation is useful for cases in which two groups or systemsonly want to share data, but only if they both have recordsrepresenting the same items or contacts in reality. Thecorrelation pattern is most useful when extra data is morecostly than beneficial as it scopes out the “unnecessary” data.For example, hospitals in the same health care network maywant to correlate patient data for shared patients acrosshospitals, but it would be a privacy violation to share patientdata with a hospital that has never admitted ortreated the patient.With the correlation pattern, the most important considerationis the definition of the term “same” across records. Thisdefinition can vary by industry and consequences for uncleardefinitions also vary. For example, in targeting offers tocustomers, the same name may be close enough; however, in ahospital, relying on a name could have serious consequences if12

two patients have the same name and different courses oftreatment. The table below illustrates what can occur when thedefinition of “same” is too strict, too lax, or accurate acrosscorrelation and bidirectional sync.Just rightToo strictToo looseBidirectional syncUnion of data setsDuplicate createdWrong recordsMergedCorrelationIntersection ofdata setsNot synchronizedWrong recordsMergedThe correlation pattern allows shared account data to besynchronized across applications, including Salesforceinstances, either across an organization or between a companyand a partner. Working internally, it can also allow forsynchronization of customer data entered by two differentteams or even team members of the same department.The Salesforce integration patterns we just reviewed cover fiveof the most common integration scenarios. However, there aremany more integration patterns preferred for other use cases— for example, data virtualization is a synchronous example ofaggregation whereby disparate back end data sources arecomposed and exposed through a single API to appear inSalesforce as if they are native objects. The next section detailswhere you can find hundreds of templates, connectors, andAPIs for Salesforce integrations.13

Get started: Anypoint Templatesfor Salesforce integrationEach

Top 5 Salesforce integration patterns Integration plays a critical role in creating seamless customer experiences across channels, departments, and systems. To speed up Salesforce integration, organizations typically apply integration applications based on five patterns. These patterns are the most logical sequence of steps to solve specific types of integration problems, documented from real .