Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions force-app/main/default/flows/Course_Reminder_Email.flow-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<description>For course participant to receive a reminder email about the upcoming course.</description>
<environments>Default</environments>
<formulas>
<name>In3Days</name>
<dataType>Date</dataType>
<expression>TODAY() + 3</expression>
</formulas>
<formulas>
<description>Starts in 4 days</description>
<name>In4Days</name>
<dataType>Date</dataType>
<expression>TODAY() + 4</expression>
</formulas>
<interviewLabel>Course Reminder Email {!$Flow.CurrentDateTime}</interviewLabel>
<label>Course Reminder Email</label>
<loops>
<name>Loop_Through_Courses</name>
<label>Loop Through Courses</label>
<locationX>0</locationX>
<locationY>0</locationY>
<collectionReference>Get_Courses_Starting_in_3_Days</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
<targetReference>Get_Registrations_for_Course</targetReference>
</nextValueConnector>
</loops>
<loops>
<name>Loop_Through_Registrations</name>
<label>Loop Through Registrations</label>
<locationX>0</locationX>
<locationY>0</locationY>
<collectionReference>Get_Registrations_for_Course</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
<targetReference>Send_Course_Reminder_Email</targetReference>
</nextValueConnector>
<noMoreValuesConnector>
<targetReference>Loop_Through_Courses</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>AutoLaunchedFlow</processType>
<recordCreates>
<name>Send_Course_Reminder_Email</name>
<label>Send Course Reminder Email</label>
<locationX>0</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Loop_Through_Registrations</targetReference>
</connector>
<inputAssignments>
<field>Priority__c</field>
<value>
<stringValue>1</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>SaveAsActivity__c</field>
<value>
<booleanValue>true</booleanValue>
</value>
</inputAssignments>
<inputAssignments>
<field>Status__c</field>
<value>
<stringValue>Queued</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>TargetObjectId__c</field>
<value>
<elementReference>Loop_Through_Registrations.CourseParticipant__c</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<field>TemplateName__c</field>
<value>
<stringValue>courseAllScheduledEmailReminder</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>WhatId__c</field>
<value>
<elementReference>Loop_Through_Registrations.Id</elementReference>
</value>
</inputAssignments>
<object>EmailQueue__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordLookups>
<name>Get_Courses_Starting_in_3_Days</name>
<label>Get Courses Starting in 3 Days</label>
<locationX>0</locationX>
<locationY>0</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Loop_Through_Courses</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Active__c</field>
<operator>EqualTo</operator>
<value>
<booleanValue>true</booleanValue>
</value>
</filters>
<filters>
<field>RegistrationFromDateTime__c</field>
<operator>GreaterThanOrEqualTo</operator>
<value>
<elementReference>In3Days</elementReference>
</value>
</filters>
<filters>
<field>RegistrationFromDateTime__c</field>
<operator>LessThan</operator>
<value>
<elementReference>In4Days</elementReference>
</value>
</filters>
<getFirstRecordOnly>false</getFirstRecordOnly>
<object>Course__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordLookups>
<name>Get_Registrations_for_Course</name>
<label>Get Registrations for Course</label>
<locationX>0</locationX>
<locationY>0</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Loop_Through_Registrations</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Status__c</field>
<operator>EqualTo</operator>
<value>
<stringValue>Påmeldt</stringValue>
</value>
</filters>
<filters>
<field>Course__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>Loop_Through_Courses.Id</elementReference>
</value>
</filters>
<getFirstRecordOnly>false</getFirstRecordOnly>
<object>CourseRegistration__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<start>
<locationX>0</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Get_Courses_Starting_in_3_Days</targetReference>
</connector>
<schedule>
<frequency>Daily</frequency>
<startDate>2025-11-04</startDate>
<startTime>16:00:00.000Z</startTime>
</schedule>
<triggerType>Scheduled</triggerType>
</start>
<status>Active</status>
</Flow>