---
title: Sales Metrics - Number of Touches Before Deal Closes
description: With Rollup Helper, capture the number of activities on an opportunity in Salesforce, then use workflow rules to see total activities before closing a deal
---

[Rollup Helper Use Case Library | Passage Technology ](https://www.passagetechnology.com/rollup-helper-use-cases)

# [Sales Metrics - Number of Touches Before Deal Closes](https://www.passagetechnology.com/rollup-helper-use-cases/number-of-touches-before-deal-closes)

 Written by [Jacob Blair](https://www.passagetechnology.com/rollup-helper-use-cases/author/jacob-blair) | Sep 22, 2014

This is a two-part rollup. The first part captures the number of activities on an opportunity. The second part makes use of Flow to capture the number of activities completed before a deal was closed. (Note: if an opportunity is re-opened and closed, the number of activities before closed date field will change to match the number of activities field.)

Step 1. Create a field to hold the number activities completed and a field to hold the number of activities completed before deal closed.

Step 2. Create a rollup to the opportunity object; select number of activities field as target field.

Step 3. Select Task as child object and Deleted as source field. Select Count as Rollup Type.

Step 4. Create a record-triggered Flow on the opportunity object.

Step 5. Configure the flow to trigger when a record is created or updated.

Step 6. Change the entry conditions to formula evaluates to true, the formula should be set to

(IsClosed = False) &&

(

ISCHANGED(Number_of_Activities__c) ||

ISCHANGED(IsClosed)

)

Step 7. Optimize the flow for Actions and Related Records. 

Step 8. Add an Update Records element below the start and set a label. Under “How to find records to update and set their values”, select “Use the opportunity record that triggered the flow”.

Step 9. Under Set Field Values for the Opportunity Record, select the closed number of activities before the close date field for the field, and select the triggering opportunity and rollup target field for the value.

Step 10. Make sure to activate your flow rule! After this is done your rollup should be up and running!

 

 *Updated, 4/7/2026* 

 

[View full post](https://www.passagetechnology.com/rollup-helper-use-cases/number-of-touches-before-deal-closes)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Jacob Blair"
  },
  "dateModified" : "2026-04-07T18:28:42.080Z",
  "datePublished" : "2014-09-22T15:24:31Z",
  "headline" : "Sales Metrics - Number of Touches Before Deal Closes",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.passagetechnology.com/rollup-helper-use-cases/number-of-touches-before-deal-closes",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Rollup Helper Use Case Library"
  }
}
```