Creating a master Flow

Let's look at a business scenario. Sara Bareilles is working as a system administrator at Universal Containers. She wants to use Flow to create an Opportunity and set the Opportunity fields according to the following requirements:

  • Close Date: Today plus 120 days
  • Opportunity Name: The same as the account name
  • Account: Map with the account record that started this Flow
  • Stage: Prospecting

She wants to launch the Flow using Process Builder whenever an account gets created. Perform the following steps to solve the preceding business requirement:

  1. In the Lightning Experience, navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Flows.
  2. Click on the New Flow button; it will open the Flow canvas for you.
  3. Create three Text variables: VarTAccount_Id, VarTAccount_Name, and VarTOpp_Id. Set Input/Output Type as Input and Output.
  4. Then, create a Formula resource to generate a dynamic date, that is, 120 days from today, as shown in the following screenshot:
  1. Once you are done, click on the OK button.
  2. Then, click on the Palette tab, and drag and drop the Record Create element onto the canvas; it will open a window for you, where you have to enter the name Create new Opportunity. Map the fields according to the following screenshot and then save the newly created Opportunity ID in the VarTOpp_Id variable:
  1. Once you are done, click on the OK button.
  2. Set the Record Create element as the start point. Save the Flow with the name Create new Opportunity and Type as Autolaunched Flow, and then click on the Close button to close the canvas. Don't forget to activate the Flow.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.125.139