<?xml version='1.0' encoding='UTF-8'?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <actionCalls>
        <name>Generate_XP_Document</name>
        <label>Generate XP Document</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <actionName>rooms__GenerateXPDocumentAction</actionName>
        <actionType>apex</actionType>
        <connector>
            <targetReference>Generation_Succeeded</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Generation_Fault</targetReference>
        </faultConnector>
        <flowTransactionModel>Automatic</flowTransactionModel>
        <inputParameters>
            <name>recordId</name>
            <value>
                <elementReference>recordId</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>templateContentId</name>
            <value>
                <elementReference>Selected_Template.Id</elementReference>
            </value>
        </inputParameters>
        <outputParameters>
            <assignToReference>out_success</assignToReference>
            <name>success</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_message</assignToReference>
            <name>message</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_documentId</assignToReference>
            <name>documentId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_revisionId</assignToReference>
            <name>revisionId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_contentRecordId</assignToReference>
            <name>contentRecordId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_contentDocumentId</assignToReference>
            <name>contentDocumentId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_contentVersionId</assignToReference>
            <name>contentVersionId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_renderedRevisionId</assignToReference>
            <name>renderedRevisionId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_recordId</assignToReference>
            <name>recordId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_parentId</assignToReference>
            <name>parentId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>out_fileName</assignToReference>
            <name>fileName</name>
        </outputParameters>
    </actionCalls>
    <actionCalls>
        <name>Create_Experience</name>
        <label>Create Experience</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <actionName>rooms__CreateExperienceAction</actionName>
        <actionType>apex</actionType>
        <connector>
            <targetReference>Experience_Succeeded</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Create_Experience_Fault</targetReference>
        </faultConnector>
        <flowTransactionModel>Automatic</flowTransactionModel>
        <inputParameters>
            <name>primaryDocumentContentId</name>
            <value>
                <elementReference>out_contentRecordId</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>primaryRecipientId</name>
            <value>
                <elementReference>Get_Invite_Contact.Id</elementReference>
            </value>
        </inputParameters>
        <outputParameters>
            <assignToReference>xp_success</assignToReference>
            <name>success</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>xp_message</assignToReference>
            <name>message</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>xp_roomId</assignToReference>
            <name>roomId</name>
        </outputParameters>
        <outputParameters>
            <assignToReference>xp_inviteUrl</assignToReference>
            <name>primaryRecipientInviteUrl</name>
        </outputParameters>
    </actionCalls>
    <actionCalls>
        <name>Send_Experience_Email</name>
        <label>Send Experience Email (Native)</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <actionName>emailSimple</actionName>
        <actionType>emailSimple</actionType>
        <connector>
            <targetReference>Email_Submitted</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Email_Fault</targetReference>
        </faultConnector>
        <flowTransactionModel>CurrentTransaction</flowTransactionModel>
        <inputParameters>
            <name>emailAddresses</name>
            <value>
                <elementReference>Refresh_Invite_Contact.Email</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>emailSubject</name>
            <value>
                <elementReference>Invite_Email_Subject</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>emailBody</name>
            <value>
                <elementReference>Invite_Email_Body</elementReference>
            </value>
        </inputParameters>
        <inputParameters>
            <name>senderType</name>
            <value>
                <stringValue>CurrentUser</stringValue>
            </value>
        </inputParameters>
        <inputParameters>
            <name>sendRichBody</name>
            <value>
                <booleanValue>false</booleanValue>
            </value>
        </inputParameters>
    </actionCalls>
    <apiVersion>66.0</apiVersion>
    <assignments>
        <name>Count_Templates</name>
        <label>Count Eligible Templates</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignmentItems>
            <assignToReference>Template_Count</assignToReference>
            <operator>AssignCount</operator>
            <value>
                <elementReference>Get_XP_Templates</elementReference>
            </value>
        </assignmentItems>
        <connector>
            <targetReference>Templates_Exactly_One</targetReference>
        </connector>
    </assignments>
    <assignments>
        <name>Set_Selected_Template</name>
        <label>Use the One Matching Template</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignmentItems>
            <assignToReference>Selected_Template</assignToReference>
            <operator>Assign</operator>
            <value>
                <elementReference>Current_Template</elementReference>
            </value>
        </assignmentItems>
        <connector>
            <targetReference>Current_Template</targetReference>
        </connector>
    </assignments>
    <decisions>
        <name>Valid_Inputs</name>
        <label>Opportunity, Contact, and Template Inputs Valid?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Input_Invalid</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No: stop and review</defaultConnectorLabel>
        <rules>
            <name>Valid_Inputs_Confirmed</name>
            <conditionLogic>and</conditionLogic>
            <conditions>
                <leftValueReference>Valid_Input_Values</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <booleanValue>true</booleanValue>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Get_Opportunity</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <decisions>
        <name>Source_Records_Valid</name>
        <label>Opportunity and Contact Email Available?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Input_Invalid</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No: stop and review</defaultConnectorLabel>
        <rules>
            <name>Source_Records_Valid_Confirmed</name>
            <conditionLogic>and</conditionLogic>
            <conditions>
                <leftValueReference>Get_Opportunity.Id</leftValueReference>
                <operator>IsNull</operator>
                <rightValue>
                    <booleanValue>false</booleanValue>
                </rightValue>
            </conditions>
            <conditions>
                <leftValueReference>Contact_Ready</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <booleanValue>true</booleanValue>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Get_XP_Templates</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <decisions>
        <name>Templates_Exactly_One</name>
        <label>Exactly One Eligible Published Template?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Template_Invalid</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No: stop and review</defaultConnectorLabel>
        <rules>
            <name>Templates_Exactly_One_Confirmed</name>
            <conditionLogic>and</conditionLogic>
            <conditions>
                <leftValueReference>Template_Count</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <numberValue>1.0</numberValue>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Current_Template</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <decisions>
        <name>Published_Version_Valid</name>
        <label>Exact Published Template File Valid?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Template_Invalid</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No</defaultConnectorLabel>
        <rules>
            <name>Selected_Publication_Confirmed</name>
            <conditionLogic>1 AND (2 OR 3)</conditionLogic>
            <conditions>
                <leftValueReference>Get_Published_Template_Version.Id</leftValueReference>
                <operator>IsNull</operator>
                <rightValue>
                    <booleanValue>false</booleanValue>
                </rightValue>
            </conditions>
            <conditions>
                <leftValueReference>Selected_Template.rooms__ActiveContentDocumentId__c</leftValueReference>
                <operator>IsNull</operator>
                <rightValue>
                    <booleanValue>true</booleanValue>
                </rightValue>
            </conditions>
            <conditions>
                <leftValueReference>Get_Published_Template_Version.ContentDocumentId</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <elementReference>Selected_Template.rooms__ActiveContentDocumentId__c</elementReference>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Confirm_Generation</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <decisions>
        <name>Generation_Succeeded</name>
        <label>Generation Success and Instance Content ID Returned?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Generation_Failed</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No: stop and review</defaultConnectorLabel>
        <rules>
            <name>Generation_Succeeded_Confirmed</name>
            <conditionLogic>and</conditionLogic>
            <conditions>
                <leftValueReference>out_success</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <booleanValue>true</booleanValue>
                </rightValue>
            </conditions>
            <conditions>
                <leftValueReference>out_contentRecordId</leftValueReference>
                <operator>IsNull</operator>
                <rightValue>
                    <booleanValue>false</booleanValue>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Generation_Results</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <decisions>
        <name>Experience_Succeeded</name>
        <label>Experience Success, Room, and Invitation Confirmed?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Create_Experience_Failed</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No: stop and review</defaultConnectorLabel>
        <rules>
            <name>Experience_Succeeded_Confirmed</name>
            <conditionLogic>and</conditionLogic>
            <conditions>
                <leftValueReference>xp_success</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <booleanValue>true</booleanValue>
                </rightValue>
            </conditions>
            <conditions>
                <leftValueReference>xp_roomId</leftValueReference>
                <operator>IsNull</operator>
                <rightValue>
                    <booleanValue>false</booleanValue>
                </rightValue>
            </conditions>
            <conditions>
                <leftValueReference>xp_inviteUrl</leftValueReference>
                <operator>IsNull</operator>
                <rightValue>
                    <booleanValue>false</booleanValue>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Refresh_Invite_Contact</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <decisions>
        <name>Email_Contact_Valid</name>
        <label>Current Contact Email Available?</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <defaultConnector>
            <targetReference>Email_Recipient_Unavailable</targetReference>
        </defaultConnector>
        <defaultConnectorLabel>No: stop and review</defaultConnectorLabel>
        <rules>
            <name>Email_Contact_Valid_Confirmed</name>
            <conditionLogic>and</conditionLogic>
            <conditions>
                <leftValueReference>Email_Contact_Ready</leftValueReference>
                <operator>EqualTo</operator>
                <rightValue>
                    <booleanValue>true</booleanValue>
                </rightValue>
            </conditions>
            <connector>
                <targetReference>Review_Experience_Email</targetReference>
            </connector>
            <label>Yes</label>
        </rules>
    </decisions>
    <description>Screen Flow example for iDialogue v2.166 or later. Supply an Opportunity recordId, primaryContactId, and published templateDeveloperName. Generate one quote PDF, review its result, create one document-only Experience for the Contact as Signer 1, then review and send native Salesforce email. All action results remain available. Returned failures and Fault paths stop mutation. Only an explicit email retry reuses the existing Experience. Review permissions, approval, sender settings, and target-org metadata before deployment. Deploy as Draft and validate before activation.</description>
    <environments>Default</environments>
    <formulas>
        <name>Valid_Input_Values</name>
        <dataType>Boolean</dataType>
        <expression>AND(NOT(ISBLANK({!recordId})), BEGINS({!recordId}, "006"), OR(LEN({!recordId}) = 15, LEN({!recordId}) = 18), NOT(ISBLANK({!primaryContactId})), BEGINS({!primaryContactId}, "003"), OR(LEN({!primaryContactId}) = 15, LEN({!primaryContactId}) = 18), NOT(ISBLANK({!templateDeveloperName})))</expression>
    </formulas>
    <formulas>
        <name>Contact_Ready</name>
        <dataType>Boolean</dataType>
        <expression>AND(NOT(ISBLANK({!Get_Invite_Contact.Id})), NOT(ISBLANK({!Get_Invite_Contact.Email})), REGEX({!Get_Invite_Contact.Email}, "^[^ @]+@[^ @]+[.][^ @]+$"))</expression>
    </formulas>
    <formulas>
        <name>Email_Contact_Ready</name>
        <dataType>Boolean</dataType>
        <expression>AND(NOT(ISBLANK({!Refresh_Invite_Contact.Id})), NOT(ISBLANK({!Refresh_Invite_Contact.Email})), REGEX({!Refresh_Invite_Contact.Email}, "^[^ @]+@[^ @]+[.][^ @]+$"))</expression>
    </formulas>
    <formulas>
        <name>Safe_Message</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!out_message}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Experience_Message</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!xp_message}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_File_Name</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!out_fileName}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Opportunity_Name</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!Get_Opportunity.Name}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Developer_Name</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!Selected_Template.rooms__DeveloperName__c}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Flow_Fault</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!$Flow.FaultMessage}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Template_Name</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!Selected_Template.Name}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Contact_Name</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!Get_Invite_Contact.Name}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Contact_Email</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!Get_Invite_Contact.Email}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Email_Recipient</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!Refresh_Invite_Contact.Email}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <formulas>
        <name>Safe_Template_Input</name>
        <dataType>String</dataType>
        <expression>SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(BLANKVALUE({!templateDeveloperName}, ""), "&amp;", "&amp;amp;"), "&lt;", "&amp;lt;"), "&gt;", "&amp;gt;")</expression>
    </formulas>
    <interviewLabel>Single Signer Quote {!$Flow.CurrentDateTime}</interviewLabel>
    <label>iDialogue Single Signer Quote</label>
    <loops>
        <name>Current_Template</name>
        <label>Read the One Matching Template</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <collectionReference>Get_XP_Templates</collectionReference>
        <iterationOrder>Asc</iterationOrder>
        <nextValueConnector>
            <targetReference>Set_Selected_Template</targetReference>
        </nextValueConnector>
        <noMoreValuesConnector>
            <targetReference>Get_Published_Template_Version</targetReference>
        </noMoreValuesConnector>
    </loops>
    <processMetadataValues>
        <name>BuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>CanvasMode</name>
        <value>
            <stringValue>AUTO_LAYOUT_CANVAS</stringValue>
        </value>
    </processMetadataValues>
    <processMetadataValues>
        <name>OriginBuilderType</name>
        <value>
            <stringValue>LightningFlowBuilder</stringValue>
        </value>
    </processMetadataValues>
    <processType>Flow</processType>
    <recordLookups>
        <name>Get_Opportunity</name>
        <label>Get Source Opportunity</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignNullValuesIfNoRecordsFound>true</assignNullValuesIfNoRecordsFound>
        <connector>
            <targetReference>Get_Invite_Contact</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Setup_Fault</targetReference>
        </faultConnector>
        <filterLogic>and</filterLogic>
        <filters>
            <field>Id</field>
            <operator>EqualTo</operator>
            <value>
                <elementReference>recordId</elementReference>
            </value>
        </filters>
        <getFirstRecordOnly>true</getFirstRecordOnly>
        <object>Opportunity</object>
        <queriedFields>Id</queriedFields>
        <queriedFields>Name</queriedFields>
        <storeOutputAutomatically>true</storeOutputAutomatically>
    </recordLookups>
    <recordLookups>
        <name>Get_Invite_Contact</name>
        <label>Get Invite Contact Email</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignNullValuesIfNoRecordsFound>true</assignNullValuesIfNoRecordsFound>
        <connector>
            <targetReference>Source_Records_Valid</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Setup_Fault</targetReference>
        </faultConnector>
        <filterLogic>and</filterLogic>
        <filters>
            <field>Id</field>
            <operator>EqualTo</operator>
            <value>
                <elementReference>primaryContactId</elementReference>
            </value>
        </filters>
        <getFirstRecordOnly>true</getFirstRecordOnly>
        <object>Contact</object>
        <queriedFields>Id</queriedFields>
        <queriedFields>Email</queriedFields>
        <queriedFields>Name</queriedFields>
        <storeOutputAutomatically>true</storeOutputAutomatically>
    </recordLookups>
    <recordLookups>
        <name>Get_XP_Templates</name>
        <label>Get Published Opportunity XP Templates</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignNullValuesIfNoRecordsFound>true</assignNullValuesIfNoRecordsFound>
        <connector>
            <targetReference>Count_Templates</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Setup_Fault</targetReference>
        </faultConnector>
        <filterLogic>1 AND 2 AND 3 AND (4 OR 5) AND 6 AND 7 AND 8 AND 9 AND 10 AND 11</filterLogic>
        <filters>
            <field>rooms__IsActive__c</field>
            <operator>EqualTo</operator>
            <value>
                <booleanValue>true</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__IsLatest__c</field>
            <operator>EqualTo</operator>
            <value>
                <booleanValue>true</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__TemplateStage__c</field>
            <operator>EqualTo</operator>
            <value>
                <stringValue>Publish</stringValue>
            </value>
        </filters>
        <filters>
            <field>rooms__Type__c</field>
            <operator>EqualTo</operator>
            <value>
                <stringValue>DataMergeTemplate</stringValue>
            </value>
        </filters>
        <filters>
            <field>rooms__IsDataMergeTemplate__c</field>
            <operator>EqualTo</operator>
            <value>
                <booleanValue>true</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__TargetObjectApiName__c</field>
            <operator>EqualTo</operator>
            <value>
                <stringValue>Opportunity</stringValue>
            </value>
        </filters>
        <filters>
            <field>rooms__XPTemplateId__c</field>
            <operator>IsNull</operator>
            <value>
                <booleanValue>false</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__XPTemplateRevisionId__c</field>
            <operator>IsNull</operator>
            <value>
                <booleanValue>false</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__ActiveContentVersionId__c</field>
            <operator>IsNull</operator>
            <value>
                <booleanValue>false</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__DataContextDefinition__c</field>
            <operator>IsNull</operator>
            <value>
                <booleanValue>false</booleanValue>
            </value>
        </filters>
        <filters>
            <field>rooms__DeveloperName__c</field>
            <operator>EqualTo</operator>
            <value>
                <elementReference>templateDeveloperName</elementReference>
            </value>
        </filters>
        <getFirstRecordOnly>false</getFirstRecordOnly>
        <object>rooms__Content__c</object>
        <queriedFields>Id</queriedFields>
        <queriedFields>Name</queriedFields>
        <queriedFields>rooms__DeveloperName__c</queriedFields>
        <queriedFields>rooms__ActiveContentDocumentId__c</queriedFields>
        <queriedFields>rooms__ActiveContentVersionId__c</queriedFields>
        <sortField>Name</sortField>
        <sortOrder>Asc</sortOrder>
        <storeOutputAutomatically>true</storeOutputAutomatically>
    </recordLookups>
    <recordLookups>
        <name>Get_Published_Template_Version</name>
        <label>Check Exact Published Template Version</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignNullValuesIfNoRecordsFound>true</assignNullValuesIfNoRecordsFound>
        <connector>
            <targetReference>Published_Version_Valid</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Setup_Fault</targetReference>
        </faultConnector>
        <filterLogic>and</filterLogic>
        <filters>
            <field>Id</field>
            <operator>EqualTo</operator>
            <value>
                <elementReference>Selected_Template.rooms__ActiveContentVersionId__c</elementReference>
            </value>
        </filters>
        <filters>
            <field>rooms__IsPublished__c</field>
            <operator>EqualTo</operator>
            <value>
                <booleanValue>true</booleanValue>
            </value>
        </filters>
        <getFirstRecordOnly>true</getFirstRecordOnly>
        <object>ContentVersion</object>
        <queriedFields>Id</queriedFields>
        <queriedFields>Title</queriedFields>
        <queriedFields>ContentDocumentId</queriedFields>
        <queriedFields>rooms__IsPublished__c</queriedFields>
        <storeOutputAutomatically>true</storeOutputAutomatically>
    </recordLookups>
    <recordLookups>
        <name>Refresh_Invite_Contact</name>
        <label>Read Contact Email Before Sending or Retrying</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <assignNullValuesIfNoRecordsFound>true</assignNullValuesIfNoRecordsFound>
        <connector>
            <targetReference>Email_Contact_Valid</targetReference>
        </connector>
        <faultConnector>
            <targetReference>Email_Fault</targetReference>
        </faultConnector>
        <filterLogic>and</filterLogic>
        <filters>
            <field>Id</field>
            <operator>EqualTo</operator>
            <value>
                <elementReference>primaryContactId</elementReference>
            </value>
        </filters>
        <getFirstRecordOnly>true</getFirstRecordOnly>
        <object>Contact</object>
        <queriedFields>Id</queriedFields>
        <queriedFields>Email</queriedFields>
        <queriedFields>Name</queriedFields>
        <storeOutputAutomatically>true</storeOutputAutomatically>
    </recordLookups>
    <screens>
        <name>Input_Invalid</name>
        <label>Source Record or Contact Needs Attention</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Input_Invalid_Details</name>
            <fieldText>&lt;h2&gt;Check the Flow inputs and source records&lt;/h2&gt;&lt;p&gt;Supply an accessible Opportunity ID as recordId, an accessible Contact ID as primaryContactId, and the published template Developer Name as templateDeveloperName. The Contact must have a valid email address. No document was generated.&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Template_Invalid</name>
        <label>Published Template Needs Attention</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Template_Invalid_Details</name>
            <fieldText>&lt;h2&gt;Exactly one eligible published template is required&lt;/h2&gt;&lt;p&gt;Matching templates: {!Template_Count}&lt;/p&gt;&lt;p&gt;Check the Developer Name, Opportunity target, active/latest flags, Publish stage, Data Merge Template type, DCD, XP template references, and exact published ContentVersion. The published version must belong to the expected template File when that File reference is set. No document was generated.&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Setup_Fault</name>
        <label>Source or Template Read Fault</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Setup_Fault_Details</name>
            <fieldText>&lt;h2&gt;A record lookup failed&lt;/h2&gt;&lt;p&gt;{!Safe_Flow_Fault}&lt;/p&gt;&lt;p&gt;No document generation was requested. Check record access, field access, and the Flow inputs.&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Confirm_Generation</name>
        <label>Review Quote Generation</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <connector>
            <targetReference>Generate_XP_Document</targetReference>
        </connector>
        <fields>
            <name>Confirm_Generation_Details</name>
            <fieldText>&lt;h2&gt;Review the quote source and recipient&lt;/h2&gt;&lt;p&gt;Opportunity: {!Safe_Opportunity_Name}&lt;/p&gt;&lt;p&gt;Template: {!Safe_Template_Name}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Developer_Name}&lt;/p&gt;&lt;p&gt;Template Content ID: {!Selected_Template.Id}&lt;/p&gt;&lt;p&gt;Published template version: {!Get_Published_Template_Version.Id}&lt;/p&gt;&lt;p&gt;Contact: {!Safe_Contact_Name}&lt;/p&gt;&lt;p&gt;Email: {!Safe_Contact_Email}&lt;/p&gt;&lt;p&gt;The published template supplies the Data Context Definition. The Opportunity supplies the record context. The PDF attaches to the Opportunity. The Contact becomes Signer 1 in the Experience.&lt;/p&gt;&lt;p&gt;Confirm the required business approval before proceeding. Select Generate PDF once. The next screen lets you review the generated document before creating the Experience.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Generate PDF</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Generation_Failed</name>
        <label>Document Generation Not Confirmed</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Generation_Failed_Details</name>
            <fieldText>&lt;h2&gt;Generation did not return a complete successful result&lt;/h2&gt;&lt;p&gt;Success: {!out_success}&lt;/p&gt;&lt;p&gt;Message: {!Safe_Message}&lt;/p&gt;&lt;p&gt;A successful result and an Instance Content ID are both required. Create Experience and email were skipped.&lt;/p&gt;&lt;p&gt;Instance Content ID: {!out_contentRecordId}&lt;/p&gt;&lt;p&gt;Exact PDF ContentVersion ID: {!out_contentVersionId}&lt;/p&gt;&lt;p&gt;PDF ContentDocument ID: {!out_contentDocumentId}&lt;/p&gt;&lt;p&gt;XP document ID: {!out_documentId}&lt;/p&gt;&lt;p&gt;XP revision ID: {!out_revisionId}&lt;/p&gt;&lt;p&gt;Rendered revision ID: {!out_renderedRevisionId}&lt;/p&gt;&lt;p&gt;Source record ID: {!out_recordId}&lt;/p&gt;&lt;p&gt;Attachment parent ID: {!out_parentId}&lt;/p&gt;&lt;p&gt;File name: {!Safe_File_Name}&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;&lt;p&gt;Confirmed records can remain after an error. Flow Debug rollback does not remove these results. Inspect related Files, Content, Rooms, and iDialogue Events before another invocation. This screen does not repeat generation or Experience creation.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Generation_Fault</name>
        <label>Generate XP Document Fault</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Generation_Fault_Details</name>
            <fieldText>&lt;h2&gt;Generate XP Document raised a Flow fault&lt;/h2&gt;&lt;p&gt;{!Safe_Flow_Fault}&lt;/p&gt;&lt;p&gt;Action Message, if returned: {!Safe_Message}&lt;/p&gt;&lt;p&gt;Create Experience and email were skipped.&lt;/p&gt;&lt;p&gt;Instance Content ID: {!out_contentRecordId}&lt;/p&gt;&lt;p&gt;Exact PDF ContentVersion ID: {!out_contentVersionId}&lt;/p&gt;&lt;p&gt;PDF ContentDocument ID: {!out_contentDocumentId}&lt;/p&gt;&lt;p&gt;XP document ID: {!out_documentId}&lt;/p&gt;&lt;p&gt;XP revision ID: {!out_revisionId}&lt;/p&gt;&lt;p&gt;Rendered revision ID: {!out_renderedRevisionId}&lt;/p&gt;&lt;p&gt;Source record ID: {!out_recordId}&lt;/p&gt;&lt;p&gt;Attachment parent ID: {!out_parentId}&lt;/p&gt;&lt;p&gt;File name: {!Safe_File_Name}&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;&lt;p&gt;Confirmed records can remain after an error. Flow Debug rollback does not remove these results. Inspect related Files, Content, Rooms, and iDialogue Events before another invocation. This screen does not repeat generation or Experience creation.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Generation_Results</name>
        <label>Review the Generated Quote PDF</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <connector>
            <targetReference>Create_Experience</targetReference>
        </connector>
        <fields>
            <name>Generation_Results_Details</name>
            <fieldText>&lt;h2&gt;The quote PDF was generated&lt;/h2&gt;&lt;p&gt;Success: {!out_success}&lt;/p&gt;&lt;p&gt;Message: {!Safe_Message}&lt;/p&gt;&lt;p&gt;&lt;a href="/sfc/servlet.shepherd/version/download/{!out_contentVersionId}" target="_blank" rel="noopener noreferrer"&gt;Open the exact generated PDF&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="/{!out_contentRecordId}" target="_blank" rel="noopener noreferrer"&gt;Open generated Content&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Check the quote values and Signer 1 signature fields. Select Create Experience once to prepare a document-only Experience for the Contact. This step does not send email.&lt;/p&gt;&lt;p&gt;Instance Content ID: {!out_contentRecordId}&lt;/p&gt;&lt;p&gt;Exact PDF ContentVersion ID: {!out_contentVersionId}&lt;/p&gt;&lt;p&gt;PDF ContentDocument ID: {!out_contentDocumentId}&lt;/p&gt;&lt;p&gt;XP document ID: {!out_documentId}&lt;/p&gt;&lt;p&gt;XP revision ID: {!out_revisionId}&lt;/p&gt;&lt;p&gt;Rendered revision ID: {!out_renderedRevisionId}&lt;/p&gt;&lt;p&gt;Source record ID: {!out_recordId}&lt;/p&gt;&lt;p&gt;Attachment parent ID: {!out_parentId}&lt;/p&gt;&lt;p&gt;File name: {!Safe_File_Name}&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Create Experience</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Create_Experience_Failed</name>
        <label>Experience Creation Not Confirmed</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Create_Experience_Failed_Details</name>
            <fieldText>&lt;h2&gt;Create Experience did not return a complete successful result&lt;/h2&gt;&lt;p&gt;Success: {!xp_success}&lt;/p&gt;&lt;p&gt;Message: {!Safe_Experience_Message}&lt;/p&gt;&lt;p&gt;Success, Room ID, and invitation URL are all required. Email was skipped.&lt;/p&gt;&lt;p&gt;Room ID: {!xp_roomId}&lt;/p&gt;&lt;p&gt;Invitation URL: {!xp_inviteUrl}&lt;/p&gt;&lt;p&gt;Instance Content ID: {!out_contentRecordId}&lt;/p&gt;&lt;p&gt;Exact PDF ContentVersion ID: {!out_contentVersionId}&lt;/p&gt;&lt;p&gt;PDF ContentDocument ID: {!out_contentDocumentId}&lt;/p&gt;&lt;p&gt;XP document ID: {!out_documentId}&lt;/p&gt;&lt;p&gt;XP revision ID: {!out_revisionId}&lt;/p&gt;&lt;p&gt;Rendered revision ID: {!out_renderedRevisionId}&lt;/p&gt;&lt;p&gt;Source record ID: {!out_recordId}&lt;/p&gt;&lt;p&gt;Attachment parent ID: {!out_parentId}&lt;/p&gt;&lt;p&gt;File name: {!Safe_File_Name}&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;&lt;p&gt;Confirmed records can remain after an error. Flow Debug rollback does not remove these results. Inspect related Files, Content, Rooms, and iDialogue Events before another invocation. This screen does not repeat generation or Experience creation.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Create_Experience_Fault</name>
        <label>Create Experience Fault</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Create_Experience_Fault_Details</name>
            <fieldText>&lt;h2&gt;Create Experience raised a Flow fault&lt;/h2&gt;&lt;p&gt;{!Safe_Flow_Fault}&lt;/p&gt;&lt;p&gt;Action Message, if returned: {!Safe_Experience_Message}&lt;/p&gt;&lt;p&gt;Email was skipped.&lt;/p&gt;&lt;p&gt;Room ID: {!xp_roomId}&lt;/p&gt;&lt;p&gt;Invitation URL: {!xp_inviteUrl}&lt;/p&gt;&lt;p&gt;Instance Content ID: {!out_contentRecordId}&lt;/p&gt;&lt;p&gt;Exact PDF ContentVersion ID: {!out_contentVersionId}&lt;/p&gt;&lt;p&gt;PDF ContentDocument ID: {!out_contentDocumentId}&lt;/p&gt;&lt;p&gt;XP document ID: {!out_documentId}&lt;/p&gt;&lt;p&gt;XP revision ID: {!out_revisionId}&lt;/p&gt;&lt;p&gt;Rendered revision ID: {!out_renderedRevisionId}&lt;/p&gt;&lt;p&gt;Source record ID: {!out_recordId}&lt;/p&gt;&lt;p&gt;Attachment parent ID: {!out_parentId}&lt;/p&gt;&lt;p&gt;File name: {!Safe_File_Name}&lt;/p&gt;&lt;p&gt;Opportunity ID: {!recordId}&lt;/p&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Template Developer Name: {!Safe_Template_Input}&lt;/p&gt;&lt;p&gt;Flow interview: {!$Flow.InterviewGuid}&lt;/p&gt;&lt;p&gt;Confirmed records can remain after an error. Flow Debug rollback does not remove these results. Inspect related Files, Content, Rooms, and iDialogue Events before another invocation. This screen does not repeat generation or Experience creation.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Review_Experience_Email</name>
        <label>Review and Send the Invitation</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <connector>
            <targetReference>Send_Experience_Email</targetReference>
        </connector>
        <fields>
            <name>Review_Experience_Email_Details</name>
            <fieldText>&lt;h2&gt;Review the Contact invitation&lt;/h2&gt;&lt;p&gt;Success: {!xp_success}&lt;/p&gt;&lt;p&gt;Message: {!Safe_Experience_Message}&lt;/p&gt;&lt;p&gt;Contact: {!Safe_Contact_Name}&lt;/p&gt;&lt;p&gt;Current Contact email: {!Safe_Email_Recipient}&lt;/p&gt;&lt;p&gt;&lt;a href="/{!xp_roomId}" target="_blank" rel="noopener noreferrer"&gt;Open the Experience&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Invitation: {!xp_inviteUrl}&lt;/p&gt;&lt;p&gt;The email must contain this invitation URL. Send it only to this Contact. Check approval and the current user sender configuration. Select Send Email once. No PDF attachment or email activity logging is requested by this example.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <fields>
            <name>Invite_Email_Subject</name>
            <dataType>String</dataType>
            <defaultValue>
                <stringValue>Your quote is ready for review and signature</stringValue>
            </defaultValue>
            <fieldText>Email subject</fieldText>
            <fieldType>InputField</fieldType>
            <inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
            <isRequired>true</isRequired>
        </fields>
        <fields>
            <name>Invite_Email_Body</name>
            <defaultValue>
                <elementReference>Default_Invite_Body</elementReference>
            </defaultValue>
            <fieldText>Plain text email body: keep the invitation URL</fieldText>
            <fieldType>LargeTextArea</fieldType>
            <inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
            <isRequired>true</isRequired>
        </fields>
        <nextOrFinishButtonLabel>Send Email</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Email_Fault</name>
        <label>Email Fault: Keep the Existing Experience</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <connector>
            <targetReference>Refresh_Invite_Contact</targetReference>
        </connector>
        <fields>
            <name>Email_Fault_Details</name>
            <fieldText>&lt;h2&gt;Email was not confirmed&lt;/h2&gt;&lt;p&gt;{!Safe_Flow_Fault}&lt;/p&gt;&lt;p&gt;Experience Message: {!Safe_Experience_Message}&lt;/p&gt;&lt;p&gt;Room ID: {!xp_roomId}&lt;/p&gt;&lt;p&gt;Invitation URL: {!xp_inviteUrl}&lt;/p&gt;&lt;p&gt;Check the Contact email and Salesforce sender settings. Check email activity before retrying an uncertain send. Select Review Email Again only after correcting the problem. This reads the Contact email again and reuses the existing invitation. Generation and Create Experience are not repeated. To stop, close this Flow.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Review Email Again</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Email_Recipient_Unavailable</name>
        <label>Contact Email Needs Attention</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <connector>
            <targetReference>Refresh_Invite_Contact</targetReference>
        </connector>
        <fields>
            <name>Email_Recipient_Unavailable_Details</name>
            <fieldText>&lt;h2&gt;The current Contact email is unavailable or invalid&lt;/h2&gt;&lt;p&gt;Contact ID: {!primaryContactId}&lt;/p&gt;&lt;p&gt;Room ID: {!xp_roomId}&lt;/p&gt;&lt;p&gt;Invitation URL: {!xp_inviteUrl}&lt;/p&gt;&lt;p&gt;Correct the Contact email or access, then select Check Contact Again. Only the Contact lookup and email review are repeated. To stop, close this Flow.&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Check Contact Again</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <screens>
        <name>Email_Submitted</name>
        <label>Invitation Email Submitted</label>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <allowBack>false</allowBack>
        <allowFinish>true</allowFinish>
        <allowPause>false</allowPause>
        <fields>
            <name>Email_Submitted_Details</name>
            <fieldText>&lt;h2&gt;The native Send Email action completed&lt;/h2&gt;&lt;p&gt;Recipient: {!Safe_Email_Recipient}&lt;/p&gt;&lt;p&gt;Room ID: {!xp_roomId}&lt;/p&gt;&lt;p&gt;Invitation URL: {!xp_inviteUrl}&lt;/p&gt;&lt;p&gt;Check Salesforce email activity and delivery separately. Email submission does not confirm delivery, opening, or signature completion. The Contact uses the invitation to review and sign the quote. No generation, Experience creation, or email action is repeated here.&lt;/p&gt;&lt;p&gt;Instance Content ID: {!out_contentRecordId}&lt;/p&gt;&lt;p&gt;Exact PDF ContentVersion ID: {!out_contentVersionId}&lt;/p&gt;&lt;p&gt;PDF ContentDocument ID: {!out_contentDocumentId}&lt;/p&gt;&lt;p&gt;XP document ID: {!out_documentId}&lt;/p&gt;&lt;p&gt;XP revision ID: {!out_revisionId}&lt;/p&gt;&lt;p&gt;Rendered revision ID: {!out_renderedRevisionId}&lt;/p&gt;&lt;p&gt;Source record ID: {!out_recordId}&lt;/p&gt;&lt;p&gt;Attachment parent ID: {!out_parentId}&lt;/p&gt;&lt;p&gt;File name: {!Safe_File_Name}&lt;/p&gt;</fieldText>
            <fieldType>DisplayText</fieldType>
        </fields>
        <nextOrFinishButtonLabel>Finish</nextOrFinishButtonLabel>
        <showFooter>true</showFooter>
        <showHeader>true</showHeader>
    </screens>
    <start>
        <locationX>0</locationX>
        <locationY>0</locationY>
        <connector>
            <targetReference>Valid_Inputs</targetReference>
        </connector>
    </start>
    <status>Draft</status>
    <textTemplates>
        <name>Default_Invite_Body</name>
        <isViewedAsPlainText>true</isViewedAsPlainText>
        <text>Hello,

Your quote is ready. Use this invitation link to review and sign the document:
{!xp_inviteUrl}

Thank you.</text>
    </textTemplates>
    <variables>
        <name>recordId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>false</isOutput>
    </variables>
    <variables>
        <name>primaryContactId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>false</isOutput>
    </variables>
    <variables>
        <name>templateDeveloperName</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>true</isInput>
        <isOutput>false</isOutput>
    </variables>
    <variables>
        <name>Selected_Template</name>
        <dataType>SObject</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>false</isOutput>
        <objectType>rooms__Content__c</objectType>
    </variables>
    <variables>
        <name>Template_Count</name>
        <dataType>Number</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>false</isOutput>
        <scale>0</scale>
    </variables>
    <variables>
        <name>out_success</name>
        <dataType>Boolean</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_message</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_documentId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_revisionId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_contentRecordId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_contentDocumentId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_contentVersionId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_renderedRevisionId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_recordId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_parentId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>out_fileName</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>xp_success</name>
        <dataType>Boolean</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>xp_message</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>xp_roomId</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
    <variables>
        <name>xp_inviteUrl</name>
        <dataType>String</dataType>
        <isCollection>false</isCollection>
        <isInput>false</isInput>
        <isOutput>true</isOutput>
    </variables>
</Flow>
