--- title: "Retrieve customized information from opportunity products" slug: "automatisation-récupérer-des-informations-personnalisées-des-produits-dopportunités" updated: 2025-12-22T14:11:22Z published: 2026-01-07T10:04:05Z canonical: "help.frisbii.com/automatisation-récupérer-des-informations-personnalisées-des-produits-dopportunités" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.frisbii.com/llms.txt > Use this file to discover all available pages before exploring further. # Retrieve customized information from opportunity products Candace, the best sales rep of the Cloud Kicks team, needs to fill in additional information in a custom text field on the opportunity product. This custom information helps the customer understand the products purchased in addition to their official description. One day, a customer calls Candace not understanding her invoice. To her dismay, Candace discovers that the information was not displayed on the Invoice PDF. She then turns to Linda to see what can be done to display this information. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-L11FKJOH.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) Linda investigates and discovers that the *additional description* field has been created on the Invoice Line but is never filled in. So she tries to set up an automated way to retrieve the opportunity product information. Unfortunately, she reaches a limitation of the Salesforce platform: it is impossible to create a lookup field for opportunity products. Fortunately, Frisbii anticipated this problem and filled in a text field with the ID of the opportunity product from which the invoice line originates. Linda can't do a simple process because it doesn't handle text-based IDs. Linda reassures Candace, rolls up her sleeves and opens her configuration to set up a flow. ## Prerequisites You need to know the field whose values are to be copied from Opportunity product to Invoice line. You need to create a field of the same type with the same characteristics (length, selection list values, number of decimals…) on the **Invoice Line** as on the Opportunity product. ## Flow setup Linda starts with the creation of a flow. Following the Trailhead units she has done on this subject, she is confident that she will get it right the first time. ### Steps 1. Open the **Setup**. 2. Type *Flow* in the **Quick Find** search. 3. Click on Flows in Setup > Process Automation > **Flows**. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-L40X65E7.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Click on **New Flow** at the top right. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-ZRVACQB6.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Choose **Record-Triggered Flow** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-EJXYHUZC.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Choose **Auto-Layout** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-VAWQIMA8.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 2. Click on **Edit** in order to set the Start conditions. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-OY6FFUGZ.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Keep **a record is created** and select **Before the record is saved.** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-PLAZTI9Z.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Click on **Done** 2. Click then on **+ Choose Object** in the Stard box ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-JIICDB7H.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 3. Select **Invoice Line Item**, select **None** for the conditions and click on **Done** without entering a condition. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-YLKZCOUO.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 12. Click on the **+** icon and select the **Get Records** item. Enter the label for this item. For example **Get Opportunity Product**. 13. Enter a description that will allow anyone to understand what this item does. For example: *Retrieves the opportunity revenue associated with the invoice line.* 14. Search for "Opportunity" in the **Objet** field. 15. Select Opportunity Product. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-LVHPC830.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-L890BT5Z.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 16. Now the conditions are available. Choose in **Field** *Id* and keep the operator at **Equals**. 17. Click into the **Value** field. 18. Click on **$Record** at the end of the list. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-RQ67ZQK3.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 19. Type *opp* to bring up the choice **sofactoapp__OppLineItemId__c** which is the field that carries the id of the opportunity product from which the invoice line originated. 20. Select this choice. **Beware**: If this field is empty the flow will block. This flow must be completed if all your invoice lines are not issued from or linked to an opportunity product. This is for example the case if you create invoices ex-nihilo or if you never use the opportunities. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-S1GMOVLN.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Keep the other default values and click on **Done** at the bottom right. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-4RDD6S1O.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 22. On the **+** icon between the *Get Record* Element and the *End* item select **Assignment**. 23. Enter the label for this item. For example *Fills in the custom fields on Invoice Line Item*. 24. Enter a description that will allow anyone to understand what this element does. For example: *"This assignment allows the fields on Invoice Line to be populated with the values of the fields on Opportunity Product.".* 25. Click on the **Variable** field. 26. Choose **$Record**. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-N5FGMDNY.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 27. Find the field to be filled in, here: *Additional description* and select it. Leave the operator as is. 28. Click on the **Value** field on the right to highlight it. 29. Select **Opportunity Product** from **Get Opportunity Product**. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-YO1BUCG9.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 30. Select the source field on **Opportunity Product**, here : *Additional Description*. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-X31PDXPR.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. If you have more fields to synchronize, you can click **+ Add Assignment** and repeat steps 25 to 30, otherwise click **Done.** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-QEK0EFBT.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 2. Click on **Save** at the top right. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-B5KD1FOF.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 34. Fill in the label of the flow. We advise you to always have the same nomenclature. Here, we start by describing the type of automation (flow), then the object on which it is based (Invoice line) and finally its triggering mode (before insert). For example, here we have: *Flow - Invoice line item - before insert*. 35. Also fill in the description. For example here: *This flow in before insert (before inserting the record in the database) retrieves the custom information of the opportunity product and fills it in the invoice line.* 36. Click **Done**. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-Z6YTJS21.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Finally, click on **Activate** at the top right. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-Z5PHK546.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) ## Testing Approach Linda and Candace are eager to test Linda's flow. Let's see how they proceed. ### Steps 1. Open an opportunity record. 2. Click on a product record in the related list. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-6WNXDZ8D.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 3. Enter a value in the field or fields to be retrieved. Here *Additional description*. 4. a) Click on **Save**. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-AVT4NC5K.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D)

4. b) Then go back to the parent opportunity and click the Create invoice and Confirm button on the intermediate confirmation page.
![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-TNZVGSGK.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 5. You should now be on an **Invoice** record. Go to the invoice line associated with the opportunity product where you had entered a value, in this case *Sneakers Winter 20*. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-TRIYU1XT.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 6. The information must be correctly present on the invoice line item. Here the ***Additional Description*** field is filled with the value previously entered on the opportunity product. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-2PMEDYQ4.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) ## ## Appendix: if invoice lines are without opportunity line item This flow does not handle the case where the invoice line is not linked (directly or indirectly) to an opportunity product. Please find here the procedure to add a control in order to handle this exception and avoid errors. ### Steps 0. Re-open the flow. 1. Click and drag a **Decision** item from the toolbox. 2. Fill in an explicit label. 3. Enter a description. 4. Enter an explicit label for the result details. 5. Fill in the resource by choosing **$Record** and the **OppLineItemId** field 6. Change the operator and choose **Is null** 7. Fill in the value with the global constant **False**. 8. Click on **Done.** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-Z23XR4W1.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-3PL54M4H.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Click the arrow that connects the **Start** and **Get Records** item to highlight it. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-TAK4VYT6.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Tap the **Delete** or **Backspace** key to delete this connection.


10. Tap the Delete or Backspace key to delete this connection.

![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-YQFDIO9X.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Connect the **Start** and **decision** item to **Get Records** box. Select the **Yes - there is an opportunity product outcome** and click **Done** when connecting the decision with **Get Records.** 2. Click on **Save As.** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-Y4V5CP41.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 1. Leave as is or complete the description and click **Save.** ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-JST4VNZ2.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) 14. Finally, activate this new version. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-17FQWB6E.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A51%3A35Z&se=2026-10-28T02%3A51%3A35Z&sr=c&sp=r&sig=vMA3Wq1S5fTAGbNKVmvqhOrwa3kBEYY%2FZ8f%2FyD1NMOk%3D) ## Beware of your org's performance A before insert flow is the one that will ensure the best performance for the automation. However, this does not mean that it is sufficient in case of mass creation of invoice lines. For example: generation of billing schedules at the same time on several subscriptions from opportunities. Please test that this automation does not negatively impact your org by reaching limits. This flow does not manage synchronization. A modification on the opportunity product will not be distributed on the associated draft invoice lines.