0

I am working for 2 days on creating a flow for opportunities. I have 3 kinds of products: Tickets, Cards and Media organized them by product family (Tickets, Cards and Media) and named Tickets Name 1, Ticket Name 2, Card name 1, card name 2...

Inside the opportunity header, I created 3 new fields: Total Tickets, Total Cards, and Total Media. I want to use a flow to fill those fields automatically.

For tickets, the sum of tickets products total price, for cards the sum of card total price...

Step 1 : I created a flow "Record-Triggered" :

  • Object : Opportunity Product
  • Trigger : a record is created or updated
  • Optimize for : Actions and related Records

Step 2 : Update Records

  • Object : opportunity
  • conditions : i don't know exactly how to fill it.
  • and field value to modify Copy of Update Records step

So far this trigger work and change my Ticket field but it does not change it with the sum of tickets product, only with the last updated product.

Can you help? Thank you

5
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Jul 27, 2022 at 15:27
  • if you are doing rollups - why not use the DLRS tool (no code, not even lo-code)
    – cropredy
    Jul 27, 2022 at 19:44
  • @cropredy - I set up it in Sandbox to give it a try. If I do understand well I should set it up like this : - parent object: Opportunity - child object: Opportunity Product - Relationship field: Product - relationship criteria: familly product = famille name - Relationship Criteria Fields: total price - field to aggregate: totalprice - aggregate operation: sum – aggregate result field: the field I created in realtime. I am more or less right to start it ? Thank you
    – Stuart66
    Jul 27, 2022 at 22:13
  • If OpportunityProduct.ProductFamily is not a formula field (but populated by other automation, then you can use OOTB Roll-up Summary fields as Opportunity->OpportunityProduct is Master-Detail; otherwise you have to consider the issues here
    – cropredy
    Jul 27, 2022 at 22:45
  • I created a shadow field regarding the issue and then configured but i have errors regarding the relationship criteria fields and relationship criteria fields. Here is a screenshot of the error and setup: capture.dropbox.com/9cSbEuLhOomN3Qjn
    – Stuart66
    Jul 28, 2022 at 9:23

1 Answer 1

0

I found a solution myself :

  1. I created a shadow field "Product Family" in OpportunityProduct
  2. I created a flow to fill that field with the product family name
  3. Inside the Opportunity object I created a new field using "Roll-Up Summary" with a filter on the shadow product family field. (it's not possible to use as filter formula generated field).

And all works very well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .