Discover Integration Connectors

Learning Objectives 

After completing this unit, you’ll be able to:

  • Explain the role of connectors within integrations.
  • Recall how data moves from resource to resource.

Before you delve into this module, make sure you complete Application Integration Patterns for Salesforce Lightning Platform, which appears earlier in the Explore Integration Patterns and Practices trail. The content we cover here builds on the concepts learned in Learn Integration Patterns and Designs. 

Introducing Connectors

If you’ve ever connected a laptop to a TV, you know you simply use an HDMI cable between the two devices, right? But not always—every laptop doesn’t have an HDMI port. Some laptops, like those made by Apple, need a special adapter to connect the two devices, one side for HDMI, and the other for USB-C. While one end is sending the system data in its native format the other is converting to and receiving the data in its correct format. 

The same idea applies to using connectors to join a Mule Flow and an external resource. The resource can be a database, a protocol, or even an API. When sending or receiving data, external applications aren’t always going to relay data in the format the receiving application expects. Connectors are there to help with this challenge. 

Message flow.

In the Mule message flow above, the connector gets data from an API or the message source. The message processors route the data and change the mapping of that data. Once it’s mapped, the connector passes the data to the final API that it’s intended for—the connector endpoint. Instead of spending time understanding the inner workings of either system, it's only necessary for a developer to have access to the API for the systems they would like to exchange data with. 

Connectors are generally classified by the system they are connected to or the protocols they support. These connectors range from HTTP and FTP connectors to JMS, or specific third-party APIs. Each type reflects on how the connector is configured and not on its functionality. 

There are hundreds of connectors at your fingertips, but in this module, we cover a few connectors that you’re likely to cross paths with. If you’re interested in learning more, check out the connectors section within the MuleSoft Anypoint docs. 

Bridging the Data Divide with Connectors

Having the keys to the kingdom is not beneficial if you don’t know where and how to use them. There are a host of connectors that you can use to bridge data between multiple Salesforce orgs, legacy and external systems. Before we get into how you can use these tools, let’s review common connectors you’ll encounter along the way. 

Using connectors with MuleSoft’s Anypoint Platform provides the tools needed to access data to and from Salesforce, on-premises, or cloud-based systems. Given that most integrations use multiple external systems, your application also needs several connectors to connect each of those systems.

MuleSoft Salesforce Connector

Let’s take a look at the MuleSoft Salesforce Connector. This connector has deep support for virtually every Salesforce integration capability, like Salesforce Connect and Platform Events (PE). The Salesforce Connector can be used by a Mule App to connect to and from Salesforce or other data sources, connecting, for example, Salesforce and Workday. 

Salesforce API to Workday API using the MuleSoft Salesforce Connector and the MuleSoft Workday Connector.

The data is sent from Salesforce to the Anypoint connector. The processing logic happens within the Mule Integration App. And the data is sent from Anypoint to the destination API, in this case, Workday. The Mule App works as the go-between, avoiding point-to-point integrations, and decoupling the two systems. 

Within integrations, sometimes finding the exact connector pairings prepackaged (like the Salesforce to Workday integration above) is difficult because the connector would need to run in one application or the other. However, finding an associated connector is as easy as searching in AppExchange or in the marketplace of the associated application, like Workday.

MuleSoft Database Connector

This connector works alongside any Java Database Connectivity (JDBC) accessible database, including Postgres. It supports the full range of database access possible with a relational database, such as CRUD, stored procedures, and bulk execute.

MuleSoft HTTP Connector

This connector supports listening for and sending HTTP requests. When you’re using the HTTP connector within the source, it’s known as an HTTP listener. As a listener, you can receive the request from the client. If you’re using the HTTP connector within the destination, it’s known as an HTTP requester. As a requester, you can send any request to the destination.

When we think about connectors, we don’t just stop at external connectors through MuleSoft. Connecting your Salesforce org data is helpful, too—for instance utilizing Heroku Connect and Salesforce Connect.

Heroku Connect

Heroku Connect connects one or more Salesforce instances to a Heroku Postgres database using SOAP, Bulk, and Streaming APIs. 

Salesforce Connect

Salesforce Connect provides a method that creates external (temporary) objects that access real-time data coming from external platforms to Salesforce without having to store the data. With Salesforce Connect, you can utilize either the OData 2.0 or 4.0 adapters, the cross-org adapter, or a custom adapter. The custom adapter is created via Apex to access data stored outside of Salesforce. 

  • The OData 2.0 adapter or OData 4.0 adapter connects to data that is exposed by an OData 2.0 or 4.0 producer. OData is a REST-based protocol for integrating data.
  • The cross-org adapter connects to data that’s stored in other Salesforce orgs. It uses the standard Lightning Platform REST API. Unlike OData that needs an intermediary web service, cross-org adapters can directly connect to other orgs.
  • If the OData and cross-org adapters aren’t suitable for the needs of your integration, developing your own adapter with the Apex Connector Framework is also available for you to create.

Coming Up Next

Before you can make a decision on which connector to leverage within your integration, it’s important to understand “the why.” The limitations of the connector you select, and any operating constraints that each connector has, can make or break your integration. 

Each Salesforce cloud and product has a collection of platform and integration constraints that govern customer implementations. Understanding how each of these features work, and, in turn, which connector to select, allows you to better assess their viability as strategic integration options.

For the remainder of this module, let’s follow Robert Bullard, a technical architect from Get Cloudy Consulting, as he uses external connectors, Heroku Connect, and Salesforce Connect in various integrations to meet the needs of his customer. 

Resources 

Keep learning for
free!
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities