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.
This commit is contained in:
Paul Huliganga 2026-03-11 16:23:32 -04:00
parent 30fc345bb0
commit 81c08f3fe1
1 changed files with 199 additions and 3 deletions

View File

@ -29,6 +29,12 @@
<elementReference>Get_Records.Docusign_Envelope_Language__c</elementReference>
</value>
</inputParameters>
<inputParameters>
<name>authReleaseFormCopies</name>
<value>
<elementReference>authReleaseFormCopies</elementReference>
</value>
</inputParameters>
<nameSegment>DocusignCompositeEnvelopeBuilder</nameSegment>
<offset>0</offset>
<outputParameters>
@ -50,7 +56,7 @@
<name>Add_Template_ID</name>
<label>Add Template ID</label>
<locationX>270</locationX>
<locationY>890</locationY>
<locationY>1106</locationY>
<assignmentItems>
<assignToReference>compositeTemplateIds</assignToReference>
<operator>Add</operator>
@ -62,6 +68,38 @@
<targetReference>Build_Template_ID_Collection</targetReference>
</connector>
</assignments>
<assignments>
<name>Flag_Auth_Release_Selected</name>
<label>Flag Authorization to Release Template Selected</label>
<locationX>270</locationX>
<locationY>1000</locationY>
<assignmentItems>
<assignToReference>authReleaseTemplateSelected</assignToReference>
<operator>Assign</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</assignmentItems>
<connector>
<targetReference>Scan_For_Auth_Release_Template</targetReference>
</connector>
</assignments>
<assignments>
<name>Store_Auth_Release_Copies</name>
<label>Store Authorization to Release Copies Selection</label>
<locationX>182</locationX>
<locationY>1160</locationY>
<assignmentItems>
<assignToReference>authReleaseFormCopies</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>authReleaseFormCopies_Radio</elementReference>
</value>
</assignmentItems>
<connector>
<targetReference>Build_Template_ID_Collection</targetReference>
</connector>
</assignments>
<decisions>
<name>Check_Envelope_Result</name>
<label>Check Envelope Result</label>
@ -107,11 +145,36 @@
</rightValue>
</conditions>
<connector>
<targetReference>Build_Template_ID_Collection</targetReference>
<targetReference>Scan_For_Auth_Release_Template</targetReference>
</connector>
<label>Is Row Selected?</label>
</rules>
</decisions>
<decisions>
<name>Is_Auth_Release_Selected</name>
<label>Is Authorization to Release Info Selected?</label>
<locationX>380</locationX>
<locationY>890</locationY>
<defaultConnector>
<targetReference>Build_Template_ID_Collection</targetReference>
</defaultConnector>
<defaultConnectorLabel>No - Proceed</defaultConnectorLabel>
<rules>
<name>Auth_Release_Template_Found</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>authReleaseTemplateSelected</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<booleanValue>true</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>Authorization_Copies_Screen</targetReference>
</connector>
<label>Yes - Ask for copies</label>
</rules>
</decisions>
<decisions>
<name>Is_Language_Selected</name>
<label>Is Language Selected?</label>
@ -137,6 +200,31 @@
<label>Language Selected?</label>
</rules>
</decisions>
<decisions>
<name>Does_Row_Contain_Auth_Release</name>
<label>Does This Row Contain Authorization to Release Info?</label>
<locationX>270</locationX>
<locationY>890</locationY>
<defaultConnector>
<targetReference>Scan_For_Auth_Release_Template</targetReference>
</defaultConnector>
<defaultConnectorLabel>No</defaultConnectorLabel>
<rules>
<name>Row_Is_Auth_Release_Template</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>Scan_For_Auth_Release_Template.Name</leftValueReference>
<operator>Contains</operator>
<rightValue>
<stringValue>Authorization to Release Information</stringValue>
</rightValue>
</conditions>
<connector>
<targetReference>Flag_Auth_Release_Selected</targetReference>
</connector>
<label>Yes</label>
</rules>
</decisions>
<environments>Default</environments>
<interviewLabel>Docusign Envelope Templates V3 {!$Flow.CurrentDateTime}</interviewLabel>
<label>Docusign Envelope Templates V3</label>
@ -144,7 +232,7 @@
<name>Build_Template_ID_Collection</name>
<label>Build Template ID Collection</label>
<locationX>182</locationX>
<locationY>782</locationY>
<locationY>1214</locationY>
<collectionReference>data.selectedRows</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
@ -154,6 +242,20 @@
<targetReference>Send_Composite_Envelope</targetReference>
</noMoreValuesConnector>
</loops>
<loops>
<name>Scan_For_Auth_Release_Template</name>
<label>Scan For Authorization to Release Template</label>
<locationX>380</locationX>
<locationY>782</locationY>
<collectionReference>data.selectedRows</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
<targetReference>Does_Row_Contain_Auth_Release</targetReference>
</nextValueConnector>
<noMoreValuesConnector>
<targetReference>Is_Auth_Release_Selected</targetReference>
</noMoreValuesConnector>
</loops>
<processMetadataValues>
<name>BuilderType</name>
<value>
@ -295,6 +397,55 @@
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<screens>
<name>Authorization_Copies_Screen</name>
<label>Authorization to Release Info - Number of Copies</label>
<locationX>182</locationX>
<locationY>1106</locationY>
<allowBack>true</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
<backButtonLabel>Back</backButtonLabel>
<connector>
<targetReference>Store_Auth_Release_Copies</targetReference>
</connector>
<fields>
<name>AuthCopiesHeader</name>
<fieldText>&lt;p&gt;The &lt;strong&gt;Authorization to Release Information&lt;/strong&gt; form was selected.&lt;/p&gt;&lt;p&gt;How many copies of this form should be included in the envelope?&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
<styleProperties>
<verticalAlignment>
<stringValue>top</stringValue>
</verticalAlignment>
<width>
<stringValue>12</stringValue>
</width>
</styleProperties>
</fields>
<fields>
<name>authReleaseFormCopies_Radio</name>
<choiceReferences>AuthCopies_1</choiceReferences>
<choiceReferences>AuthCopies_2</choiceReferences>
<choiceReferences>AuthCopies_3</choiceReferences>
<dataType>Number</dataType>
<defaultSelectedChoiceReference>AuthCopies_1</defaultSelectedChoiceReference>
<fieldText>Number of Copies</fieldText>
<fieldType>RadioButtons</fieldType>
<isRequired>true</isRequired>
<scale>0</scale>
<styleProperties>
<verticalAlignment>
<stringValue>top</stringValue>
</verticalAlignment>
<width>
<stringValue>12</stringValue>
</width>
</styleProperties>
</fields>
<nextOrFinishButtonLabel>Next</nextOrFinishButtonLabel>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<screens>
<name>Error_Screen</name>
<label>Error Screen</label>
@ -464,4 +615,49 @@
<isInput>true</isInput>
<isOutput>false</isOutput>
</variables>
<variables>
<name>authReleaseFormCopies</name>
<dataType>Number</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<scale>0</scale>
<value>
<numberValue>1.0</numberValue>
</value>
</variables>
<variables>
<name>authReleaseTemplateSelected</name>
<dataType>Boolean</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<value>
<booleanValue>false</booleanValue>
</value>
</variables>
<choices>
<name>AuthCopies_1</name>
<choiceText>1 copy</choiceText>
<dataType>Number</dataType>
<value>
<numberValue>1.0</numberValue>
</value>
</choices>
<choices>
<name>AuthCopies_2</name>
<choiceText>2 copies</choiceText>
<dataType>Number</dataType>
<value>
<numberValue>2.0</numberValue>
</value>
</choices>
<choices>
<name>AuthCopies_3</name>
<choiceText>3 copies</choiceText>
<dataType>Number</dataType>
<value>
<numberValue>3.0</numberValue>
</value>
</choices>
</Flow>