Spaces:
Build error
Build error
title: Salesforce Data Loader | |
emoji: π | |
colorFrom: blue | |
colorTo: purple | |
sdk: gradio | |
sdk_version: 4.20.0 | |
app_file: app.py | |
pinned: false | |
license: mit | |
# π Salesforce Data Loader | |
A powerful, user-friendly web application for uploading and downloading data from Salesforce. Built with Gradio and designed for easy bulk data operations. | |
## β¨ Features | |
### π Secure Authentication | |
- Connect to Salesforce production or sandbox environments | |
- Secure credential handling with username, password, and security token | |
- Real-time connection status feedback | |
### π€ Data Upload | |
- **File Support**: Upload CSV and Excel files (.csv, .xlsx, .xls) | |
- **Bulk Operations**: | |
- **Insert**: Add new records | |
- **Update**: Modify existing records | |
- **Upsert**: Insert or update based on external ID | |
- **Object Support**: Works with common Salesforce objects (Account, Contact, Lead, Opportunity, Case, etc.) | |
- **Field Mapping**: Automatic field detection and validation | |
- **Results Tracking**: Download detailed results with success/error reports | |
### π₯ Data Export | |
- Export data from any accessible Salesforce object | |
- Select specific fields to export | |
- Configurable record limits (100-10,000 records) | |
- Download as CSV format | |
- SOQL query generation | |
### π‘οΈ Error Handling | |
- Comprehensive error reporting | |
- Field validation and type checking | |
- Bulk operation result tracking | |
- Detailed logging for debugging | |
## π How to Use | |
### 1. Connect to Salesforce | |
1. Navigate to the **π Connection** tab | |
2. Enter your Salesforce credentials: | |
- **Username**: Your Salesforce email | |
- **Password**: Your Salesforce password | |
- **Security Token**: Get this from Salesforce Setup β Personal Information β Reset Security Token | |
3. Check "Sandbox Environment" if connecting to a sandbox | |
4. Click "π Connect to Salesforce" | |
### 2. Upload Data | |
1. Go to the **π€ Upload Data** tab (appears after successful connection) | |
2. Upload your CSV or Excel file | |
3. Select the target Salesforce object | |
4. Choose operation type: | |
- **Insert**: For new records | |
- **Update**: For existing records (requires record IDs) | |
- **Upsert**: For insert/update based on external ID | |
5. Click "π€ Upload Data" | |
6. Download the results file to see detailed operation results | |
### 3. Export Data | |
1. Go to the **π₯ Export Data** tab | |
2. Select the Salesforce object to export | |
3. Choose specific fields or leave empty for default fields | |
4. Set the record limit (max 10,000) | |
5. Click "π₯ Export Data" | |
6. Download the exported CSV file | |
## π Supported Salesforce Objects | |
- **Account** - Companies and organizations | |
- **Contact** - Individual people | |
- **Lead** - Potential customers | |
- **Opportunity** - Sales deals | |
- **Case** - Customer service cases | |
- **Campaign** - Marketing campaigns | |
- **User** - Salesforce users | |
- **Product2** - Products and services | |
*Note: The application automatically detects which objects you have access to based on your Salesforce permissions.* | |
## π§ Technical Requirements | |
### For Users | |
- Valid Salesforce credentials (username, password, security token) | |
- CSV or Excel files for data upload | |
- Modern web browser | |
### For Developers | |
- Python 3.8+ | |
- Required packages (see requirements.txt): | |
- gradio==4.32.0 | |
- simple-salesforce==1.12.6 | |
- pandas==2.1.4 | |
- openpyxl==3.1.2 | |
- xlsxwriter==3.1.9 | |
- python-dotenv==1.0.0 | |
- requests==2.31.0 | |
- numpy==1.24.3 | |
## π Security & Privacy | |
- **No Data Storage**: Your Salesforce credentials and data are not stored on our servers | |
- **Secure Connections**: All API calls use HTTPS encryption | |
- **Session-Based**: Connections are only maintained during your browser session | |
- **Local Processing**: File processing happens in real-time without permanent storage | |
## π¨ Important Notes | |
1. **Security Token**: If you've never used the security token, reset it in Salesforce Setup | |
2. **API Limits**: Be mindful of your Salesforce API call limits | |
3. **Field Mapping**: Ensure your CSV/Excel column names match Salesforce field names | |
4. **Required Fields**: Make sure all required Salesforce fields are included in your data | |
5. **Data Validation**: Review your data before upload to avoid errors | |
## π οΈ Local Development | |
To run this application locally: | |
```bash | |
# Clone the repository | |
git clone <your-repo-url> | |
cd salesforce-data-loader | |
# Install dependencies | |
pip install -r requirements.txt | |
# Run the application | |
python app.py | |
``` | |
The application will be available at `http://localhost:7860` | |
## π€ Contributing | |
Contributions are welcome! Please feel free to submit a Pull Request. | |
## π License | |
This project is licensed under the MIT License - see the LICENSE file for details. | |
## π Support | |
If you encounter any issues: | |
1. Check your Salesforce credentials and permissions | |
2. Verify your security token is current | |
3. Ensure your data format matches Salesforce field requirements | |
4. Review the error messages in the results download | |
--- | |
**Built with β€οΈ using Gradio and Simple-Salesforce** |