Contact Free trial Login

Salesforce Connector - Get Started - Mule 4

Support Category: Select

Salesforce Connector v9.7

The Salesforce connector enables you to create applications that react to Salesforce events such as adding, changing, or deleting objects, topics, documents, and channels.

The Anypoint Salesforce Connector lets you connect to the Salesforce APIs. This connector exposes methods for accessing Salesforce, including working with the Salesforce Apex classes.

There are three ways to use a Salesforce connector in your application: as an outbound connector, an inbound connector, or a streaming inbound connector.

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 an XML request and response over an HTTPS connection. All required request headers, error handling, and HTTPS connection configurations are built into the connector.

About Connectors

Anypoint connectors are Mule runtime engine extensions that enable you to connect to APIs and resources on external systems, such as Salesforce, ServiceNow, and Twitter.

Prerequisites

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.

This document assumes that you are familiar with Salesforce, HTTP, SOAP, REST, Bulk and Streaming APIs, Mule runtime engine (Mule), Anypoint Connectors, Anypoint Studio (Studio), Mule concepts, elements in a Mule flow, and Global Elements.

Requirements for using the connector:

  • Salesforce developer account.

  • Salesforce security token - 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 API.

  • Namespace and schema location: If you plan to create the XML for your Mule application, you need to include the correct namespace and schema location in your XML file. Anypoint Studio adds this information to the XML file automatically when you add the Salesforce connector to a flow in a Mule app.

Audience

Subject Overview

Subject Description

Accept and Transform Data

Example that accepts and transforms data from Salesforce.

Apex SOAP and REST

Configure for APEX SOAP API and APEX REST API

APIs

Salesforce APIs that this connector can access.

Application Development

Processing order and integration patterns.

Batched Data

Batching data using the Salesforce Bulk API.

Custom Event Notifications

Get custom event notifications over a streaming channel.

Events

Receive Salesforce events by subscribing to a topic.

Lead Convert Request ID

Specify a lead ID using DataWeave.

Parent Child Relationships

Example for creating and updating parent and child relationships.

Streaming Channel

Subscribe to a Salesforce streaming channel.

Anypoint Exchange Templates and Examples

Simplify Salesforce connector development with a template or an example.

Topics

Subscribe to a Salesforce topic.

The Anypoint Salesforce Connector lets you connect to the Salesforce APIs. This connector exposes methods for accessing Salesforce, including working with the Salesforce Apex classes. There are three ways to use a Salesforce connector in your application: as an outbound connector, an inbound connector, or a streaming inbound connector.

Develop an Application

Build an application in this order:

  1. Configure the connector.

  2. Test the connection.

  3. Build the rest of your flow.

  4. Add and configure DataWeave.

When developing an app, the 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 kicks off a process in a remote system, waits for the remote system to finish processing, then accepts control back again 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.

APIs for the Salesforce Connector

The Salesforce connector works with the Salesforce APIs in the sections that follow. The Salesforce connector does not provide access to the Chatter API or the Tooling API. Each API call uses an XML request and response over an HTTPS connection. All required request headers, error handling, and HTTPS connection configurations are built into the connector.

Apex SOAP API

The Salesforce Apex SOAP API exposes Apex class methods as custom SOAP Web service calls. This allows an external application to invoke an Apex Web service to perform an action in Salesforce.

Apex REST API

The Salesforce Apex REST API creates your own REST-based web services using Apex. It has all of the advantages of the REST architecture, and provides the ability to define custom logic and includes automatic argument/object mapping.

Bulk API

The Salesforce Bulk API quickly and securely load batches of your organization’s data into Salesforce. See also: Load Data in Batches.

Metadata API

The Salesforce Metadata API manages customizations and build tools that work with the metadata model, not the data itself.

SOAP API

The Salesforce SOAP API provides secure access to your organization’s information on Salesforce. Most of the operations that the 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 following Salesforce SOAP Headers: AllOrNoneHeader, AllowFieldTruncationHeader, AssignmentRuleHeader, CallOptions, EmailHeader, LocaleOptions, MruHeader, OwnerChangeOptions, QueryOptions, UserTerritoryDeleteHeader, DuplicateRuleHeader.

Streaming API

The Salesforce Streaming API securely receives notifications for changes to your organization’s information in Salesforce. See Receive Inbound Data From Salesforce for more information on 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.

Templates in Exchange

Anypoint Exchange templates provide starting points for Anypoint Studio projects such as:

Examples in Exchange

Anypoint Exchange examples enable you to create complete Anypoint Studio projects such as:

Next

After you have met the prerequisites and experimented with templates and examples, you are ready to create an app with Design Center or Anypoint Studio.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.