Use Case: Clone Opportunity Products To Assets
Last time we introduced a solution to clone Assets into Opportunity Products, and today we are sharing the solution of the other way around – clone Opportunity Products into Assets.
This solution should be a simpler one, because we can find all the values we need on the Opportunity and Opportunity Product objects. It does not require additional Get Records element in the loop. Before we jump right in, remember to review the data model of Opportunity Product and Asset.
Lulu Mobile has several subscription products and they use the standard Asset object to keep track of each customer’s purchase. They also use Opportunity to keep track of all their potential deals. Whenever they mark an Opportunity as closed won, they want to automatically clone these Opportunity Products into Assets for the same Account.
Since this solution should run after Opportunity is closed, we will create a Record-Triggered flow.
The idea is to loop through all Opportunity Products and update a placeholder variable for Asset, then create all assets at once. Since all the information we need exist on Opportunity or Opportunity Product, this will be a straight-forward flow to build.
If you are unfamiliar with Variable and Loop, check out these short video introductions:
Record-Triggered | Get Records | Variable.Collection |
Create Records | Assignment |
Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!
Is there a way to simplify the Asset Name so it doesn’t pull the whole Opportunity name associated with the Opp Prod?
Nevermind, I figured it out! This is such a helpful tutorial. Thank you!
This is fantastic! It worked perfectly. But I was wondering how I can prevent duplicate assets from being created. For example, one of our users closed won an opportunity, then moved it back to open, then closed won again a week later. It’s really not a common use case, but it happened nonetheless 🙂 How would I prevent the assets from being duplicated when the same opportunity is closed won more than once? Thanks so much for all you do!
Hello, thank you for the awesome explanation.
I was wondering if it is possible to use quantity field for creating multiple assets, instead of only one.