Skip to content

Instantly share code, notes, and snippets.

@dhaniksahni
Created May 27, 2021 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhaniksahni/fc4a8481da2173dc0e969d63477624ce to your computer and use it in GitHub Desktop.
Save dhaniksahni/fc4a8481da2173dc0e969d63477624ce to your computer and use it in GitHub Desktop.
Phone Verification Flow
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<actionCalls>
<name>Verify_Phone</name>
<label>Verify Phone</label>
<locationX>361</locationX>
<locationY>186</locationY>
<actionName>PhoneVerificationController</actionName>
<actionType>apex</actionType>
<connector>
<targetReference>Check_mobile_verification_status</targetReference>
</connector>
<inputParameters>
<name>mobiles</name>
<value>
<elementReference>Get_Account.Phone</elementReference>
</value>
</inputParameters>
<outputParameters>
<assignToReference>verified</assignToReference>
<name>output</name>
</outputParameters>
</actionCalls>
<apiVersion>51.0</apiVersion>
<assignments>
<name>Assign_Verified_Flag</name>
<label>Assign Verified Flag</label>
<locationX>726</locationX>
<locationY>190</locationY>
<assignmentItems>
<assignToReference>Get_Account.PhoneVerified__c</assignToReference>
<operator>Assign</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</assignmentItems>
<connector>
<targetReference>Update_Account</targetReference>
</connector>
</assignments>
<decisions>
<name>Check_mobile_verification_status</name>
<label>Check mobile verification status</label>
<locationX>529</locationX>
<locationY>130</locationY>
<defaultConnector>
<targetReference>verSuccess</targetReference>
</defaultConnector>
<defaultConnectorLabel>Not Verified</defaultConnectorLabel>
<rules>
<name>Is_Verified</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>verified</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<booleanValue>true</booleanValue>
</rightValue>
</conditions>
<connector>
<targetReference>Assign_Verified_Flag</targetReference>
</connector>
<label>Is Verified</label>
</rules>
</decisions>
<interviewLabel>Phone Verification {!$Flow.CurrentDateTime}</interviewLabel>
<label>Phone Verification</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>CanvasMode</name>
<value>
<stringValue>FREE_FORM_CANVAS</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>OriginBuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>Flow</processType>
<recordLookups>
<name>Get_Account</name>
<label>Get Account</label>
<locationX>173</locationX>
<locationY>250</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Verify_Phone</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>recordId</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>Account</object>
<queriedFields>Id</queriedFields>
<queriedFields>Phone</queriedFields>
<queriedFields>PhoneVerified__c</queriedFields>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordUpdates>
<name>Update_Account</name>
<label>Update Account</label>
<locationX>723</locationX>
<locationY>346</locationY>
<connector>
<targetReference>verificationstatus</targetReference>
</connector>
<inputReference>Get_Account</inputReference>
</recordUpdates>
<screens>
<name>verificationstatus</name>
<label>verification status</label>
<locationX>569</locationX>
<locationY>332</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
<fields>
<name>verification</name>
<fieldText>&lt;p&gt;Verification is completed&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
</fields>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<screens>
<name>verSuccess</name>
<label>verSuccess</label>
<locationX>423</locationX>
<locationY>336</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
<fields>
<name>verSuccess1</name>
<fieldText>&lt;p&gt;&lt;b style=&quot;color: rgb(202, 15, 15);&quot;&gt;Phone is not valid&lt;/b&gt;&lt;/p&gt;</fieldText>
<fieldType>DisplayText</fieldType>
</fields>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<start>
<locationX>50</locationX>
<locationY>50</locationY>
<connector>
<targetReference>Get_Account</targetReference>
</connector>
</start>
<status>Active</status>
<variables>
<name>recordId</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>false</isOutput>
</variables>
<variables>
<name>status</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>false</isOutput>
</variables>
<variables>
<name>verified</name>
<dataType>Boolean</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>false</isOutput>
</variables>
</Flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment