Automation Champion

Automating Salesforce One Click at a Time
Automation Champion
  • Home
  • About Me
    • Testimonials
    • Resources
  • Process Builder
  • Salesforce Flow
  • Pardot
  • Apex
  • Training Details
    • Salesforce Administrator
    • Salesforce Advanced Administrator
    • Platform App Builder
    • Lightning Flow
    • Pardot
    • Sales Cloud
    • Service Cloud
    • Community Cloud
    • Hands-on Excercises
  • My Books
  • Contact Me
  • Tag: delete Paused and Waiting Interviews

    • Getting Started with Process Builder – Part 11 (Mass Delete Paused and Waiting Interviews)

      Posted at 8:40 PM by Rakesh Gupta, on March 16, 2015

      Big Idea or Enduring Question:

      In this article Getting Started with Process Builder – Part 2 (Time-dependent actions), I had discussed how to add a Time-based action into a Process. I also discussed a way to check the Paused and Waiting Interviews in the Flow and Process Builder, by navigating to Setup | Paused Flow Interviews as shown in the following screenshot:

      Use the Del link to remove an Interview (An interview is a running instance of a Flow) from the Paused and Waiting Interviews queue, but it doesn’t allow you to mass delete/remove the Paused and Waiting Interview. In this article, we are going to discuss a way to mass delete/remove Waiting and Paused Interviews.

      Objectives:

      This blog post will help us to understand the following

      • How to mass delete/remove Waiting and Paused Interviews.
      • Setup a simple Flow

      Business Use case

      Martin Jones is working as a System administrator at Universal Containers (UC). He developed a Process to update the Account Description after 5 days of its creation. For testing purposes, he created 10 records, which means 10 Jobs/Interviews are waiting in Paused and Waiting Interviews queue. He wants to delete all the Interviews from a Single click instead of deleting one-by-one.

      Below is the screenshot of the most active version of a Process.

      Automation Champion Approach (I-do):

      While this can be solved using various automation tools like Apex or Flow. In this case, Lightning Flow is being used to solve this requirement.

      Before proceeding you have to understand the below-mentioned objects in Salesforce:

      • FlowInterview: -This object represents a flow interview. An interview is a running instance of a Flow.

      This article will help you understand how to mass delete Paused and Waiting Interviews. Let’s begin building this automation process.

      Guided Practice (We-do):

      There are 2 steps to solve Martin’s business requirement using Lightning Flow. We must: 

      1. Define flow properties
      2. Add a delete records element

      Step 1: Define Flow Properties

      1. Click Setup.
      2. In the Quick Find box, type Flows.
      3. Select Flows, then click New Flows.
      4. Select the Screen Flow option and click on Next and it will open the flow designer for you.

      Step 2: Add a Delete Records Element

      1. Drag-and-drop Delete Records element onto the Flow designer. 
      2. Enter a name in the Label field; the API Name will auto-populate.
      3. For How to Find Records to Delete select Specify conditions.
      4. Select the Flow Interview object from the dropdown list.
      5. Set Filter Conditions
        1. Row 1:
          1. Field: Interview Label
          2. Operator: Equals
          3. Value: Sample_Process-1_InterviewLabel
      6. Click Done.

      The question arises here why we have chosen InterviewLabel in the Preceding screenshot, why not any other fields.

      • This is because there are a limited number of fields that you can select in the Record Delete element for FlowInterview.
      • InterviewLabel field is made up of ProcessAPIName-VersionNo_ObjectName and API Name is always the same for all versions of a Process
      • It also gives you the flexibility to mass delete Interviews of a specific version of a Process

      In the end, Martin’s Flow will look like the following screenshot: 

      Click on the Save button and save the Flow with the name Mass delete Paused and Waiting Interviews as shown in the following screenshot: 

      Almost there! Once everything looks good, click the Activate button.

      Proof of Concept

      Currently, there are 4 Interviews waiting in Paused and Waiting Interviews queue for Process Sample_Process-1, as shown in the following screenshot:

      It’s time to Run the Flow to mass delete Interview those belongs to Process Sample_Process-1. To do this navigate to Setup | Flows and click on the Flow Mass delete Paused and Waiting Interviews, it will redirect you to the Flow detail page. Now click on the Run button, shown in the following screenshot: 

       Go back to Paused and Waiting Interviews section available on the Flow Management page and check it out:

      Formative Assessment:

      I want to hear from you!  

      What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? 

      Let me know by Tweeting me at @automationchamp, or find me on LinkedIn.

      Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!

      Posted in Process Builder, Salesforce Flow, Spring'15 Release | 4 Comments | Tagged Add Criteria Proces builder, and any time it’s edited to subsequently meet criteria in Proces builder, Delete a Flow Interview, Delete a Process Interview, delete Paused and Waiting Interviews, delete Paused Interviews, delete Paused Interviews Flow, Delete Process Builder time based action, Delete time based action process builder, Delete Waiting Interviews, Delete Waiting Interviews Flow, Delete Waiting Interviews Process Builder, Do you want to execute the actions only when specified changes are made to the record, Enable Process Builder, flow:interview, Getting started with Process Builder, How to activate Process builder, how to use Process builder, InterviwLabel, Launch flow from PB, Lightning App, Lightning Developer Week, Lightning Process builder, Mass delete Paused and Waiting Interview, Mass delete Paused and Waiting Interviews, Mass delete Paused Interviews Flow, Mass delete Paused Interviews Prcoess Builder, Mass delete Waiting Interviews Flow, Mass delete Waiting Interviews Prcoess Builder, Paused and Waiting Interviews, Prcoess builder and Chatter use case, Process Builder Salesforce, Process Builder update a record action, Process builder use case, Spring15 process builder, Spring15 Process builder enhancement, Update Records, What is Process Builder, Whenever a record is created
    • Search

    • Upcoming Trainings

      Salesforce Administrator Certification
      Salesforce Advanced Administrator Certification
      Salesforce Platform App Builder Certification
      Lightning Flow & Process Builder
      Advanced Lightning Flow
      Pardot Specialist & Consultant Certification
      Sales Cloud Consultant Certification
      Service Cloud Consultant Certification
      Community Cloud Consultant Certification
    • Sponsor #1

    • Sponsor #2

    • Sponsor #3

    • Sponsor #4

    • Order Now!

    • Buy My Book

    • Buy My Book

    • Recent Posts

      • Pardot Summer’21 Release: Top 5 Features
      • Salesforce Summer’21 Release Quick Summary
      • Getting Started with Process Builder – Part 60 (Allow Anyone to Add or Remove User into Public Group or Queue)
      • Getting Started with Salesforce Flow – Part 59 (Clone a Chatter Group with Members)
      • New Research: Salesforce Delivery Teams Excel in Speed but at the Expense of Quality
    • Salesforce ID Converter Build on Lightning Flow

      Converting 15 digit ID to 18 digit Salesforce ID
    • Blog Archives

    • Categories

  • Information

    • About Me
    • Affiliate Disclaimer
    • Contact Me
    • Privacy Policy
  • Top Posts

    • Salesforce Summer’21 Release Quick Summary
    • Learning Flow
    • Pardot Summer'21 Release: Top 5 Features
    • Learning Process Builder
    • Salesforce Spring’21 Release Quick Summary
    • Getting Started with Salesforce Flow – Part 57 (Adding Validation to Flow Screen Components)
    • Pre-requisites for Learning Apex - Logical Mind and Confidence!
    • Getting Started with Salesforce Flow – Part 11 (Count Number of records in a Record Collection Variable)
    • Getting Started with Salesforce Flow – Part 24 (Automatically Assign Permission Sets to New User)
    • Getting Started with Salesforce Flow – Part 4 (Need to Redirect a User to a New Record?)
  • Social Media

    • View Automationchampion’s profile on Facebook
    • View Automationchamp’s profile on Twitter
    • View Rakeshistom’s profile on GitHub