Contact Us 1-800-596-4880

Running Connectors

Learn how to run your connector. Running a connector involves configuring and deploying the connector.

Connector Builder supports running your connector in Anypoint Platform and in Salesforce Flow.

Run Connectors in Anypoint Platform

You can run a connector in Anypoint Studio or Anypoint Code Builder.

Run Connectors in Salesforce Flow

To run a Flow connector built with Connector Builder, deploy the connector JAR to a Salesforce org as an IntegArtifactDef metadata component using Salesforce CLI. After deployment, the connector appears under Automation > Integrations in the org and is available as an action inside Flow Builder.

Prerequisites

  • Salesforce CLI installed.

  • A Salesforce org with the custom connectors feature enabled and Dev Hub turned on, with Unlocked Packages and Second-Generation Managed Packages enabled.

  • The Flow connector JAR produced by Packaging Connectors. The JAR file name follows the pattern {projectname}-flow-connector-model-{version}-dw-library.jar.

Deploy the Flow Connector to a Salesforce Org

  1. Log in to your org from Salesforce CLI:

    sf org login web -r <org-url>
    Lightning URLs are not supported.
  2. Generate a Salesforce project to host the connector metadata:

    sf project generate --output-dir my-workspace --name my-project
  3. In my-workspace/my-project/sfdx-project.json, set "sourceApiVersion": "66.0".

  4. Inside the project folder, create a folder for the connector under force-app/main/default/integArtifactDefs/:

    mkdir -p force-app/main/default/integArtifactDefs/<ConnectorName>/
  5. Inside that folder, create a <ConnectorName>-meta.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
    <IntegArtifactDef xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <description>{description}</description>
        <displayName>{displayName}</displayName>
        <groupId>{groupId}</groupId>
    </IntegArtifactDef>
  6. Create a versioned subfolder for the connector JAR and place the JAR inside it:

    mkdir -p force-app/main/default/integArtifactDefs/<ConnectorName>/<VersionString>/
  7. Deploy the connector to the org:

    sf project deploy start -m "IntegArtifactDef:<ConnectorName>" --target-org <your-org-username>

The connector appears under Automation > Integrations in your org and can be selected as an action in Flow Builder.