Salesforce Bulk upsert with generated uuid CLI with Beautiful HTML Reports
npm install sf-bulk-upsert-uuid> A powerful and beautiful command-line tool for bulk updating Salesforce records with generated uuid with interactive HTML reports.
- š Beautiful HTML Reports with dark/light theme
- š Interactive DataTable with sorting, search, and pagination
- š„ CSV Export functionality
- š Auto UUID Generation for external IDs
- šØ Colorful CLI Output with step-by-step progress
- ā” Salesforce CLI Integration using sf commands
- š Real-time Statistics (processed, failed, total records)
- š Auto-opens Report in your default browser
- Node.js 16.x or higher
- Salesforce CLI (sf) installed and authenticated
- Active Salesforce org connection
- Make sure to have required ExternalId field (example: External_Id__c) in the SObject
!Example- ExternalId
``bash`
npm install -g @salesforce/cli
`bash`
sf org login web -a myorg
`bash`
npm install -g sf-bulk-upsert-uuid
`bash`
sf-uuid-filler -o
| Option | Description | Example |
|--------|-------------|---------|
| -o, --org | Salesforce org username or alias | myorg@example.com |-s, --sobject
| | SObject API name | Account, Contact |-q, --query
| | SOQL query to fetch records | "SELECT Id, Name FROM Account" |
| Option | Description | Default |
|--------|-------------|---------|
| -e, --external-id | External ID field name | Auto-generates UUID |-w, --wait
| | Wait time for bulk job completion | 10 |-f, --file
| | Use existing CSV file instead of query | - |
`bash`
sf-uuid-filler \
-o myorg@example.com \
-e External_Id__c
-s Account \
-q "SELECT Id, Name, Industry, AnnualRevenue FROM Account WHERE Industry = 'Technology' LIMIT 100"
The generated HTML report includes:
1. Authenticate: Connects to Salesforce org using provided username
2. Query: Executes SOQL query to fetch records (or uses CSV file)
3. Process: Adds external ID (UUID if not specified)
4. Generate CSV: Creates temporary CSV file with records
5. Bulk Update: Executes Salesforce bulk API operation
6. Report: Generates beautiful HTML report
7. Open: Auto-opens report in default browser
The CLI provides detailed error messages:
- ā Org authentication failures
- ā SOQL query errors
- ā Bulk API errors
- ā File I/O errors
sf-uuid-filler -o ea10 -s Product2 -q "SELECT Id, Name, External_Id__c FROM Product2" -e External_Id__c āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Salesforce Bulk Update Tool v1.0.0 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
[1/5] Fetching Salesforce org information...
Executing: Getting org details
āŗ Warning: @salesforce/cli update available from 2.113.6 to 2.114.5.
ā Connected to: https://dhs000000qasyma4-dev-ed.develop.my.salesforce.com
ā API Version: 65.0
[2/5] Querying Salesforce records...
Executing: Executing SOQL query
ā Retrieved 190 records
[3/5] Processing records...
ā CSV file created: /private/tmp/bulk-update-2025-12-11T12-23-39-848Z.csv
[4/5] Executing bulk update...
Executing bulk update command: sf data update bulk -f "/private/tmp/bulk-update-2025-12-11T12-23-39-848Z.csv" -s Product2 -w 10 -o ea10 --json
Starting bulk job...
Executing: Bulk update operation
āŗ Warning: @salesforce/cli update available from 2.113.6 to 2.114.5.
ā Bulk update completed successfully
Job ID: 750Hs000018XUmfIAG
Records Processed: 190
Successful Records: 190
Records Failed: 0
[5/5] Generating HTML report...
ā Report generated: /private/tmp/bulk-update-report-2025-12-11T12-23-47-209Z.html
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Operation Completed! ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
`š Troubleshooting
$3
Solution: Install Salesforce CLI
`bash
npm install -g @salesforce/cli
`$3
Solution: Login to your org
`bash
sf org login web -a myorg
`
$3
Solution: Reduce record count or increase wait timeThis project is licensed under the MIT License.
š¤ Author
- Mohan Chinnappanš Acknowledgments
- Salesforce CLI team for the amazing
sf` command- [ ] Support for bulk delete operations
- [ ] Real-time progress tracking
- [ ] Email notifications on completion
- [ ] Retry failed records
- [ ] Schedule bulk operations
- [ ] Multi-org support in single run
- [ ] Custom field mapping
- [ ] Dry-run mode
---
Made with ā¤ļø for the Salesforce community