V3 replaces individual envelope sends with single composite API call:
- Added dfsle__DocuSignId__c to record lookup query
- New loop builds text collection of Docusign template IDs from selected rows
- Single Action call to DocusignCompositeEnvelopeBuilder after loop
- Passes language from Client_Case__c automatically
- New success screen shows envelope ID
- New error screen with error message display
- Result checking decision (success/failure routing)
- Flow status: Draft (safe to deploy and test)
- Created DocusignEnvelopeRequest.cls (separate global class for input)
- Created DocusignEnvelopeResult.cls (separate global class for output)
- Updated DocusignCompositeEnvelopeBuilder to use standalone classes
- Updated DocusignEnvelopeRequestHandler to reference standalone classes
- Updated all test classes to use new class references
- Fixes Flow Builder visibility issues with nested inner classes
- Better API design with clear input/output types
- Easier to extend and reuse across other classes
- Added examples for each test class: DocusignCompositeEnvelopeBuilderTest, DocusignEnvelopeRequestHandlerTest, DocusignAPIServiceTest, DocusignCredentialsTest
- Included both Bash/WSL and PowerShell versions
- Useful for targeted testing during development
- Includes --code-coverage flag for coverage metrics
- Removed testJSONBuilder from DocusignCompositeEnvelopeBuilderTest
- JSON building logic tests now handled by DocusignEnvelopeRequestHandlerTest (10 comprehensive tests)
- Fixes deployment error: method buildCompositeEnvelopeJSON no longer exists in main class
- Eliminates code duplication between test classes
- Added PowerShell equivalents for all CLI commands
- Updated directory navigation for Windows paths
- Added note explaining shell differences
- Covers: deploy, test, authorization, troubleshooting
- Uses env:USERPROFILE for Windows home directory
- Shows both backtick continuation and semicolon alternatives for PowerShell
Changes:
- Move validation logic to DocusignEnvelopeRequestHandler.validateRequest()
- Move envelope JSON building to DocusignEnvelopeRequestHandler.buildEnvelopeJSON()
- Add comprehensive test suite for handler (10 test methods)
- Simplify main invocable method - focus on orchestration
- Add DEPLOYMENT_AND_TESTING.md reference guide with all CLI commands
- Handler is reusable for future enhancements and integrations
Benefits:
- Single Responsibility Principle
- Reusable handler for other classes
- Better testability
- Clean separation of concerns