Skip to main content

Salesforce Tool

This tool connects to a Salesforce environment and allow the Agent to perform SOQL and SOSL queries.

Usage

This tool is a wrapper tool using the simple salesforce library. More information on this library here

Here's an example usage of the Salesforce Tool:

from llama_index.tools.salesforce import SalesforceToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

# Initialize the tool with your Salesforce credentials and other relevant details
sf = SalesforceToolSpec(
    username=sf_username,
    password=sf_password,
    consumer_key=sf_consumer_key,
    consumer_secret=sf_consumer_secret,
    domain="test",
)

agent = FunctionAgent(
    tools=sf.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("List 3 Accounts in Salesforce"))
print(await agent.run("Provide information on a customer account John Doe"))

execute_sosl - Returns the result of a Salesforce search as a dict decoded from the Salesforce response JSON payload.

execute_soql - Returns the full set of results for the query. The returned dict is the decoded JSON payload from the final call to Salesforce, but with the totalSize field representing the full number of results retrieved and the records list representing the full list of records retrieved.

This loader is designed to be used as a way to load data as a Tool in a Agent.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_salesforce-0.6.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_tools_salesforce-0.6.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_salesforce-0.6.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_salesforce-0.6.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_salesforce-0.6.0.tar.gz
Algorithm Hash digest
SHA256 5d4e039f0a6195c85f77cfac7d2b266a900a2c77e82a0e32190476d6c198a122
MD5 97de20a10442b25f403329ed083f0341
BLAKE2b-256 50167ece1c45d5fcdb4dc20ab812ce9acbcff5bf82ddbba7493b31070686d538

See more details on using hashes here.

File details

Details for the file llama_index_tools_salesforce-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_tools_salesforce-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_salesforce-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1040bb7a2979dc2b07dad9e73596e4bea2a3a038f98900fc42c38c2c7666f6c
MD5 eca9a5dcf5d3fe0f8b8c8891d0d09bc1
BLAKE2b-256 2363eb97920f37571832669c9d8eab5bdd0978e5da609d7a45a5b3dc214dc0eb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page