Commit Graph

5 Commits

Author SHA1 Message Date
Paul Huliganga 40798dfe63 feat(sms): draft envelope + Docusign Sender View for recipients without email
When the primary recipient (Docusign Recipient #1) has no email address, the
envelope is created in draft status and the sender completes delivery manually
in the Docusign Sender View web console where they can configure SMS delivery.

Apex changes:
- DocusignCompositeEnvelopeBuilder: new DRAFT_PLACEHOLDER_EMAIL constant; when
  requiresDraftMode=true calls sendEnvelope(envelope, false) to create a draft,
  then builds and returns a Sender View URL via buildSenderViewUrl(); buildRecipient
  accepts allowPlaceholderEmail flag and substitutes placeholder when email is blank
- DocusignEnvelopeRequest: new requiresDraftMode Boolean InvocableVariable
- DocusignEnvelopeResult: new senderViewUrl String InvocableVariable

Flow (V3) changes:
- Get_Records now fetches Docusign_Recipient_1__c
- New Get_Recipient_Contact lookup queries Contact.Email and Name
- New Is_Recipient_Email_Blank decision routes to Set_Draft_Mode when blank
- New Set_Draft_Mode assignment sets requiresDraftMode=true
- New No_Email_Warning_Screen explains the draft process and required steps
- requiresDraftMode passed as input; senderViewUrl captured as output
- New Is_Draft_Envelope decision routes to Sender_View_Screen or Success_Screen
- New Sender_View_Screen shows clickable link, placeholder email, and step-by-step
  instructions for configuring SMS delivery in the Docusign web console
2026-03-13 00:08:59 -04:00
Paul Huliganga 81c08f3fe1 feat(flow): add multi-copy dialog for Authorization to Release Information
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.
2026-03-11 16:23:32 -04:00
Paul Huliganga 30fc345bb0 Sort templates alphabetically by Short_Name__c in email subject and document order
- 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
2026-03-03 23:12:06 -05:00
Paul Huliganga ace2518349 fix: reorder V3 Flow XML elements - group same types together
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.
2026-02-25 11:06:40 -05:00
Paul Huliganga 19852fd4bb fix: move flow XML files to correct force-app/main/default/flows/ directory 2026-02-25 11:03:10 -05:00