Use Case: Clone Assets To Opportunity Products

I received this case to auto-create Opportunity Product or Quote Items based on the Account Assets. This is actually one of my dream feature that is still not available, so let’s build it in flow!

Before we start, we have to understand the difficulties of this action. While Asset has lookup to Product object, Opportunity Product has lookup to Pricebook Entry object, which is a junction object of Pricebook and Product. In order to get Pricebook Entry Id, we need to find the Pricebook Id too (Comment below if this needs more explanation and I can write another article).
The flow will then focus on how to get the right Pricebook Entry Id. Also, since you can sync the Quote Items from Opportunity Products afterward, here we only focus on how to clone from assets to opportunity products.

Lulu Mobile has several subscription products and they use the standard Asset object to keep track of each customer’s purchase. There are different asset statuses: auto-renew, free, and trial. They want a solution to get the assets from the account and populate them to opportunity products automatically if the assets have the auto-renew or free status. They also want only the assets with “Not Billable” unchecked to be cloned.

As we cannot be sure if a pricebook is already chosen in the opportunity, we want to use a screen flow and let the users choose the right pricebook if it is still empty. We will then get all the assets that meet the criteria, loop through them to get the Product Id, and then get the Pricebook Entry Id. After that, we can create opportunity products in bulk.

We will launch it with quick action for users to decide when to clone the assets.

First time: When opportunity has no pricebook. Second time: When opportunity already has pricebook registered

Screen FlowAssignmentVariable/Collection
Record IdCreate RecordsInput Variable
ScreenGet RecordsLoop
DecisionFormulaFormula

Does the solution solve your problem? If not, write us what your problem is and we will build the flow for you!

Official Salesforce Help Article On Flow

Subscribe
Notify of
guest

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
megan blotzer

Any chance you have a use case that is the “flip” of this? When an Opportunity is marked as Closed Won, create Assets from the Opportunity Products

Vicky

Hi Melody,

I would really appreciate this! Even if you can’t do a whole post if you could expand on the bullet points above that would be amazing.

thanks!

Vicky

Thank you Melody. I keep getting an error where the records can’t be found? If you get chance to post the full walkthrough that would be really helpful.
Fingers crossed you get chance soon!

B patel

Has this been published now? this is a scenario i am working on building to create “purchases” record for each opportuntity line item at the account level when the opportunity is set to closed won.

Last edited 1 year ago by B patel