function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CommaSpaceCommaSpace 

Visual flow designer create record after decision element branches

I've created a customer intake form for internal use and need some help determining the best way to create a lead record (which will immediately be converted to account/contact/opportunity thanks to that awesome plugin I found in help)
All of my detail fields pull data from the first input screen, and I don't know how to get only the selected decision branch into the record create.  I also don't fully understand Collection Variables, sObject Variables, or sObject Collection Variables (despite going through the trailhead) but I feel like the solution is along that route?  All I can figure right now is propulating fields using a whole bunch of IF() formulas but I think there has to be a stronger, more efficient way.  Guidance please? Many thanks! 

Image depicting my cloud flow design for customer intake
Best Answer chosen by CommaSpace
Parker EdelmannParker Edelmann
If they're required values, yes it should work right. You may want to phrase it like this though to be on the safe side: {!Art_CalcDetails}&{!TB_Inquiry_Details_1}&{!Custom_Inquiry_Details} If they're not required fields, you might want to use a formula like this:

IF( ISBLANK( {!Art_CalcDetails} ), {!Art_CalcDetails}, ""  ) & IF( ISBLANK( {!TB_Inquiry_Details_1} ), {!TB_Inquiry_Details_1}, "" ) & IF( ISBLANK( {!Custom_Inquiry_Details } ), {!Custom_Inquiry_Details}, "" )

All Answers

Parker EdelmannParker Edelmann
You can simply take the value of a screen input field and assign it to a field on the lead Record Create. If you're asking about how to create a different type of record, or not to create a record at all, based on the decision element, then you can use multiple a record create element for each outcome, or skip the record create and plugin and go to the end screen.

Here's a brief overview of the various variables:
  • Variable stores a single value
  • Collection Variable stores a list of values
  • sObject Variable stores a record and some/all of its field's values
  • sObject Collection Variable stores multiple records and some/all of its field's values
One guidebook that I really liked and helped me alot, was the Cloud Flow Designer Workbook(https://developer.salesforce.com/docs/atlas.en-us.workbook_flow.meta/workbook_flow/). It'll explain everything in great detail and give you in-depth hands on experience as well. I encourage you as well as everybody to check it out. If this helps you, please let me know.

Thanks,
Parker
CommaSpaceCommaSpace
Hi Parker, thank you for the info, yes I've gone through the workbook also and it helped me get a foggy idea :)
Yes regarding the record create I'm trying to determine the strongest most effecient route. For example, on Lead Record Create, I assign the description field to populate with ALL 3 fields from the 3 options: {!Art_CalcDetails}{!TB_Inquiry_Details_1}{!Custom_Inquiry_Details}. Which seems to be working but I don't know if it's right.
Detail of my lead record create screen
 
Parker EdelmannParker Edelmann
If they're required values, yes it should work right. You may want to phrase it like this though to be on the safe side: {!Art_CalcDetails}&{!TB_Inquiry_Details_1}&{!Custom_Inquiry_Details} If they're not required fields, you might want to use a formula like this:

IF( ISBLANK( {!Art_CalcDetails} ), {!Art_CalcDetails}, ""  ) & IF( ISBLANK( {!TB_Inquiry_Details_1} ), {!TB_Inquiry_Details_1}, "" ) & IF( ISBLANK( {!Custom_Inquiry_Details } ), {!Custom_Inquiry_Details}, "" )
This was selected as the best answer
CommaSpaceCommaSpace
awesome, thank you!
Parker EdelmannParker Edelmann
You're welcome. Glad I could help.