Salesforce Cloud Connector Reference
Description
Salesforce.com uses the Software as a Service (SaaS) model to publish its CRM (Customer Relationship Management) functionality. A group of Salesforce Web Services APIs facilitate the retrieval and modification of customer contact records — as well as password maintenance, bulk operations, streaming, and complex searches, among other operations.
Mule developers can configure the bundled Cloud Connector for Salesforce to integrate with three of the Salesforce APIs (i.e., SOAP, REST, and Streaming), which are available to Salesforce subscribers at the following levels:
-
Unlimited
-
Enterprise
-
Developer
-
and some Professional Edition users
Development of a Mule application that accesses the Salesforce API is relatively simple, since you leverage a pre-packaged, easy-to-configure Cloud Connector to make each Salesforce API call. Mule Studio’s drag-and-drop editor and graphical configuration interface allow developers to create working Cloud Connectors without writing XML code. Furthermore, since the Cloud Connectors keep the underlying "plumbing" invisible, end-users don’t have to deal with the technical details of API calls or programming code.
Studio makes Salesforce API calls available both individually and in combination through a list of "operations" accessible through a dropdown list in the Salesforce Cloud Connector Properties pane. For example the query operation actually makes multiple calls to implement robust query functionality. [discrete] ==== List of Salesforce Cloud Connector Operations image::arrow-closed-active-16.png[arrow_closed_active_16] * Create * Create Single * Update * Upsert * Describe Global * Query * Query Single * Convert Lead * Empty Recycle Bin * Delete * Get Deleted * Get Deleted Range * Describe sObject * Publish Topic * Subscribe Topic * Create Bulk * Update Bulk * Upsert Bulk |
---|
As with all other Studio building blocks, you develop the Salesforce Cloud Connector in two stages:
-
Drag the Salesforce Cloud Connector icon from the Studio Palette to the Message Flow canvas, then position it within the sequence of building blocks that make up your flow.
-
Double-click the Salesforce Cloud Connector icon on the canvas to open the Properties pane, then complete the requisite property fields, which list all available options in a drop down menu or, at the least, accept "plain English" entries, rather than XML.
As you build your Mule application, drop the Salesforce Cloud Connector icon in the canvas for each Salesforce operation you wish to perform, then string these instances together (along with other building blocks) to create a flow.
The first time you configure an API-specific Cloud Connector, you must complete the extra step of creating a Global Element. This template specifies global credentials and connection information. It can be reused, generally without modification, for all subsequent Salesforce Cloud Connector instances you configure. |
---|
Configuring a Salesforce Cloud Connector
Overview
When you create a Mule application to leverage a Web API such as Salesforce, you may wish to implement not just one, but a series of Salesforce operations. To do so, you must create a new Cloud Connector instance for each operation.
Prerequisite
Before you can access the Salesforce API, you need a developer account at Salesforce.com. If you haven’t already set one up, navigate to: http://developer.force.com/
As you set up your account, make sure to record the following account information:
-
user name
-
password
-
security token
You will need these credentials when you configure your global element.
About the Global Element
To create a Salesforce-specific Cloud Connector, you must first create a Salesforce-specific global element. You only need to create this global element once; thereafter, it serves as a template for each Salesforce Cloud Connector operation you use. If you are accessing more than one version of the Salesforce API, you need to create a global element for each version.
Creating the Global Element
Two methods exist for creating a global element. This discussion covers only the more direct procedure. (For details on the other, more general procedure, see: Configuring Global Mule Elements).
For instructions on using the interface elements in the Properties pane, see: [Configuring Building Blocks]. |
---|
-
Drag the Salesforce icon from the Cloud Connector group on the Studio Palette to the Message Flow canvas (See: below, upper left). Don’t worry about where the icon lands; you can position it more precisely later in the configuration process.
-
Double-click the Salesforce icon to open its Properties pane to the General tab (See: below, lower left).
-
Click the Add button to the right of the Config reference field (See: below, center) to display the Global Salesforce configuration information pane. (See: below, right).
-
Complete the text entry fields, then click OK to commit the information to the application’s XML configuration file. (For details on the Salesforce configuration fields, consult: Salesforce Global Element Configuration Fields).
A red "x" to the lower left of a property (field) indicates that the field is required. The absence of a red "x" indicates that the property is optional. When you click to highlight a field, and an "i" surrounded by a blue circle appears in the lower left corner, context-sensitive help is available for that field. When you hover your mouse over this blue icon, a yellow help balloon appears containing information on the field. Note: Pop up help has not been implemented for all fields. You can also click the "?" icon in the lower left corner of the Properties pane, which causes the attached Help pane to open. Clicking the "?" icon a second time closes the Help pane. |
---|
Configuring a Salesforce Cloud Connector Instance
Perform the following steps to complete Cloud Connector configuration:
Name the Cloud Connector Instance
Change the Display Name default (in this case, Salesforce
) to include the global element on which it is based and the Salesforce operation it implements. For example, replace Salesforce
with Salesforce v22 Query
. This display name will appear in both the application’s XML configuration file and below the icon representing this instance on the Message Flow canvas.
Specify a Global Element
Assuming you have already created a global element, verify that it appears in the Config reference field, or, if it doesn’t, right-click on the down arrow at the right end of the Config reference field, then select the global element you wish to use. For example, you might choose among the global elements you have created for different versions of the Salesforce API.
Select an Operation
Right-click on the arrow at the right end of the Operations field, then select the Salesforce operation (API call) you want to implement for this instance of the Salesforce Cloud Connector. Note that for each operation you select, a different set of properties appears in the panel below the Connection panel. Complete all required fields.
Specify Authentication Credentials
If your Salesforce authentication credentials for this particular Salesforce Cloud Connector operation differ from the credentials you specified when configuring the global element, enter that information in the Username, Password, and Security token fields.
Document the Cloud Connector
Click the Documentation tab to open it. Enter notes and comments specific to this particular instance of the Cloud Connector. These will appear in the XML configuration file as well as in the balloon help that pops up when you hover your mouse over the instance icon on the Message Flow canvas. This completes Salesforce Cloud Connector configuration.
Global Element Field Details
The following table provides summary descriptions of the configurable fields in the Properties pane for the Salesforce Cloud Connector global element.
Field | Description |
---|---|
Name |
Required. A meaningful name for the global element might include both the Salesforce API version it implements. For example, replace |
Username |
Optional. The user name used to log in to your salesforce.com account. Supply this and the other Salesforce authentication credentials here only if you wish to override the authentication creadentials previously set for the global element on which this Cloud Connector instance is based. |
Password |
Optional. The password used to log in to your salesforce.com account. |
Security Token |
Optional. The security token provided by salesforce.com so that you can log in to your account. |
Proxy Host |
Optional. The URL of the local proxy host that will communicate with Salesforce. |
Proxy Port |
Optional. The port you use to communicate with the local proxy host. |
Proxy Username |
Optional. One of the login credentials you need to log in to the local proxy host. |
Proxy Password |
Optional. The other login credential you need to log in to the local proxy host. |
SOAP Endpoint |
Optional. The Salesforce URL to which the Cloud Connector sends SOAP messages. |