Salesforce Connector 10.3 - Mule 4
Anypoint Connector for Salesforce (Salesforce Connector) enables you to create apps that react to Salesforce events such as adding, changing, or deleting objects, topics, documents, and channels.
Salesforce Connector enables you to connect to the Salesforce APIs. This connector exposes methods for accessing Salesforce, including working with the Salesforce Apex classes.
This connector works with the Salesforce SOAP API, REST API, Bulk API, and Streaming API, depending on the operation you configure. Each API call uses a request/response pattern over an HTTPS connection. All required request headers, error handling, and HTTPS connection configurations are built into the connector.
Before You Begin
Before creating an app, you must have access to the Salesforce target resource and Anypoint Platform. You must also understand how to create a Mule app using Design Center or Anypoint Studio (Studio), and be familiar with Salesforce, HTTP, SOAP, REST, Bulk and Streaming APIs, Mule runtime engine (Mule), Anypoint Connectors, elements in a Mule flow, and global elements.
Requirements for using the connector:
-
You can receive a new security token by email if you run Reset Security Token through My Personal Information from the Salesforce Setup pages.
-
Consumer key and secret (available in your Salesforce developer account)
Required if you are using the OAuth Authentication type
-
Namespace and schema location
If you plan to create the XML for your Mule app, include the correct namespace and schema location in your XML file. Studio adds this information to the XML file automatically when you add Salesforce Connector to a flow in a Mule app.
Restrictions:
-
Salesforce Connector does not expose all possible operations of the Salesforce APIs.
-
Salesforce Connector does not provide access to the Chatter API or the Tooling API.
Audience
-
New users
Read Get Started (this document) and create your Mule app in Design Center or Anypoint Studio.
The Additional Configuration Information topic helps you extend your understanding of the connector.
-
Advanced users
Read XML and Maven Support, the Additional Configuration Information topic, and Examples.
Salesforce Connector Configurations and Examples
The following table provides links to specific Salesforce Connector information:
Subject | Description |
---|---|
Accept and transform data from Salesforce example |
|
Configure for APEX SOAP API and APEX REST API |
|
List of Salesforce APIs that this connector can access |
|
Process order and integration patterns |
|
Batch data using the Salesforce Bulk API |
|
Specify a lead ID using DataWeave |
|
Create and update parent and child relationships example |
|
Simplify Salesforce Connector development with a template or example |
|
Subscribe to a Salesforce topic |
|
Subscribe to a Salesforce streaming channel |
|
Replay events from a Topic |
|
Replay Events from a Salesforce streaming channel |
|
Get custom event notifications over a streaming channel |
|
Push Events to a Streaming Channel |
|
Object Store usage and limitations |
Develop an Application
To build an app, perform the following tasks:
-
Configure the connector.
-
Test the connection.
-
Build the rest of your flow.
-
Add and configure DataWeave.
When developing an app, Salesforce Connector provides these integration patterns you can use with the Salesforce APIs:
-
Batch Data Synchronization
An external system accesses, changes, deletes, or adds data in Salesforce in batches, and vice versa (Salesforce to external system).
-
Remote Call-In
An external system accesses, changes, deletes, or adds data in Salesforce, and vice versa (Salesforce to external system).
-
Fire and Forget Remote Process Invocation
Salesforce initiates a process in a third-party system and receives an acknowledgment that the process has started. The third-party system continues processing independent of Salesforce.
-
Request-Reply Remote Process Invocation
Salesforce initiates a process in a remote system, waits for the remote system to finish processing, and accepts control returned from the remote system.
-
User Interface Update Based on Data Changes
The Salesforce UI updates in response to a change in a third-party system.
Salesforce APIs
Salesforce Connector works with the Salesforce SOAP API, REST API, Bulk API, and Streaming API, but does not provide access to the Chatter API or the Tooling API. Each API call uses a request/response pattern over an HTTPS connection. All required request headers, error handling, and HTTPS connection configurations are built into the connector.
-
Apex SOAP API
Salesforce Apex SOAP API exposes Apex class methods as custom SOAP web service calls. This allows an external app to invoke an Apex web service to perform an action in Salesforce.
-
Apex REST API
Salesforce Apex REST API creates your own REST-based web services using Apex. This API has all of the advantages of the REST architecture, while adding the ability to define custom logic and including automatic argument or object mapping.
-
Bulk API
Salesforce Bulk API quickly and securely loads batches of your organization’s data into Salesforce. See also Load Data in Batches.
-
Metadata API
Salesforce Metadata API manages customizations and build tools that work with the metadata model, not the data itself.
-
SOAP API
Salesforce SOAP API provides secure access to your organization’s information on Salesforce. Most of the operations that Salesforce Connector performs map to this API.
All the Salesforce operations performed through the SOAP API have an optional parameter called
Headers
that can take any of the Salesforce SOAP headers. -
Streaming API
Salesforce Streaming API securely receives notifications about changes to your organization’s information in Salesforce. See Receive Inbound Data From Salesforce for more information about the use of the Streaming API.
Anypoint Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
Salesforce Connector Templates in Exchange
Anypoint Exchange templates provide starting points for Studio projects such as:
-
Account Broadcast template
-
Aggregation
-
Bidirectional Sync template
-
Between Salesforce organizations
-
Other sources
-
-
Migration
Salesforce Connector Examples in Exchange
Anypoint Exchange examples enable you to create complete Studio projects such as:
-
Batch processing
database and import leads
Next Steps
After you meet the prerequisites and experiment with templates and examples, you are ready to create an app with Design Center or Anypoint Studio.