Salesforce

Connect Salesforce

salesforce_connect · Changes data · Markdown

Connects the company's Salesforce org through its own connected app.

Free

This tool costs nothing to call.

An example

Connect our Salesforce. Here are the My Domain and the consumer key.

Your agent callssalesforce_connectFree

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "my_domain": "hansen-voss.my.salesforce.com",
  "client_id": "3MVG9example.consumer.key"
}
What comes back
{
  "link": "https://conecto.chat/api/bots/connect/EaXI6itAbwfsENbs1X6Wqg3fAfXJ8hL-BnaIFRgpW_U",
  "expires_in_minutes": 60,
  "tell_the_owner": "Open this link within the hour, sign in to Conecto and type the Salesforce connected app's consumer secret there. It goes to Conecto only; I never see it.",
  "from_a_terminal": "npx @conecto-chat/cli@latest run salesforce_connect -i '{\"my_domain\": \"hansen-voss.my.salesforce.com\", \"client_id\": \"3MVG9example.consumer.key\"}' -s secret",
  "from_a_terminal_with_curl": "printf %s 'Consumer secret: '; read -rs v1; echo; curl -sS -H \"Authorization: Bearer $CONECTO_KEY\" --data-urlencode secret@<(printf %s \"$v1\") https://conecto.chat/api/bots/connect/EaXI6itAbwfsENbs1X6Wqg3fAfXJ8hL-BnaIFRgpW_U; unset v1",
  "next": "When the owner types it on the link, account.credential_added (account_events) says so, with what salesforce_connect answered."
}

Use it when

The company keeps its customers in Salesforce and wants the agent to work in them there.

What it does

Connect the company's own Salesforce org, which stays the source of truth: the agent queries, reads and changes its records. The company makes a connected app with the OAuth client credentials flow switched on and a run-as user whose profile limits what the agent may touch, and gives the org's My Domain and the app's consumer key. Called without secret, it answers with a link for the owner, who types the consumer secret on a Conecto page, so it never passes through the chat (from_a_terminal does the same from a terminal); account.credential_added says when it is connected. The keys are checked before anything is kept. On accounts with an owner, changing an existing record waits for the owner's approval by default. Free.

What comes back

Without secret: link, a page where the owner or an admin, signed in, types the consumer secret, with expires_in_minutes, tell_the_owner, from_a_terminal (the CLI), from_a_terminal_with_curl and next. With secret: salesforce, my_domain and connected_at; need_approval, the tools that now wait for the owner. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
my_domainRequiredstringLike hansen-voss.my.salesforce.com. 10 to 200 characters.
client_idRequiredstring10 to 300 characters.
secretstringThe connected app's consumer secret. Never shown again. Leave it out to get the link instead. 8 to 500 characters.

The call

Over MCP, call salesforce_connect on https://api.conecto.chat/mcp/salesforce. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/salesforce_connect \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"my_domain":"hansen-voss.my.salesforce.com","client_id":"3MVG9example.consumer.key"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400my_domain is not a My Domain.Give one like acme.my.salesforce.com.
vendor_rejected502Salesforce refused the keys.Switch on the client credentials flow and set a run-as user.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md