- New DocusignSmsEnvelopeService: bypasses dfsle Toolkit to POST composite
envelope JSON directly to Docusign REST API; sets additionalNotifications
with secondaryDeliveryMethod=SMS and phoneNumber on the primary recipient
- DocusignEnvelopeRequest: new recipientSmsPhone InvocableVariable (E.164)
- DocusignCompositeEnvelopeBuilder: routes to DocusignSmsEnvelopeService when
recipientSmsPhone is present; adds SMS_FALLBACK_EMAIL constant; buildRecipient
substitutes placeholder email for no-email primary recipients in SMS path
- Flow (V3): Get_Records now fetches Docusign_Recipient_1__c; new
Get_Recipient_Contact lookup checks Contact.Email; Is_Recipient_Email_Blank
decision routes to SMS_Required_Screen when email is absent; phone number
collected via required text input and passed as recipientSmsPhone to Apex
When the 'Authorization to Release Information' template (English or
Spanish) is selected, a new screen prompts the user to choose how many
copies (1, 2, or 3) to include in the envelope via radio buttons.
New flow elements:
- Scan_For_Auth_Release_Template loop: iterates selected rows to detect
the target template
- Does_Row_Contain_Auth_Release decision: Contains check on row Name
- Flag_Auth_Release_Selected assignment: sets authReleaseTemplateSelected
- Is_Auth_Release_Selected decision: routes to copies screen or skips
- Authorization_Copies_Screen: displays radio buttons (1/2/3 copies)
- Store_Auth_Release_Copies assignment: writes radio selection into the
authReleaseFormCopies flow variable
- authReleaseFormCopies variable (Number, default 1)
- authReleaseTemplateSelected variable (Boolean, default false)
- AuthCopies_1/2/3 choices
authReleaseFormCopies is passed to the Apex action as a new input param.
Template name string lives in a single Contains condition for easy update.
- Updated DocusignCompositeEnvelopeBuilder.cls to sort documents and subject by Short_Name__c
- Modified Docusign_Envelope_Templates_V3.flow-meta.xml: repositioned elements and added filter for Short_Name__c not null
Salesforce requires elements of the same type (recordLookups, decisions,
screens, etc.) to be grouped together. Reordered all elements alphabetically
by type to comply with Flow metadata schema.