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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_tools_salesforce-0.4.0.tar.gz
Algorithm Hash digest
SHA256 755f7b1109c48928823828892b7abec84a1321dc17f19ee1ca961ff41b8b68cd
MD5 c181b9799711df456eefa25fbaf87da7
BLAKE2b-256 64a712f782cce9064df59a7526215f2b77a4fa033a6e94d47214465d4c535a25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_tools_salesforce-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de0155683f8d229ec350271e8644376545cd192a7bbfd0998fcb6b49cf076ad5
MD5 13c6f412093bb4a3209ef0b742728701
BLAKE2b-256 e3d18d058464b634280afd6869f56bcc6bcb52446d0038e361f7d2830cc713aa

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