The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Recommended

Build a win-back review queue for Closed Lost Opportunities with a scheduled Flow (opens in a new tab)

You will learn how to add a loss reason and revisit date to lost Opportunities, have a Scheduled Flow create follow-up Tasks on those dates, and keep lost deals linked to any later win.

Why read this

The approach needs no Apex.

  1. Require a loss reason on Closed Lost
  2. Set Revisit_On__c with a Record-Triggered Flow
  3. Scheduled Flow runs daily on revisit date
  4. Create a Task assigned to the owner
  5. Route inactive owners to a queue or manager
How a Closed Lost Opportunity moves from lost deal to a daily revisit Task

The author argues that Opportunities marked Closed Lost fall out of pipeline reports and are rarely revisited, so lost deals return only by chance. He proposes a declarative setup that turns them into a review queue.

The setup adds two Custom Fields on Opportunity, Loss_Reason__c as a picklist and Revisit_On__c as a date. A Validation Rule requires a loss reason when the stage is Closed Lost. A Record-Triggered Flow sets the revisit date, with a default of 12 months after the close date that can vary by reason.

A Schedule-Triggered Flow runs daily on Opportunities that are Closed Lost and whose revisit date is today. It creates a Task for each record, assigned to the owner, with a subject, the activity date and a description containing the reason and amount. Inactive owners will cause failures, so the author suggests routing those records to a queue or manager with a Decision element. Before activating the flow, he recommends running a SOQL query to preview the next 30 days of revisits.

The author also suggests a lookup field, Original_Opportunity__c, to link a new Opportunity to the lost one when a deal returns. He warns against reopening old records or deleting Closed Lost ones, since that erases the history needed to measure how many lost deals come back and after how long. A second query groups won deals by the loss reason of their original Opportunity to test this.

Read the original at dev.to (opens in a new tab)

Worth reading?