- Starter
- Standard
- Premium
As you work on projects, the list of completed projects will continuously keep growing over time. The more projects get completed, the longer the list will grow. To make sure you and your team effectively can focus on open tasks and manage assigned work, it is recommended to archive such projects. Not only will this reduce clutter, it will allow the team to easily locate active/open work.
When projects are archived, they are filtered out from the TaskRay application, but they do remain in Salesforce. Archived projects can still be reported on and viewed in the standard Salesforce interface. Additionally, if it is needed, archived projects can be viewed under the Archived Projects filter in the TaskRay app.
While it is possible to archive projects manually, the process is often automated. In this article, we will use a sample use case where the automation is set up to archive projects 1 week after they have been completed.
Here is a summary of what will be covered in this article:
Sample Use Case and Configuration Overview
Goal
Automatically archive projects 1 week after they have been completed.
Use Case Details
- By completing tasks within a project, the project eventually reaches completion.
- As tasks are getting completed, the project's Progress field is updated to reflect completion, eventually reaching 100%.
- Along with the Progress field, the project also has a Completed checkbox. By design, the two fields operate independently. See the following article on how to mark projects as complete: Complete Projects.
- In this article, we will use the Completed checkbox as a trigger to kick off the automation.
- When a project is marked as complete (Completed = 'true'), that also automatically populates the Actual Completion Date field on the project.
- In this article, we will use the Actual Completion Date as a reference to auto-archive the project. More specifically, the automation will be set up to auto-archive the project 1 week after the date that is set in the Actual Completion Date field.
Tip: In our use case, we are intentionally adding a 1-week delay to archive the project The purpose of the delay is to account for situations where the project might need to be reopened, updated, or referenced in TaskRay for a few days after it's been marked as complete. With that said, it is possible to adjust this requirement as needed (e.g. make the delay longer or archive the project immediately).
- In this article, we will use the Actual Completion Date as a reference to auto-archive the project. More specifically, the automation will be set up to auto-archive the project 1 week after the date that is set in the Actual Completion Date field.
- When a project is completed, that triggers the automation to also archive it 7 days after the actual completion date.
- The TaskRay Project object has an Archived field (checkbox). The automation will update that field to 'true' to archive the project.
Flow Configuration [Admin]
Flow Overview
Below is a sample configuration of the Flow:
Follow the steps in the sections below to configure the Flow.
Step 1: Create New Flow
- From Setup, navigate to Process Automation | Flows.
- Click on the New Flow button.
- In the New Flow modal, select the Record-Triggered Flow option.
- 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 Project object because our automation should be triggered when the Completed checkbox is updated on the project.
- In the Configure Start modal, click into the Object field and search for TaskRay Project.
- For Trigger the Flow When select A record is updated.
- In the Set Entry Conditions section, for Condition Requirements select All Conditions Are Met (AND).
- For the condition, set the following:
- Field = TASKRAY__trCompleted__c (Completed)
- Operator = Equals
- Value = {!$GlobalConstant.True}
- For When to Run the Flow For Updated Records, select Only when a record is updated to meet the condition requirements.
- Leave the remaining options as-is and click Done.
Step 3: Add a Scheduled Path to the Start Element
Since we are setting up an automation that auto-archives projects 1 week after they are marked as complete, we will need to add a scheduled path.
- From the Flow canvas, click on the Start element and click on the option to + Add Scheduled Paths (Optional).
- In the Configure Scheduled Paths modal, enter Path Label (e.g. "Archive 1 Week After Project Completed") and API Name.
- For Time Source, click into the field and select TaskRay__Project__c: Actual Completion Date.
- For Offset Number, enter 7.
- For Offset Options, select Days After.
- Click Done.
Step 4: Add Element to Update Project
As the final piece of the Flow, you will need to add an element to update the project to be archived. In this case, the update is to set the Archived checkbox on the project to 'true'.
- On the Flow canvas, click on the Plus / Add Element icon below the Archive 1 Week After scheduled path.
- Select the Update Records element.
- In the new Update Records modal, enter the Label (e.g. "Archive Project") and API Name.
- Under How to Find Records to Update and Set Their Values, select Use the taskray project record that triggered the flow.
- Under Set Filter Conditions, for Condition Requirements to Update Record, keep the None--Always Update Record option.
- Under Set Field Values for the TaskRay Project Record, set the following:
- Field = TASKRAY__Status__c (Archived)
- Value = {!$GlobalConstant.True} (true)
- Click Done.
Step 5: Save and Activate the Flow
Now that the Flow is fully configured, it is time to save and activate it.
- In the top right corner of the Flow canvas, click on the Save button.
- In the Save the Flow modal, enter the Label (e.g. "Archive Project 1 Week After Completion") and API Name.
- Click Save.
- 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 project to have Completed = 'true'.