Contact Free trial Login

Salesforce Design Center Configuration 10.4 - 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 Flow Designer:

  • Configure the input source (trigger) for your app.

  • Add the connector as a component to process the input for the app.

For information about Flow Designer field values, see the Salesforce Connector Reference.

Configure the Trigger

  1. In Flow Designer, 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 Salesforce Connector as your trigger, a change in a Salesforce object, topic, or channel is sent as input to your app to enable you to process the change.

    Alternatively, you can use one of these triggers:

    • HTTP Listener, to provide input to your app from a browser or an application such as Postman or curl

    • Scheduler, to provide input to your app at a specific time

Salesforce trigger operations:

  • On Deleted Object

    Initiates 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

    Initiates 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

    Initiates 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 Listener

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

  • Replay Topic Listener

    Subscribes to a topic to receive 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 Listener

    Subscribes to a streaming channel to receive channel-related notification settings for new events that take place after you subscribe.

  • Subscribe Topic Listener

    Subscribes to a topic to provide topic-related notification settings for new events that take place after you subscribe.

Before you can subscribe to a channel or topic, it must first be published to Salesforce.

The following table describes the most important fields for triggers:

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: Start time for processing the object

  • Scheduling Strategy: How often to schedule changes

  • Connection type: See Configure a Connection Type.

Topic operations

  • Topic: Topic to which to subscribe

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

Configure a Connection Type

  1. Specify the Connection Type:

    Connection Type Salesforce Information Site

    Basic Authentication

    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 required for each configuration type and click Test to ensure that you have a valid connection to Salesforce.

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

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

  5. After you specify a connection type, you can use the Advanced tab to change values for the Reconnection Strategy, Pooling Profile, and Expiration Policy fields.

  6. If needed, set the Redelivery Policy field on the main configuration screen to specify the maximum number of times to try delivering 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 Flow Designer, after you specify a trigger, you can add:

  • Salesforce Connector as a component to process the input you received from the trigger

  • A DataWeave transform placed between the trigger and the component to transform the input information before you process it

The following table describes some of the operations you can use with Salesforce Connector:

Operation Use

Create

  • Type: Salesforce object type

  • Records: Creates 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: Creates a collection of Salesforce objects to update

Delete

Records To Delete Ids: Creates a collection of Salesforce objects to delete

Configure Basic Authentication Authorization

Important fields:

  • Username (required)

    Salesforce username

  • Password (required)

    Corresponding password

  • Security Token

    Corresponding security token

  • Authorization URL

    URL for the endpoint configured to handle SOAP authentication requests

Implementing OAuth 2.0-based authentication mechanisms involves extra steps, but it offers better security if your service is exposed to external users.

Configure OAuth 2.0 Authorization

Important fields:

  • Consumer Key (required)

    Consumer key for the Salesforce-connected app. See Create a Consumer Key.

  • Consumer Secret (required)

    Consumer secret for accessing 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)

    Consumer key for the Salesforce-connected app. See Create a Consumer Key.

  • Key Store (required)

    Path to the keystore used to sign data during authentication. Use only a Java-format keystore. See Generate a Keystore File.

  • Store Password (required)

    Password for the keystore

  • Certificate Alias (optional)

    The alias of the certificate to be used if the specified keystore contains multiple certificates

  • Principal (required)

    Salesforce username

Configure OAuth SAML Authorization

Important fields:

  • Consumer Key (required)

    Consumer key for the Salesforce-connected app. See Create a Consumer Key.

  • Key Store (required)

    Path to the keystore used to sign data during authentication. Format the keystore in JAVA. See Generate a Keystore File.

  • Store Password (required)

    Keystore password

  • Certificate Alias (optional)

    The alias of the certificate to be used if the specified keystore contains multiple certificates

  • Principal (required)

    Username of the authorized Salesforce user

Configure OAuth Username Password Authorization

Important fields:

  • Consumer Key (required)

    Consumer key for the Salesforce-connected app. See Create a Consumer Key.

  • Consumer Secret (required)

    Consumer secret for accessing Salesforce

  • Username (required)

    Salesforce username

  • Password (required)

    Corresponding password

  • Security token

    Corresponding security token