Automatically Archive Tasks Using Flow

This feature is available on the following TaskRay Product Editions

  • Starter
  • Standard
  • Premium

As you complete your work in TaskRay, the list of finished tasks can fill up quickly, especially if you are working on multiple projects at once. Archiving tasks could help in cases when you need to remove unnecessary tasks from the TaskRay interface. Archived tasks remain as records in Salesforce, allowing you to reference and report on them. 

TaskRay Pro Tip | Archiving Projects
When it comes to archiving, consider archiving projects rather than individual tasks. When a project is archived, all of its tasks are archived as well. Most commonly, projects are archived after they are completed to keep the TaskRay app views focused on active work. For more information, see Archive Projects and Automatically Archive Projects Using Flow articles.

When it comes to archiving, it is possible to manually archive tasks. With that said, this process is often automated. This article will walk through a sample use case for auto-archiving tasks once they are moved to the Finished status list.

Here is a summary of what will be covered in this article:

 

Sample Use Case and Configuration Overview

Goal

Automatically archive tasks when they are updated to the Finished status list.

 

Use Case Details

  • As tasks are updated to the Finished status list, that list will grow.
    • The TaskRay Task object has a List field. Out of the box, this field includes a Finished value. Out of the box, this value is used to denote the completion of work on the task.
      Note | Custom Task Status Lists 
      It is possible that your organization has customized the List field on the TaskRay Task object to incorporate custom values. If that is the case, you can use custom value(s) instead of the Finished value referenced throughout this document.
  • To ensure that the TaskRay views do not get cluttered with previously completed work, tasks can be archived to be filtered out from the app.
    • The TaskRay Task object has an Archived field (checkbox). The automation will update that field to 'true' to archive the tasks. 
      Tip | Automation Variations
      In this article, we will walk through the automation to archive tasks immediately once they are placed in the Finished list. If necessary, this can be adjusted to archive tasks at a delay (e.g. 1 week after) by incorporating a scheduled path to the flow.

 

Flow Configuration [Admin]

Flow Overview

Below is a sample configuration of the Flow: 

Screen_Shot_2022-12-15_at_5.17.26_PM.png

Follow the steps in the sections below to configure the Flow.

 

Step 1: Create New Flow

  1. From Setup, navigate to Process Automation | Flows.
  2. Click on the New Flow button.
  3. In the New Flow modal, select the Record-Triggered Flow option.
  4. Click on Create.

 

Step 2: Configure Start and Entry Conditions

When setting up a new record-triggered flow, it is necessary to specify the object and criteria that will trigger the automated process. In this case, we will select the TaskRay Task object because our automation should be triggered when the task's List value is updated to Finished.

  1. In the Configure Start modal, click into the Object field and search for TaskRay Task.
  2. For Trigger the Flow When select A record is updated.
  3. In the Set Entry Conditions section, for Condition Requirements select All Conditions Are Met (AND).
  4. For the condition, set the following:
    • Field = TASKRAY__List__c (List)
    • Operator = Equals
    • Value = Finished
  5. For When to Run the Flow For Updated Records, select Only when a record is updated to meet the condition requirements.
  6. For Optimize the Flow for, select Fast Field Updates.
  7. Leave the remaining options as-is and click Done.

Screen_Shot_2022-12-15_at_5.07.27_PM.png

 

Step 3: Add Element to Update Task

Next, you will need to add an element to update the Finished task as archived. In this case, the update is to set the Archived checkbox on the task to true.

  1. On the Flow canvas, click on the Plus / Add Element icon below the Start element.
  2. Select the Update Records element.
  3. In the new Update Records modal, enter the Label (e.g. "Archive Task") and API Name.
  4. Under How to Find Records to Update and Set Their Values, select Use the taskray task record that triggered the flow.
  5. Under Set Filter Conditions, for Condition Requirements to Update Record, keep the None--Always Update Record option.
  6. Under Set Field Values for the TaskRay Project Record, set the following:
    • Field = TASKRAY__Archived__c (Archived)
    • Value = {!$GlobalConstant.True} (true)
  7. Click Done.

Screen_Shot_2022-12-15_at_5.14.44_PM.png

 

Step 4: Save and Activate the Flow

Now that the Flow is fully configured, it is time to save and activate it.

  1. In the top right corner of the Flow canvas, click on the Save button.
  2. In the Save the Flow modal, enter the Label (e.g. "Archive Finished Tasks") and API Name.
  3. Click Save.
  4. In the top right corner of the Flow canvas, click on the Activate button.

 

Flow Testing

As a best practice, it is always a good idea to test custom automations to make sure that they meet requirements and follow expected behavior. Custom automations can be tested using the Debug options in Flow or in the app, using sample test records. 

To test this automation, you can update a task to have List = Finished. 

 

Was this article helpful?

4 out of 4 found this helpful

Have more questions? Submit a request