Flow Builder is a tool that can help us to automate complex business processes. Flows can be utilized in improveit 360 to send an automated email, auto-populate key information, and much more. This tool is recommended only for Advanced System Administrators. If you are not familiar with Flows, our team is happy to create customizations on your behalf, as an Advanced Service for a fee.
Whenever you are working with Flow, you should always build and test everything in a Sandbox. It is important to make sure that it is working as you expect before putting it in your Production environment.
- Resource: How to Create a Sandbox
- Resource: How to Log in to a Sandbox
In the exercise below, we will learn how to create a basic email flow to send the Account’s Primary Contact an email when the Installation Project Activity has been scheduled.
-
-
Preparation:
- Create a Date/Time field on the Project Activity called Install Scheduled Email Sent Date
- Create an Email Template and Email Alert
- Email Alerts can be created from Setup > Email Alerts > click New > fill in the information specified below and click Save:
- Description: Install Scheduled Email Alert
- Unique Name: this will auto-populate
- Object: Project Activity
- Email Template: use the look-up to find the template you created; you may need to switch the far-left dropdown to “Lightning”
- Recipient Type: Email Field
- Selected Recipient: Email Field: Contact Email
- From Email Address: make appropriate selection
- Email Alerts can be created from Setup > Email Alerts > click New > fill in the information specified below and click Save:
-
Follow Along Step 1:
- Navigate to Setup > search for Flow in the Quick Find > Select Flows > in the right-hand corner select New Flow > select Record-Triggered Flow > click Create
-
Follow Along Step 2:
- Under Select Object type in Project Activity > select i360core__Project_Activity__c > under Configure Trigger select A record is updated > set the Condition Requirements to All Conditions Are Met (AND) > make the following selections:
-
Preparation:
| Field | Operator | Value |
| I360core__Contact_Email__c | Is Null | False |
| I360core__Contact_Has_Opted_Out_Of_Email__c | Equals | False |
| I360core__Start__c | Is Null | False |
| Name (Project Activity Name) | Contains | Install |
| Install_Scheduled_Email_Sent_Date__c | Is Null | True |
These criteria are saying that the Contact has an email address and has not opted out of email, the Project Activity Start Date/Time is not blank, this email will only be sending for Project Activities with a name that contains Install, and the Installation Scheduled Email has not yet been sent.
-
Follow Along Step 3:
- Under When to Run the Flow for Updated Records select Only when a record is updated to meet the condition requirements
-
Follow Along Step 4:
- On the left-hand side of the screen under Run Immediately hover over the circle to display a + > click + > select Send Email Alert > under Action search for Install Scheduled Email Alert and select it > make the following selections and click b
- Label: Install Scheduled Email Alert
- API Name: this will auto-populate
- Description: enter anything to help you remember what template and email alert this is
- Record ID: under “Global Variables” select “$Record” > search for Id and select “Record ID” (if you selected correctly it will say “{!$Record.ID}”
- On the left-hand side of the screen under Run Immediately hover over the circle to display a + > click + > select Send Email Alert > under Action search for Install Scheduled Email Alert and select it > make the following selections and click b
-
Follow Along Step 5:
- Under the Email Alert Icon hover over the circle to display + > click +> select Update Triggering Record > enter the information specified below:
- Label: Update Installation Email Sent
- API Name: this will auto-populate
- How to Find Records to Update and Set Their Values: leave this as “Use the project activity record that triggered the flow”
- Condition Requirements to Update Record: leave this as “None--Always Update Record”
-
Set Field Values for the Project Activity Record:
- Field: Install_Scheduled_Email_Sent_Date__c
- Value: under Global Variables select “$Flow” > select “CurrentDateTime”
- Under the Email Alert Icon hover over the circle to display + > click +> select Update Triggering Record > enter the information specified below:
-
Follow Along Step 6:
- In the right-hand corner of the screen select Save and enter and Name for your flow. If you are in a Sandbox, select Activate and test your flow!
- To test your flow, use a Test Account that has your Email as the Primary Contact’s email. Then create a Project Activity with the name Install, if you did everything correctly, you should receive an email!
Comments
0 comments
Article is closed for comments.