<?xml version="1.0" encoding="UTF-8"?>
|
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
|
<actionCalls>
|
<name>Send_Email</name>
|
<label>Send Email</label>
|
<locationX>734</locationX>
|
<locationY>157</locationY>
|
<actionName>emailSimple</actionName>
|
<actionType>emailSimple</actionType>
|
<connector>
|
<targetReference>Get_Code</targetReference>
|
</connector>
|
<inputParameters>
|
<name>emailBody</name>
|
<value>
|
<stringValue>This is your code: {!code}</stringValue>
|
</value>
|
</inputParameters>
|
<inputParameters>
|
<name>emailSubject</name>
|
<value>
|
<stringValue>You SFDC vertification code</stringValue>
|
</value>
|
</inputParameters>
|
<inputParameters>
|
<name>emailAddresses</name>
|
<value>
|
<elementReference>UserObject.Email</elementReference>
|
</value>
|
</inputParameters>
|
<inputParameters>
|
<name>senderAddress</name>
|
<value>
|
<elementReference>SenderEmail</elementReference>
|
</value>
|
</inputParameters>
|
<inputParameters>
|
<name>senderType</name>
|
<value>
|
<stringValue>OrgWideEmailAddress</stringValue>
|
</value>
|
</inputParameters>
|
<nameSegment>emailSimple</nameSegment>
|
<versionSegment>1</versionSegment>
|
</actionCalls>
|
<apexPluginCalls>
|
<name>Generate_Random_Code</name>
|
<label>Generate Random Code</label>
|
<locationX>555</locationX>
|
<locationY>156</locationY>
|
<apexClass>CodeGenerator</apexClass>
|
<connector>
|
<targetReference>Send_Email</targetReference>
|
</connector>
|
<outputParameters>
|
<assignToReference>code</assignToReference>
|
<name>Code</name>
|
</outputParameters>
|
</apexPluginCalls>
|
<apiVersion>49.0</apiVersion>
|
<assignments>
|
<name>Assign_Email_Address</name>
|
<label>Assign Email Address</label>
|
<locationX>416</locationX>
|
<locationY>260</locationY>
|
<assignmentItems>
|
<assignToReference>UserObject.Email</assignToReference>
|
<operator>Assign</operator>
|
<value>
|
<elementReference>Email</elementReference>
|
</value>
|
</assignmentItems>
|
<connector>
|
<targetReference>Generate_Random_Code</targetReference>
|
</connector>
|
</assignments>
|
<decisions>
|
<name>Code_Validation</name>
|
<label>Code Validation</label>
|
<locationX>914</locationX>
|
<locationY>375</locationY>
|
<defaultConnector>
|
<targetReference>Generate_Random_Code</targetReference>
|
</defaultConnector>
|
<defaultConnectorLabel>Invalid</defaultConnectorLabel>
|
<rules>
|
<name>Valid</name>
|
<conditionLogic>and</conditionLogic>
|
<conditions>
|
<leftValueReference>code</leftValueReference>
|
<operator>EqualTo</operator>
|
<rightValue>
|
<elementReference>CodeInput</elementReference>
|
</rightValue>
|
</conditions>
|
<label>Valid</label>
|
</rules>
|
</decisions>
|
<decisions>
|
<description>Check if the User Object contains an email address.
|
|
This is mainly useful when not running in a login context (e.g. within the designer) and the LoginFlow_UserId is not populated</description>
|
<name>Email_validation</name>
|
<label>Email validation</label>
|
<locationX>281</locationX>
|
<locationY>154</locationY>
|
<defaultConnector>
|
<targetReference>Generate_Random_Code</targetReference>
|
</defaultConnector>
|
<defaultConnectorLabel>Email exists</defaultConnectorLabel>
|
<rules>
|
<name>Email_is_missing</name>
|
<conditionLogic>and</conditionLogic>
|
<conditions>
|
<leftValueReference>UserObject.Email</leftValueReference>
|
<operator>IsNull</operator>
|
<rightValue>
|
<booleanValue>true</booleanValue>
|
</rightValue>
|
</conditions>
|
<connector>
|
<targetReference>Get_Email_from_user</targetReference>
|
</connector>
|
<label>Email is missing</label>
|
</rules>
|
</decisions>
|
<interviewLabel>{!$Flow.CurrentDateTime}</interviewLabel>
|
<label>Email Confirmation</label>
|
<processType>Flow</processType>
|
<recordLookups>
|
<name>Get_User_Info</name>
|
<label>Get User Info</label>
|
<locationX>47</locationX>
|
<locationY>152</locationY>
|
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
|
<connector>
|
<targetReference>Email_validation</targetReference>
|
</connector>
|
<filterLogic>and</filterLogic>
|
<filters>
|
<field>Id</field>
|
<operator>EqualTo</operator>
|
<value>
|
<elementReference>LoginFlow_UserId</elementReference>
|
</value>
|
</filters>
|
<object>User</object>
|
<outputReference>UserObject</outputReference>
|
<queriedFields>Email</queriedFields>
|
</recordLookups>
|
<screens>
|
<name>Get_Code</name>
|
<label>Get Code</label>
|
<locationX>911</locationX>
|
<locationY>159</locationY>
|
<allowBack>true</allowBack>
|
<allowFinish>true</allowFinish>
|
<allowPause>true</allowPause>
|
<connector>
|
<targetReference>Code_Validation</targetReference>
|
</connector>
|
<fields>
|
<name>GetCodeTitle</name>
|
<fieldText><DIV ALIGN="LEFT"><FONT FACE="Arial" STYLE="font-size:14px" COLOR="#000000" LETTERSPACING="0" KERNING="0"><B>Enter your verification code</B></FONT></DIV></fieldText>
|
<fieldType>DisplayText</fieldType>
|
</fields>
|
<fields>
|
<name>Instructions</name>
|
<fieldText><DIV ALIGN="LEFT"><FONT FACE="Arial" STYLE="font-size:12px" COLOR="#000000" LETTERSPACING="0" KERNING="0">A verification code was sent via email to {!UserObject.Email}. When you receive the code, enter it below.</FONT></DIV></fieldText>
|
<fieldType>DisplayText</fieldType>
|
</fields>
|
<fields>
|
<name>CodeInput</name>
|
<dataType>String</dataType>
|
<fieldType>InputField</fieldType>
|
<isRequired>true</isRequired>
|
</fields>
|
<fields>
|
<name>Space</name>
|
<fieldText><br/></fieldText>
|
<fieldType>DisplayText</fieldType>
|
</fields>
|
<fields>
|
<name>troubleTitle</name>
|
<fieldText><DIV ALIGN="LEFT"><FONT FACE="Arial" STYLE="font-size:14px" COLOR="#000000" LETTERSPACING="0" KERNING="0"><B>Didn&apos;t receive the email?</B></FONT></DIV></fieldText>
|
<fieldType>DisplayText</fieldType>
|
</fields>
|
<fields>
|
<name>troubleMessage</name>
|
<fieldText><DIV ALIGN="LEFT"><FONT FACE="Arial" STYLE="font-size:14px" COLOR="#000000" LETTERSPACING="0" KERNING="0">Sometimes automated messages get categorized as spam. Check your spam folder.</FONT></DIV></fieldText>
|
<fieldType>DisplayText</fieldType>
|
</fields>
|
<showFooter>true</showFooter>
|
<showHeader>true</showHeader>
|
</screens>
|
<screens>
|
<name>Get_Email_from_user</name>
|
<label>Get Email from user</label>
|
<locationX>282</locationX>
|
<locationY>358</locationY>
|
<allowBack>true</allowBack>
|
<allowFinish>true</allowFinish>
|
<allowPause>true</allowPause>
|
<connector>
|
<targetReference>Assign_Email_Address</targetReference>
|
</connector>
|
<fields>
|
<name>Title</name>
|
<fieldText><DIV ALIGN="LEFT"><FONT FACE="Arial" STYLE="font-size:12px" COLOR="#000000" LETTERSPACING="0" KERNING="0">Please provide your email address below</FONT></DIV></fieldText>
|
<fieldType>DisplayText</fieldType>
|
</fields>
|
<fields>
|
<name>Email</name>
|
<dataType>String</dataType>
|
<fieldType>InputField</fieldType>
|
<isRequired>true</isRequired>
|
</fields>
|
<showFooter>true</showFooter>
|
<showHeader>true</showHeader>
|
</screens>
|
<startElementReference>Get_User_Info</startElementReference>
|
<status>Active</status>
|
<variables>
|
<name>code</name>
|
<dataType>String</dataType>
|
<isCollection>false</isCollection>
|
<isInput>false</isInput>
|
<isOutput>false</isOutput>
|
</variables>
|
<variables>
|
<name>LoginFlow_UserId</name>
|
<dataType>String</dataType>
|
<isCollection>false</isCollection>
|
<isInput>true</isInput>
|
<isOutput>false</isOutput>
|
</variables>
|
<variables>
|
<name>SenderEmail</name>
|
<dataType>String</dataType>
|
<isCollection>false</isCollection>
|
<isInput>false</isInput>
|
<isOutput>false</isOutput>
|
<value>
|
<stringValue>ocm_te2ampj@olympus.com.cn</stringValue>
|
</value>
|
</variables>
|
<variables>
|
<name>UserObject</name>
|
<dataType>SObject</dataType>
|
<isCollection>false</isCollection>
|
<isInput>false</isInput>
|
<isOutput>false</isOutput>
|
<objectType>User</objectType>
|
</variables>
|
</Flow>
|