Salesforce Plugin for Dify
Author: langgenius
Version: 0.0.1
Type: Tool Plugin
Description
The Salesforce Plugin enables seamless integration with Salesforce CRM, allowing AI agents to interact with Salesforce directly from Dify. This plugin provides tools for case management and Chatter messaging functionality.
Features
- Case Management: Create and track customer support cases in Salesforce
- Chatter Messaging: Send messages and post updates through Salesforce Chatter
- Secure Authentication: Uses username, password, and security token for secure API access
- Sandbox Support: Compatible with both production and sandbox environments
Tools
1. Create Case
Creates a new case in Salesforce with customizable fields.
Parameters:
- (required): Brief summary of the case
- (required): Detailed description of the issue
- (optional): High, Medium, or Low (default: Medium)
- (optional): Case status (default: New)
- (optional): Channel through which case was created (Phone, Email, Web, Chat)
- (optional): Salesforce Contact ID to associate with the case
- (optional): Salesforce Account ID to associate with the case
Returns:
- Case ID, Case Number, and full case details
2. Send Message
Posts messages through Salesforce Chatter to user feeds, groups, or records.
Parameters:
- (required): The text content of the message
- (optional): Target User, Group, or Record ID (defaults to current user)
- (optional): TextPost, LinkPost, or ContentPost (default: TextPost)
- (optional): URL to share (for LinkPost type)
- (optional): Title for the post
Returns:
- Feed Item ID and post details
Configuration
Before using the plugin, you need to configure your Salesforce credentials:
Required Credentials:
- Username: Your Salesforce account email address
- Password: Your Salesforce account password
- Security Token: Your Salesforce security token
Optional Credentials:
- Domain: Leave empty for production, or enter 'test' for sandbox environment
Getting Your Security Token:
- Log in to Salesforce
- Navigate to Settings → My Personal Information → Reset My Security Token
- Click "Reset Security Token"
- Check your email for the new security token
Usage Examples
Creating a Case
Posting to Chatter
API Version
This plugin uses the library version 0.1.45 to interact with Salesforce APIs.
Troubleshooting
Authentication Failed
- Verify your username, password, and security token are correct
- Ensure your password + security token are concatenated correctly
- Check if you're using the correct domain (production vs sandbox)
Permission Denied
- Ensure your Salesforce user has the necessary permissions
- For Chatter functionality, verify Chatter is enabled for your organization
- Check if your user profile has access to the Case object
Connection Issues
- Verify network connectivity
- Check if your IP address is whitelisted in Salesforce (if IP restrictions are enabled)
- Ensure Salesforce API is available and not under maintenance
Security
This plugin requires sensitive credentials to function. Always:
- Store credentials securely
- Never commit credentials to version control
- Use environment-specific credentials
- Regularly rotate security tokens
- Follow your organization's security policies
Support
For issues, questions, or contributions, please contact the plugin author or refer to the Dify Plugin documentation.
License
Please refer to the LICENSE file for licensing information.