You can use IBM App Connect to pass key data between Salesforce and other apps – automatically, in real time.

You can use App Connect with Salesforce by configuration and data mapping without a need for coding, and can achieve a return on your investment in minutes/hours, not days/months.

This guide shows you how…

If you can’t find what you want, or have comments about the “how to” information, please either add comments to the bottom of this page or .

A typical business scenario

Say your company uses Salesforce.com as a way of delivering a superior customer experience. Your marketing, call center, and other business teams use other SaaS applications that depend on their data being up-to-date with the contacts, leads, orders, and other customer data in Salesforce. Imagine you get to work to find you’ve got lots of new leads in your Salesforce account. Great news… but you’re going to have to spend time adding all this new data to the marketing app, mailing lists, and sharing the leads with the rest of your team.

How App Connect can help

When new a lead, contact, or other customer data is added to Salesforce, App Connect automatically passes key data to other applications. So no more time wasted manually transferring your lead data to other applications.

Similarly, you have other applications that generate contacts, leads, orders, and other customer data. You would waste precious time adding the data manually to Salesforce. Again, IBM App Connect can help, automatically updating Salesforce in real time, adding the leads (or other customer data) that other applications generate. IBM App Connect automates the sharing of this valuable data across these different apps.

Business users can integrate and manage data as it moves between the Salesforce platform and existing company systems, in the cloud and on premises. Critical data remains current and accurate, no matter where it is housed, while the solution feeds data to cognitive applications with minimal effort and without disturbing core data flows.

IBM App Connect also gives IT users the tools to build integrations that expose enterprise systems, which are consumable via Salesforce Connect. Developers working with lines of business can use these integrations to build employee-facing Lightning applications.

IBM App Connect extends the reach of the Salesforce platform to rapidly access data in real time within any enterprise system, home grown or off the shelf. Avoid the cost and overhead of synchronizing data by virtualizing access to the data at its source, giving all users an up-to-the minute view of client data.

What should I consider first?

Before you use App Connect Designer with Salesforce, consider the following information.

Supported editions

  • If you want to create a free Salesforce account to test out App Connect, make sure that you create a Developer account rather than a Trial account. If you connect to App Connect with a Trial account, the Salesforce events do not work.
  • Your edition of Salesforce needs to be enabled for API access (“API enabled”).

    If you’re using a free trial of Salesforce, it won’t be API enabled; sign up to the Developer Edition instead.

    By default, API access is only allowed on Enterprise, Developer, Unlimited, and Performance editions. Professional Edition does not come with free API access, and you might need to pay to enable the API access or upgrade to a higher edition.

    Ask your Salesforce administrator if your edition of Salesforce is API enabled, and if necessary request API enablement or upgrade to a higher edition that has API access.

Connecting to Salesforce from App Connect on IBM Cloud

To create an integration flow that passes key data between Salesforce and other apps, you must connect App Connect to each app in the flow. You can connect to an app either from the Applications tab on the App Connect Catalog page, or when you add an app to a flow. To connect App Connect to your Salesforce account:

  1. If required, specify the Salesforce environment (production or sandbox), or subdomain (with a personalized login page) that you want to connect to. The type of environment or subdomain you can connect to depends on your Salesforce edition. For example, sandboxes are available in some editions like Professional, Enterprise, Performance, and Unlimited, but aren’t available in the Developer Edition.
    • If you’re connecting to a standard production environment, you can leave the Custom URL field blank. When you connect, you’ll be automatically directed to the generic, non-instance-specific production URL:

      https://login.salesforce.com

      Alternatively, you can specify a production instance by entering its login URL in the Custom URL field in the following format (without the https:// prefix):
      instance.salesforce.com

      where instance represents the name of the production instance you’re connecting to; for example, na19, eu11, or ap1 for the North America, EMEA, or Asia Pacific regions.

    • If you’re connecting to a standard sandbox that’s being used for development or testing, you’ll need to first specify its login URL in the Custom URL field by using either of these values (without the https:// prefix):

      test.salesforce.com (the generic, non-instance-specific URL)
      instance.salesforce.com

      where instance represents the name of the sandbox instance you’re connecting to; for example, cs19.

    • If you’re connecting to your company’s personalized login page (with a configured subdomain) in a production environment, you’ll need to first specify the URL in the Custom URL field using the following format (without the https:// prefix):

      subdomain.my.salesforce.com

      where subdomain represents the name of a subdomain defined within your Salesforce org to replace the instance name; for example, myCompanyName.

      Tip: If you’re using the Developer Edition, the custom URL should end with -dev-ed.my.salesforce.com rather than .my.salesforce.com, which is used in other editions.

    • If you’re connecting to your company’s personalized login page (with a configured subdomain) in a sandbox environment, you’ll need to first specify the URL in the Custom URL field using the following format (without the https:// prefix):

      subdomain--sandboxname.instance.my.salesforce.com

      where subdomain represents the name of a subdomain defined within your Salesforce org to replace the instance name, sandboxname is your assigned sandbox name, and instance is the name of the sandbox instance; for example, myCompanyName--mySandboxName.csN (where N is a number).

  2. Click Connect (and click Continue to close the message about your Salesforce account requirements).
  3. Specify the user name and password of the Salesforce environment you want to connect to.
  • Example of connection fields for connecting from App Connect

    Example of Salesforce connection details for a cloud connector

Note: If you want to connect to Salesforce sandboxes or subdomains and use Salesforce as a source application to trigger events, the Salesforce “Organization” object must be enabled in your Salesforce environment. You can ask your Salesforce administrator whether the “Organization” object is enabled in your Salesforce edition, and if necessary request that the object be enabled.

Connecting to Salesforce from an App Connect Designer instance in a containerized environment (local connector)

To create an integration flow that passes key data between Salesforce and other apps, you must connect App Connect to each app in the flow. You can connect to an app either from the Catalog page, or when you add an app to a flow.

If you are using an App Connect Designer instance within an installation of IBM Cloud Pak for Integration or IBM App Connect Enterprise certified container, and you are using a local connector to connect to your Salesforce account, complete the following steps. (For more information about using an App Connect Designer instance in a containerized environment, see Creating and managing flows for an API in App Connect Designer.)

  1. Complete the connection fields that you see in the Catalog page or flow editor. If necessary, work with your Salesforce administrator to obtain these values.
    • Login URL: Specify the login URL of your Salesforce instance, prefixed with https:// and suffixed with a forward slash (/).

      To obtain the Login URL value, complete the following steps:

      1. Click the View profile icon in your Salesforce instance. The URL is displayed below your user name.

        Salesforce login URL

      2. Construct the Login URL value by adding the https:// prefix and forward slash (/) suffix to this URL; for example, https://login.salesforce.com/,
        https://myInstance.salesforce.com/, or https://mySubdomain.my.salesforce.com/.
    • Username: Specify the user name (in the form of an email address) that you use to log in to your Salesforce instance.
    • Password: Specify the password that you use to log in to Salesforce, suffixed with your Salesforce security token.

      To obtain the Password value, complete the following steps to retrieve the security token that is tied to your Salesforce password:

      1. If you had previously reset the security token in your Salesforce instance, locate the email (containing the security token details), which was sent to the email address that is set for your user profile.

        Alternatively, reset the security token as follows:

        1. Click the View profile icon in your Salesforce instance and then click Settings.

          Salesforce Settings link

        2. In the navigation pane, click Reset My Security Token. A message is displayed, informing you that the existing security token will be invalidated.
        3. Click the Reset Security Token button to confirm that you want to continue.

          Reset Security Token

          The new security token is sent to the email address that is set in the Personal Information page.

      2. Log in to your email account and locate the email from Salesforce.

        Security Token email

      3. Construct the Password value by appending the security token to the password that you use to log in to your Salesforce instance; for example, MypasswordMysecuritytoken.
    • Client Id: Specify the consumer key that App Connect uses to identify itself to Salesforce. This key is generated when you create a connected app for App Connect in your Salesforce instance.
    • Client secret: Specify the consumer secret that identifies App Connect as the owner of the consumer key. This secret is generated when you create a connected app for App Connect in your Salesforce instance.

      To obtain values for the Client Id and Client secret fields, you’ll require a connected app that will enable App Connect to integrate with Salesforce by using APIs and protocols. You can create a connected app as documented in the steps that follow. If you already have a connected app that you would like to use, skip to step (b) below to locate the consumer key and consumer secret that were generated when you created the connected app.

      Note: The following Salesforce user permissions are required to create a connected app: Customize Application AND either Modify All Data OR Manage Connected Apps.

      To create a connected app and generate the Client Id and Client secret values, complete the following steps:

      1. From your Salesforce instance, create a connected app as follows:
        1. Go to Setup (Setup icon in Salesforcce) and then click Apps > App Manager in the navigation pane.
        2. Click New Connected App.
        3. In the New Connected App page, specify basic information for the connected app and then enable OAuth settings for integration with the Salesforce API:
          • Connected App Name: Specify a unique name for the connected app.
          • API Name: Accept the default value that is generated when you click within this field.
          • Contact Email: Specify an email address that Salesforce can use to contact you if required. (This can be the email address specified under your user profile or an administrator’s email address.)
          • Enable OAuth Settings: Select this check box.
          • Callback URL: Select the Enable for Device Flow check box to generate a callback URL, or manually specify any valid secure URL. (This URL will not be used by your connected app).
          • Selected OAuth Scopes: Select Access and manage your data (api) in the Available OAuth Scopes list and add it to the Selected OAuth Scopes list.

          New Connected App page

        4. Click Save and click Continue.
        5. Click Manage.

          Manage Connected App

        6. In the OAuth Policies section, ensure that Permitted Users is set to All users may self-authorize. If this option is not selected, connections might fail even if the correct credentials are supplied.

          OAuth policies

      2. Locate the consumer key and consumer secret that were generated for the connected app:
        1. Under Setup (Setup icon in Salesforcce), click Apps > App Manager in the navigation pane.
        2. Click the options menu for the connected app that you just created and then click View.

          View option for the connected app

        3. In the API (Enable OAuth Settings) section of the resulting page, locate and then copy the values in these fields:
          • Consumer Key: Set this as the value for the Client Id field.
          • Consumer Secret: Set this as the value for the Client secret field.

          Consumer Key and Consumer Secret values

    • Example of completed fields for connecting from App Connect

      Example of Salesforce connection details for a local connector

  2. Click Connect (and click Continue to close the message about your Salesforce account requirements).

Considerations for connected apps

When connected, IBM App Connect services, like “IBM App Connect Prod UK”, are listed on the Salesforce ‘Connected Apps OAuth Usage’ page:

Salesforce has a limit of 5 connected apps per user for your organisation. After a fifth approval is made for a connected app, the oldest approval is revoked. In instances of an App Connect service, avoid creating more than 5 accounts across all Salesforce applications in the App Connect catalog. The maximum 5 accounts might also be reduced by other Salesforce connected apps, such as user-agent flows. For more information about this consideration, see the Salesforce docs “Manage OAuth-Enabled Connected Apps Access to Your Data” at https://help.salesforce.com/articleView?id=remoteaccess_request_manage.htm. (If such revoked access affects IBM App Connect, when you try to use the associated Salesforce account in a flow you’ll see a message like “We can’t connect to Salesforce with the account details that you provided.”.)

General considerations for using Salesforce in App Connect

  • App Connect performs optimized event handling for Salesforce. For Salesforce events, you can use the following subset of standard objects that are supported by Salesforce PushTopic queries: Account, Campaign, Case, Contact, Lead, Opportunity, and Task.
  • If platform events are defined in your Salesforce org to deliver custom event notifications when something meaningful happens, you can add those platform events to your App Connect flows either as an event that consumes an event notification from Salesforce, or an action that publishes an event notification. To help you easily identify platform events in App Connect, we’ve appended the label (Platform event) to each platform event in the Salesforce list of events and actions.
    • Example: How to identify a platform event in App Connect

      (Platform event) label that identifies platform events in event and action lists

    • To add a platform event as an App Connect event that triggers a flow, you’ll need to use the Configure more events link to display additional Salesforce objects, and then locate and select the platform event that you want to add to the flow.

      Tip: To quickly search for a platform event in the list of events or actions that are discovered, you can type (plat in the search field, as a filter.

      You can optionally map to the platform event fields in subsequent nodes in the flow, in order to pull in data from the event notification. When the flow runs, the configured actions will be processed whenever a new event notification (that is, an instance of the platform event) is published in your Salesforce org.

      • Example: Selecting a platform event as an App Connect event

        Adding a platform event as an App Connect event that triggers a flow

      • Example: Mapping to platform event fields from an App Connect action

        Adding mapped platform event fields to an App Connect action

    • To add a platform event to a flow as an App Connect action, you’ll need to use the Show More link to display additional Salesforce objects, and then locate and select the platform event for which you want to create (or publish) an event notification. In the resulting “Create” node, you can then complete the custom fields that were configured in the Salesforce platform event definition. When the flow runs, App Connect will publish the event notification, and any Salesforce after insert trigger on that event will fire.
      • Example: Selecting a platform event as an App Connect action

        Adding a platform event as an App Connect action

      • Example: Custom fields in the platform event definition and in the corresponding App Connect action

        Example of custom fields in a platform event definition in Salesforce

        Example of custom fields for a platform event in an App Connect action

  • When you use Salesforce as a target application, make sure that you identify the required fields for the record you are creating and assign values to these fields. For example:
    • If you are creating a lead, you must provide values for the Last Name and Company fields.
    • If you are creating an account, you must provide a value for the Account Name field.

    Some Salesforce actions also have specific dependencies. For example, when creating an order, you must add that order to a contract or an account. So for the “Create order” action, in addition to the required fields (marked with *), you’ll need to also complete the Contract ID or Account ID field. If missing, an error is generated to highlight such dependencies when you run the flow.

    Salesforce error for missing dependencies

  • For certain Salesforce actions, you’ll need to specify unique ID numbers. For example, for the “Create order” action, a Contract ID or Account ID value is needed. You can either enter a hardcoded value or map to a value from a previous node in the flow.

    Specifying Salesforce IDs

    If needed, you can obtain a hardcoded ID from the URL of the relevant Salesforce record. In the following example, you can see that the contract number 00000101 has an Contract ID value of 8000Y000000lfvG. (And you can obtain the Account ID in a similar way from an open account record.)

    Finding a Salesforce  ID value

  • When specifying dates, use the ISO standard format YYYY-MM-DD. For example, specify 19 September 2017 as 2017-09-19.

Examples

When I add a new lead in Marketo, a lead is updated or created in Salesforce

Learn how easy it is to use App Connect to connect Marketo to Salesforce so that every time a new lead is added in Marketo, a lead record with the same information is automatically updated or created in Salesforce.

When I create a new case in Salesforce, a message classified by Watson Natural Language Classifier is created in Slack

Learn how easy it is to create an event-driven flow in App Connect Designer to classify the text from a Salesforce case. Then, after the text has been classified, automatically create a message in Slack identifying the type of case that has been raised and the case number.

Retrieve SAP data to enhance actions on Salesforce and other apps

Learn how easy it is to create an event-driven flow in App Connect Designer to retrieve OData resources from SAP and use the SAP data to enhance actions on Salesforce and other apps.

Create an API flow that when called creates a subscription in SAP and creates a contact in Salesforce

Learn how easy it is to create an API flow in App Connect Designer, such that when the API is called by a web/mobile app App Connect creates a subscription in SAP and creates a contact in Salesforce.

Examples with App Connect Professional Studio

Synchronizing account data from SAP to Salesforce.com using IBM App Connect Professional

Learn how to use IBM App Connect Professional on Cloud to synchronize account records in SAP in a private network with Salesforce.com’s cloud offerings

Moving bulk data from SAP to Salesforce with IBM App Connect Professional

Learn about techniques to move bulk data (thousands of records) from SAP to Salesforce.com. Using these techniques, you can create or update hundreds of Salesforce objects in one API request, making the most of the Salesforce.com limits for the total API requests per 24-hour period.

10 comments on"How to use IBM App Connect with Salesforce"

  1. The Salesforce Library and Salesforce files always returned back an error when I tried to connect with an account. Is there a way to fix it? It works fine for the Salesforce module. Just not the two that I mentioned

    • Ian_Larner March 27, 2020

      @Joe Hi
      Thanks for the feedback.
      I’ve replicated the problem in testing and opened issues with the squad responsible for the Salesforce Files and Salesforce Libraries connectors. When I get an update from them, I’ll let you know (or ask them to contact your email address).

      Update 30 March 2020: We have identified the error thrown by Salesforce files and libraries, and are working with Cloud Elements on resolving this issue.

      Are you using the App Connect Lite plan (free)? If you’ve got a different plan, you could also open a case for IBM Cloud Support to track and push. See https://cloud.ibm.com/unifiedsupport/supportcenter

      Regards,
      Ian

  2. Hello, I get the following error when trying to connect to Salesforce instance from the Salesforce connector on the App Connect Flow designer. I get the same error regardless of what SF instance name i provide or dont provide.

    error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

    pls help.
    Thanks

    • @Pasha Hi,
      There was a transient problem that is now fixed. You should be able to connect OK now.
      Regards, Ian

  3. Bennett Manalo January 17, 2020

    Hi, Is there a guide to setup connection to Salesforce Marketing Cloud?

    • Hi Bennett,
      We’re working on some templates and what “How to” info might be needed.
      Regards,
      Ian

  4. Stefan Talkenberg September 12, 2018

    What API does the IGI adapter for Salesforce.com use? SOAP or REST?

  5. Hello,

    Hoping everything is good.

    I had built a flow from your samples but even when the flow is running without errors I dont get the data from salesforce into cloudant.

    flow:
    salesforce(new contactt) — > cloudant database.

    Thanks

    • Hello Garu,
      Thanks for the feedback. At this moment there’s an issue with Salesforce / New Contact event as a trigger, which we’re working on fixing.

      As an alternative to the New Contact event, you can use the equivalent polling event for New Contacts:

      For the first node in your flow, select Salesforce > Configure more events…
      Select the event Contact > New Contacts
      Optionally change the polling parameters, as described in the polling tutorial

      Apart from that first node, the rest of the tutorial is the same.

      In the window “Select the event to configure for Salesforce ” you’ll notice the large range of Salesforce objects that are available for use through polling.

      Regards,
      Ian

      • Hello Ian,

        Thank for your response.

        I’ll try your suggestion immediately.

        Regards

Join The Discussion

Your email address will not be published. Required fields are marked *