Contact Free trial Login

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 on Design Center field values, see the Salesforce Connector Reference.

Configure the Trigger

  1. In Design Center, click Create.

  2. Click Create new application.

  3. Specify a value for Project name.

  4. Exit from Let’s get started by clicking Go straight to canvas.

  5. Click the name of the trigger card.

  6. 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

Channel operations

  • Streaming Channel: Name of the channel

  • Replay Option: Options for receiving channel events after subscribing to a channel

  • Connection type: See Configure a Connection Type

Object operations

  • Object type: Contact, Lead, Account, Contracts, Opportunity

  • Since: The time starting point for processing the object

  • Scheduling Strategy: How often to schedule changes

  • Connection type: See Configure a Connection Type

Topic operations

  • Topic: Topic to subscribe to

  • Replay Option (Replay Topic only): What events to receive and reply

Configure a Connection Type

  1. Specify the Connection Type:

    Connection Type Salesforce Information Site

    Basic Username Password

    SOAP API Username Password Login

    OAuth 2.0

    OAuth 2.0 Web Server Authorization Flow

    OAuth JWT

    OAuth 2.0 JWT Bearer Token Flow

    OAuth SAML

    OAuth 2.0 SAML Bearer Assertion Flow

    OAuth Username Password

    OAuth 2.0 Username-Password Flow

  2. Specify the parameters as required for each configuration type, and click Test to ensure you have a valid connection to Salesforce.

  3. If needed, configure the Apex tab to decide what metadata to fetch and to add Apex class names.

  4. If you haven’t specified a Connection Type, and if needed, configure the Advanced tab to set the Max Idle Time and Time Units for how long to hold open a connection before it expires.

  5. 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.

  6. 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

  1. Click “+” next to the trigger card.

  2. In Select a component, search for the connector name.

  3. Select the connector name.

  4. Select an operation for the connector.

  5. Enter the required values in the General tab.

  6. If needed, enter values for other tabs.

  7. Specify access information to the connector resource.

  8. 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

  • Type: Salesforce object type.

  • Records: Create a collection of Salesforce objects.

Query

  • Salesforce query: Salesforce query to retrieve objects.

  • Parameters: Values for placeholders in the Salesforce query.

Update

  • Type: Salesforce object type.

  • Records: Produce a collection of Salesforce objects to be updated.

Delete

  • Records To Delete Ids: Produce a collection of Salesforce objects to be deleted.

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, and Touch = 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.

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.