Channel operations
Salesforce Design Center Configuration - Mule 4
Design Center enables you to create apps visually. To use Design Center, work with your Anypoint Platform administrator to ensure that you have a Design environment. For more information, see the Flow Designer Tour.
To create an app in Design Center:
-
Configure the input source (trigger) for your app.
-
Add the connector as a component to process the input for the app.
For information about Design Center field values, see the Salesforce Connector Reference list for this Salesforce version.
Configure the Trigger
-
In Design Center, click Create.
-
Click Create new application.
-
Specify a value for Project name.
-
Exit from Let’s get started by clicking Go straight to canvas.
-
Click the name of the trigger card.
-
If you use the Salesforce connector as your trigger, a change in a Salesforce object, topic, or channel is sent as input to your application to let you process the change. Alternatively, you can specify the trigger as an HTTP Listener as input to your application from a browser or an application like Postman or
curl
, or you can use Scheduler to provide input to your application at a specific time.
Salesforce trigger operations:
-
On Deleted Object - Initiate your app when a Salesforce user deletes an object. Possible object types are
Contact
,Lead
,Account
,Contracts
,Opportunity
, or the name of a custom object. -
On Modified Object - Initiate your app when a Salesforce user modifies an object. Possible object types are
Contact
,Lead
,Account
,Contracts
,Opportunity
, or the name of a custom object. -
On New Object - Initiate your app when a Salesforce user creates a new object. Possible object types are
Contact
,Lead
,Account
,Contracts
,Opportunity
, or the name of a custom object. -
Replay Channel - Subscribe to a streaming channel. This trigger provides channel-related notification settings for new events and events stored by Salesforce within the 24-hour retention period. Events that take place in the specified channel trigger the flow.
Before you can subscribe to a channel or topic, it must first be published to Salesforce. -
Replay Topic - Subscribe to a topic. This trigger provides topic-related notification settings for new events and events stored by Salesforce within the 24-hour retention period. Events that take place on records in the specified topic trigger the flow.
-
Subscribe Channel - Subscribe to a streaming channel. This trigger provides channel-related notification settings for new events that take place after you subscribe.
-
Subscribe Topic - Subscribe to a topic. This trigger provides topic-related notification settings for new events that take place after you subscribe.
The important fields for each input trigger operation are:
Input Trigger Types | Important Fields |
---|---|
|
|
Object operations |
|
Topic operations |
|
Configure a Connection Type
-
Specify the Connection Type:
Connection Type Salesforce Information Site -
Specify the parameters as required for each configuration type, and click Test to ensure you have a valid connection to Salesforce.
-
If needed, configure the Apex tab to decide what metadata to fetch and to add Apex class names.
-
If you haven’t specified a
Connection Type
, and if needed, configure the Advanced tab to set theMax Idle Time
andTime Units
for how long to hold open a connection before it expires. -
After you specify a connection type, if needed, you can use the Advanced tab to change values for the Reconnection Strategy, Pooling Profile, and Expiration Policy.
-
If needed, set the
Redelivery Policy
on the main configuration screen. This indicates the maximum number of tries to deliver trigger content.
Configure the Target Component
-
Click “+” next to the trigger card.
-
In Select a component, search for the connector name.
-
Select the connector name.
-
Select an operation for the connector.
-
Enter the required values in the General tab.
-
If needed, enter values for other tabs.
-
Specify access information to the connector resource.
-
If a Test button is available, click it to test the connection.
In Design Center’s Flow Designer, after you specify a trigger, you can add the Salesforce connector as a component to process the input you received from the trigger. You may also want to add a DataWeave Transform between the trigger and the component to transform the input information to what you want as input to the Salesforce connector component. The Salesforce connector doesn’t have to be a component, it depends on what you’re trying to accomplish with your app.
The following are examples of the operations you can set in the Salesforce component:
Operation | Use |
---|---|
Create |
|
Query |
|
Update |
|
Delete |
|
Configure Basic Username Password Authorization
Important fields:
-
Username (required): Enter the Salesforce username.
-
Password (required): Enter the corresponding password.
-
Security Token: Enter the corresponding security token.
Implementing OAuth 2.0-based authentication mechanisms involves extra steps, but may be preferred if your service is exposed to external users, as it ensures better security. |
Configure OAuth 2.0 Authorization
Important fields:
-
Display (required): How to optimize the display:
Page
= Full-page authorization screen (default),Popup
= Compact dialog optimized for modern web browser popup windows, andTouch
= Mobile-optimized dialog designed for modern smart phones, such as Android and iPhone. -
Consumer Key (required): The consumer key for the Salesforce connected app. See Create a Consumer Key.
-
Consumer Secret (required): The consumer secret for the connector to access Salesforce.
-
Listener Config (required): Configuration for the listener, for example,
HTTP_Listener_config
. -
Callback Path (required): Path for the callback, for example,
/callback
. -
Authorize Path (required): Path for authorization, for example,
/authorize
. -
External Callback URL: Callback URL, for example,
http://localhost:8085/callback
.
Configure OAuth JWT Authorization
Important fields:
-
Consumer Key (required): The consumer key for the Salesforce connected app. See Create a Consumer Key.
-
Key Store (required): The path to the key store used to sign data during authentication. Only Java key store format is allowed. See Generate a Keystore File.
-
Store Password (required): The password for the keystore.
-
Principal (required): The Salesforce username that you want to use.
Configure OAuth SAML Authorization
Important fields:
-
Consumer Key (required): The consumer key for the Salesforce connected app. See Create a Consumer Key.
-
Key Store (required): The path to the key store used to sign data during authentication. Only Java key store format is allowed. See Generate a Keystore File.
-
Store Password (required): Key store password.
-
Principal (required): Username of desired Salesforce user.
Configure OAuth Username Password Authorization
Important fields:
-
Consumer Key (required): The consumer key for the Salesforce connected app. See Create a Consumer Key.
-
Consumer Secret (required): The consumer secret for the connector to access Salesforce.
-
Username (required): Enter the Salesforce username.
-
Password (required): Enter the corresponding password.
-
Security token: Enter the corresponding security token.