Skip to main content

Salesforce Integration

This article covers the steps to integrate Hatz and Salesforce.

Getting Started

The integration with Salesforce uses Salesforce's MCP server through an External Client App that is created in Salesforce. This integration needs to be connected by each user that wants to integrate and make tool calls to Salesforce.

Follow the below steps to create the External Client App in Salesforce, enable MCP functionality in Salesforce and configure the integration with Hatz.

How Salesforce's Hosted MCP Servers Work

Salesforce's Hosted MCP Servers let MCP clients work with your Salesforce org through Salesforce-managed MCP endpoints. Hatz connects as the MCP client. Each user signs in with their own Salesforce account, and Salesforce still enforces that user's object permissions, field-level security, and sharing rules.

Prerequisites

In order to create the External Client App and enable MCP in Salesforce you need access to "Setup" in Salesforce.

Integration Process

Create External Client App in Salesforce

Follow the below steps to create the External Client App in Salesforce and get the Client ID and Client Secret:

  • Log in to Salesforce, select the gear icon in the top right and select "Setup"

  • In the top left search for "External Client App Manager" and select "External Client App Manager"

  • Select the "New External Client App" button in the top right

  • Enter a name, such as "Hatz AI MCP", and a contact email

  • Expand the "API (Enable OAuth Settings)" section and select the box to enable OAuth

  • Add the OAuth scopes "Perform requests at any time (refresh_token, offline_access)" and "Access Salesforce hosted MCP servers (mcp_api)"

  • Under the Security section only have "Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows" and "Issue JSON Web Token (JWT)-based access tokens for named users" checked off

  • Once the app is created, select the Settings tab at the top, expand the "OAuth Settings" section and select the "Consumer Key and Secret" button

  • Copy the Consumer Key and Secret to be used for the connection in Hatz

Enable MCP Servers in Salesforce

Follow the below steps to enable MCP servers in Salesforce:

  • Log in to Salesforce, select the gear icon in the top right and select "Setup"

  • In the top left search for "MCP Servers" and select "MCP Servers" under API Catalog

  • Determine which Salesforce hosted MCP you want to use and click into it

  • Select the "Activate" button in the top right

Integrate Salesforce in Hatz

Follow the below steps to setup the integration between Hatz and Salesforce:

  • Log in to Hatz, select the Workshop tab at the top and then select "Connections" on the left

  • Search for Salesforce and select "Add" on the Salesforce integration

  • Input the "Consumer Key (Client ID)" and "Consumer Secret (Client Secret)" from the External Client App created in Salesforce

  • Select the Salesforce MCP server from the dropdown

  • Select "Connect Salesforce" and confirm that Salesforce is successfully connected

Reference links

Did this answer your question?