Auto-Close Support Cases Using Salesforce Flows

In Salesforce, our service agents handle customer support cases. Sometimes, after replying to a customer, they wait for the customer to respond. However, if the customer doesn’t reply, the case remains open for an extended period.

To avoid keeping these cases open for too long, the service manager wants to automate the process of closing any cases that have been in “Waiting for Customer Response” status for more than 5 days.

To fulfill this requirement, I created a Scheduled Trigger Flow in Salesforce that automatically checks such cases every day and closes them if no customer response is received within the 5-day period.

In this article, we will learn about how to auto-close support cases using Salesforce Flows.

Auto-Close Support Cases Using Salesforce Flows

Now we will understand how to automate the process of closing cases that have been in “Waiting for Customer Response” status for more than 5 days.

In the screenshot below, you can see open cases that have been in the “Waiting for Customer Response” status for a long time without any reply from the customer.

When these cases stay open for too long, the number of open cases keeps growing, and it becomes harder for agents to focus on the active ones.

To fix this, we created an automation in Salesforce that will close these cases automatically if no response is received from the customer within 5 days.

Salesforce Flows Auto-Close Support Cases

I will now explain the flow and demonstrate the proof of concept for the working flow.

Navigate to the setup, and in the Quick Find box, search for ‘Flows’ under Process Automation.

In the flows setup window, click on the button New Flow. Select the option Schedule-Triggered Flow, and click Create.

Select the Start Date and Start Time for the schedule of the trigger flow. After this, select the frequency from the options: OnceDaily, or Weekly.

Close Waiting Cases in Salesforce

To identify cases that have been waiting for 5 days or more, we can create a formula that calculates the number of days since the case was last updated.

We will use the Last Modified Date field to find out how long the case has been in the “Waiting for Customer Response” status.

If the calculated days are greater than or equal to 5, then the case will be included for auto-close.

To create a formula in Flow Builder, click on “New Resource” in the Toolbox. Then choose “Formula” from the Resource Type dropdown. After that, provide the API Name and select the data type.

Here, we will select Date as the Data Type because we want to return the date as output.

Create Formula Resource in Salesforce Flow

Next, we need to retrieve all the cases stored in the Case object. To achieve this, we need to add the Get Records element and enter a Label and API Name.

Then, to filter the case records, add the conditions as given below:

  • Status – Equals – Waiting For Customer Response.
  • Lat Modified Date – Equals – From_5_Days_Before (Formula Resource).
Salesforce Flow Close Waiting Cases

Next, add an Update Record Element and provide a Label and API Name. Using this, we will update the record status.

After adding the update record element, we need to set field values for the record. We want to update the case record by adding the Status field and then assigning the Closed value.

Close Waiting Cases Using Salesforce Flow

Now we are ready to save the flow. To do this, click the Save button, provide a flow Label, and the API Name will be automatically populated.

After that, always debug the flow before activating it to ensure that the working flow is correct and that there are no runtime errors. Then activate the flow.

Auto-Close Support Cases Using Salesforce Flows

Now, based on the schedule we set in our flow, it will run automatically at the chosen time and frequency.

When the flow runs, it will look for all cases that match the conditions we defined — for example, cases in the “Waiting for Customer Response” status for 5 days or more.

In the screenshot below, you can see open cases that have been in the “Waiting for Customer Response” status for a long time without any reply from the customer.

Salesforce Flows Auto-Close Support Cases

After the flow is triggered, you can see that all cases that were in “Waiting for Customer Response” status for more than 5 days have now been automatically closed.

This ensures that the case list only contains active cases, making it easier for service agents to focus on the issues that still need attention.

Close Waiting Cases Using Salesforce Flows

Conclusion

I hope you now have a clear idea of how to auto-close support cases using Salesforce Flows.
In this guide, we saw how to identify cases that have been waiting for a customer response for more than 5 days, and how to use a Scheduled Flow to close them automatically.

You may like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.