Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: add Salesforce tools and API wrapper #29750

Closed
wants to merge 10 commits into from

Conversation

colesmcintosh
Copy link
Contributor

Title: community: add Salesforce tools and API wrapper

Description:
This PR introduces Salesforce integration tools within the community package, providing utilities for querying, listing objects, and retrieving metadata using SOQL. It includes:

  • A comprehensive Salesforce API wrapper to streamline interactions.
  • Utility classes for querying and listing Salesforce objects.
  • Improved error handling and type safety.
  • Exported Salesforce tool classes for easy import.
  • Added simple-salesforce as a dependency for testing.
  • Refactored query handling for improved result compatibility.
  • Comprehensive unit tests with a mock Salesforce client and test cases for query tools.

Issue: N/A

Dependencies:

  • Added simple-salesforce to pyproject.toml for testing.

Tests & Documentation:

  • Unit tests covering successful queries and error handling.
  • Fixtures and mocks for Salesforce interactions.
  • Example notebook demonstrating tool usage.

Add Salesforce integration with tools for querying, listing objects, and retrieving object information. Includes a comprehensive API wrapper to interact with Salesforce using SOQL queries and metadata retrieval.
Add simple-salesforce library to pyproject.toml to support Salesforce integration testing
Add exports for Salesforce tool classes in the __init__.py file, making them easily importable from the package
- Add type checking for Salesforce import
- Enhance error handling and import mechanism
- Improve docstrings and code formatting
- Add `__all__` export for better module clarity
- Refactor error messages and result formatting
- Enhance QuerySalesforceTool to handle dictionary results
- Simplify type imports and code formatting
- Improve result conversion for better compatibility
- Minor code cleanup and type annotations
- Create mock Salesforce client for testing
- Implement test cases for QuerySalesforceTool
- Add tests for InfoSalesforceTool and ListSalesforceTool
- Cover successful query and error handling scenarios
- Provide fixtures and mocking for Salesforce interactions
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 12, 2025
Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2025 7:03am

@dosubot dosubot bot added the community Related to langchain-community label Feb 12, 2025
@colesmcintosh colesmcintosh marked this pull request as draft February 12, 2025 14:21
Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, thanks for this. This adds a net-new integration into langchain-community. We are recommending that new contributions be implemented via separate packages. Would you be interested in publishing an OSS integration package (e.g., langchain-salesforce)? We've written a walkthrough on this process here:

https://python.langchain.com/docs/contributing/how_to/integrations/

We are encouraging contributors of LangChain integrations to go this route. This way we don't have to be in the loop for reviews, you're able to properly integration test the tool, and you have control over versioning.

Docs would continue to be maintained in the langchain repo.

Let me know what you think!

@ccurme ccurme closed this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants