Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Salesforce Integration Patterns

Salesforce Integration Patterns

ksuhas4455

August 13, 2017
Tweet

More Decks by ksuhas4455

Other Decks in Programming

Transcript

  1. 0

  2. SALESFORCE INTEGRATION PATTERNS A variety of integration patterns currently exist

    for Salesforce. We’ll examine the following in this presentation.  Outbound Messaging  Salesforce Connect (ODATA)  Canvas  REST API Integration (inbound/outbound)  SOAP API Integration (inbound/outbound) Let’s take a deeper dive into each. 1
  3. OUTBOUND MESSAGING Outbound messaging allows you to specify that changes

    to data fields within Salesforce can automatically propagated to external systems. A backend queue is used to manage the outbound calls. Outbound messaging is part of the workflow rule functionality in Salesforce. Workflow rules watch for specific kinds of field changes and trigger automatic Salesforce actions, such as sending email alerts, creating task records, or sending an outbound message. 2
  4. PROS/CONS OF OUTBOUND MESSAGING  Simple to setup within Salesforce.

     Can be invoked via workflow rules and Apex.  Up to 100 notifications can take place within a single SOAP message. This makes it very efficient.  Guaranteed message delivery for up to 24 hours (retries for that duration).  Asynchronous so no client latency.  Session id automatically included for callbacks.  Two-way SSL possible for extra security 3  Receiving service must implement Salesforces’ outbound messaging WSDL.  REST is not an option for outbound messaging.  Governor/developer limits exist. Advantages Disadvantages
  5. SALESFORCE CONNECT 4 Salesforce Connect provides a gateway to accessing

    external data via the OData protocol. The external data is exposed in such a way as resemble custom object. • Data is accessed in real-time - doesn’t use copying. • Gives access to external data with point-and-click simplicity. • Allows the full range of CRUD operations (create, read, update and delete).
  6. WHAT EXACTLY IS ODATA?. 5 OData is a REST-based protocol

    for querying and updating data and is built on standardized technologies such as HTTP, Atom/XML, and JSON. It is different from other REST-based web services in that it provides a uniform way to describe both the data and the data model.
  7. PROS/CONS OF SALESFORCE CONNECT  If your external data already

    supports the OData protocol, setup within Salesforce couldn’t be simpler.  External objects are treated nearly identically to custom objects.  Configuration can largely be done in a point-and-click fashion - no custom code required.  External objects can be included in reporting and analytics. 6  External data integration limits are applicable. For example, there’s a maximum of 50,000 records retrieved or created an hour.  Debugging tools are weak.  Performance is a wild card - caching and optimization strategies are largely unknown.  Salesforce charges an additional monthly fee for Salesforce Connect. Advantages Disadvantages
  8. SALESFORCE CANVAS 7 Canvas is an iFrame-based technology that allows

    you to embed content from an external system. However, unlike conventional iFrames, where you are restricted from fetching data from domains other than its host (i.e., the same origin policy), Canvas provides a Javascript SDK that allows you to tightly integrate the canvas app with Salesforce callouts.
  9. CANVAS API & SECURITY 8 Thanks to the Canvas SDK,

    developers can surface IFrame applications that can fully integrate with the parent Salesforce application. There are several available security options for permitting such calls. They include OAuth support and signed requests, A signed request contains a consumer key, access token, and other contextual information that is useful for building tightly-integrated applications. You can also authenticate the user via SAML if Salesforce is configured as an identity provider.
  10. PROS/CONS OF SALESFORCE CANVAS  Developers can create applications using

    the technology stack most familiar to them.  Canvas SDK includes CSS classes that allow an embedded app to have a seamless UI experience.  Configuration within Salesforce couldn’t be easier - just a few simple steps.  No additional licenses costs. 9 9  The web application that must be exposed via Canvas must exist.  In order to fully leverage Canvas, you will have to use the Canvas SDK, which effectively means it can’t be reused in a stand-alone fashion.  As with nearly every Salesforce solution - developer limits are in place. For example, you are limited to 5,000 Canvas SDK calls per 24 hour period. Advantages Disadvantages
  11. SALESFORCE REST API 10 REST API provides a powerful, convenient,

    and simple Web services API for interacting with Force.com. The REST API provides a standard set of calls for accessing Salesforce remotely, and new calls can be defined using Apex REST annotations. In addition to calling Salesforce, REST can also be used for placing outbound calls. The Batch API is also suitable for batch routines.
  12. PROS/CONS OF SALESFORCE REST API  Simple to use with

    nearly all platform languages & technologies.  A Javascript API (“Javascript REST Toolkit”) enables client web applications to place direct calls to Salesforce (i.e., no same origin issue).  Can support XML or JSON protocols.  Very comprehensive - a wide range of Salesforce capabilities are exposed via the protocol.  Supports all standard OAuth authentication mechanisms. 13  As always, Salesforce developer limits apply. For example, depending upon your license, you may not be able to place more than 15k calls a day.  OAuth is required for accessing standard REST API calls (but those you define via Apex can be exposed without OAuth).  REST not available for outbound messaging (requires SOAP). Advantages Disadvantages
  13. SALESFORCE SOAP 14 Salesforce SOAP was their first true integration

    API, and it still remains popular today. Salesforce provides two different types of WSDLs that can be used: • Partner WSDL is loosely typed and generic to Salesforce org instance. You can dynamically fetch Salesforce configuration data, such as available custom objects. • Enterprise WSDL. A strongly typed WSDL that is specific to the organization you are working with. Given these chooses the big advantage to the Partner WSDL is that it remains static and thus immune to changes within Salesforce. However, unlike the Enterprise WSDL, it can be much tedious to work with.
  14. PROS/CONS OF SALESFORCE SOAP API  Platforms such as .NET

    and Java can leverage code-generation tools that make it fairly straightforward for generating SOAP requests. SDK’s exist to further streamline the process for Java, .NET, PHP and Ruby.  Testing the SOAP web services can be done using free tools such as SoapUI with IDEs such as Eclipse. 15  As always, Salesforce developer limits apply. For example, depending upon your license, you may not be able to place more than 15k calls a day.  SOAP isn’t an option for accessing the Bulk or Chatter APIs - they are only exposed as REST calls. Advantages Disadvantages