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.

Metadata

Release files for llama-index-tools-salesforce 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-salesforce 0.7.0
File Size Uploaded Provenance Actions
llama_index_tools_salesforce-0.7.0.tar.gz 4.1 kB Without provenance Details for llama_index_tools_salesforce-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-salesforce 0.7.0
File Interpreter ABI Platform Actions
llama_index_tools_salesforce-0.7.0-py3-none-any.whl Python 3 none any Details for llama_index_tools_salesforce-0.7.0-py3-none-any.whl

Total release size: 7.9 kB

Release files / llama_index_tools_salesforce-0.7.0.tar.gz

Download URL llama_index_tools_salesforce-0.7.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8d53039008b8eaa55d2039192b325713266b618263d398f094530956b89bd00c
BLAKE2b-256 checksum
How to use checksums
74814c6c1b830455f56d33a55a433f78bff489392318e655013846d5156158cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_tools_salesforce-0.7.0-py3-none-any.whl

Download URL llama_index_tools_salesforce-0.7.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3278bdbf83f7f0c79563c833930d587aa50a1ecf029db17e68c4e71998be07b8
BLAKE2b-256 checksum
How to use checksums
1c47a102fb8ede9983f9180100aa27af707c6f8f71e94322aeac3096fe447114
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-tools-salesforce 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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