proxy-lite-demov3 / README.md
Trisha Tomy
fixes + cleanup flow
c73909d
---
title: Proxy Lite Experimental
emoji: 🐨
colorFrom: green
colorTo: purple
sdk: docker
pinned: false
---
# Proxy-lite Salesforce Automation
A Salesforce automation system using Proxy-lite that works with any Salesforce org. The backend is already deployed and ready to use - you just need to add the Lightning Web Component to your org.
## βœ… What You Need
- A Salesforce org (any org)
- Salesforce CLI (sfdx)
- Your Salesforce username and password
## πŸš€ Quick Setup (5 minutes)
### Step 1: Deploy the Lightning Web Component
```bash
# Clone this repository
git clone [your-repo-url]
cd proxy-litev2\ copy
# Deploy to your Salesforce org
cd proxy-lite-work
sfdx force:auth:web:login -a yourorg
sfdx force:source:push -u yourorg
```
### Step 2: Add Component to Your Page
1. Go to **Setup** β†’ **Lightning App Builder**
2. Edit any Lightning page (like Home page)
3. Add the **"Salesforce Automation with Proxy Lite"** component
4. Save and activate
### Step 3: Use the Component
1. Open the Lightning page where you added the component
2. Select a target page from the dropdown
3. Enter your automation task (e.g., "Enable the toggle switch")
4. Click "Run Automation"
**That's it!** The component will connect to the already-deployed backend automatically.
## πŸ”§ How It Works
- **Backend**: Already deployed on Hugging Face Spaces (no setup needed)
- **Frontend**: Lightning Web Component in your Salesforce org
- **Authentication**: Uses your Salesforce credentials automatically
- **URLs**: Dynamically adapts to your org's domain
## πŸ“‹ Supported Automation Tasks
The system can automate various Salesforce setup pages:
- Warranty Lifecycle Management
- Account Forecasting Settings
- Sales Agreements
- Account Manager Targets
- Custom tasks on any setup page
## πŸ› οΈ Advanced Configuration (Optional)
### Custom Endpoint (Enterprise Users)
If you need your own private instance:
1. **Fork this repository**
2. **Deploy to Hugging Face Spaces**:
- Create a new Space
- Connect your forked repo
- Set environment variables:
```
GEMINI_API_KEY=your_key
SALESFORCE_USERNAME=your_username
SALESFORCE_PASSWORD=your_password
```
3. **Update Apex Class**:
- Go to **Setup** β†’ **Apex Classes** β†’ **ProxyLiteService**
- Update the endpoint URL in `getProxyLiteEndpoint()` method
### Environment Variables for Custom Deployment
Only needed if deploying your own instance:
```env
# Required: At least one API key
GEMINI_API_KEY=your_gemini_api_key
HF_API_TOKEN=your_hf_token
# Required: Your Salesforce credentials
[email protected]
SALESFORCE_PASSWORD=your_salesforce_password
# Optional: Browser settings
BROWSER_HEADLESS=true
BROWSER_VIEWPORT_WIDTH=1280
BROWSER_VIEWPORT_HEIGHT=720
```
## πŸ” Troubleshooting
### Common Issues
1. **Component not showing**: Check if you've pushed the LWC to your org
2. **"Endpoint not configured" error**: The Apex class needs the correct endpoint URL
3. **Authentication errors**: Verify your Salesforce credentials work
4. **Timeout errors**: Large tasks may take time - be patient
### Debug Steps
1. Check browser console for errors
2. Verify the LWC is properly deployed
3. Test with a simple task first
4. Check Salesforce debug logs
## πŸ’‘ Why This Approach?
- **No Python setup needed** - Backend already deployed
- **Works with any Salesforce org** - No hardcoded URLs
- **Free to use** - Powered by Hugging Face Spaces
- **Secure** - Uses your org's authentication
- **Simple deployment** - Just add the LWC component
## πŸ†˜ Support
If you encounter issues:
1. Check the troubleshooting section above
2. Verify your Salesforce org permissions
3. Test with a different browser
4. Check the component is properly added to your page
## πŸ“„ License
This project is licensed under the MIT License.