Skip to main content

llama-index tools salesforce integration

Project description

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.

Project details


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.5.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.5.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_index_tools_salesforce-0.5.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.5.0.tar.gz
Algorithm Hash digest
SHA256 8a4950de6b253ea9af9baf7beb2b105dae07dd7c5a73e8974703f3dd8158a0c0
MD5 3ba00f77e35c62a40de6dad3d5a49da5
BLAKE2b-256 01843334265cc3f70d1127906038e230414fd6db8abe476405dcf2175f70a643

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_index_tools_salesforce-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c929242cc6dac0dc460215c320fd341748072829da5033ed4052147af20a77e5
MD5 36067b92f4139abd0fb82951c27faa37
BLAKE2b-256 325013fefebdd5af9ba8dfb525adab0e24e2aa008e1ea50944f4c407e0a78912

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page