Automatically Clone Individual Tasks Using Flow

This feature is available on the following TaskRay Product Editions

  • Starter
  • Standard
  • Premium

TaskRay offers many different options to streamline and manage repeatable processes. When it comes to customer onboarding, it is common for organizations to set up templates outlining the entire process. These templates are then cloned to create onboarding projects for every new customer as needed. For more information on templates and cloning, see the following articles: Intro to Templates and Clone Templates.

The template approach is great for streamlining the overall onboarding process. However, there could be instances where you might need to account for some one-off activities. Throughout this article, we will follow a sample use case that incorporates cloning a single task and adding the copy to an existing onboarding project for a customer.

As you go through these instructions, keep in mind that there are many other possibilities for customizing the process and you can modify the setup to suit the specific needs of your organization. 

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

Important! The instructions in this article outline the configuration that assumes that Template Versioning is enabled. With template versioning enabled, it becomes possible to utilize Addressable IDs when setting up the automation (more details on this further in the article). Enabling template versioning is recommended for all orgs.

 

Sample Use Case and Configuration Overview

The sample use case that we will be following throughout this article incorporates cloning an individual TaskRay Task and adding it to an in-flight onboarding project for a customer. In the sample use case, the task will be cloned and added to the onboarding project in the event that the customer's implementation requires advanced assistance. 

Details below.

 

Sample Use Case and Goal

Goal

Clone a template task and add it to the customer's onboarding project whenever the customer's implementation requires advanced assistance.

 

Use Case Details

  • TaskRay Project has a custom checkbox Advanced Implementation, which is checked if the customer requires advanced technical assistance.
  • When the checkbox is checked, that triggers an automation to clone a template TaskRay Task and add its copy to the customer's onboarding project. The task contains additional details for providing advanced technical assistance to the customer.

 

Sample Template Configuration

  • For the purpose of this automation, we will need a template task.
  • The template task will have the following preconfigured/filled out:
    • Some parameters pre-set, such as: Priority = HighTask Owner = Technical Architect (queue), Description filled out, etc.
    • Checklist containing some specific action items to execute as part of the task.
  • For reference: Intro to Templates.

 

Automation Overview

  • The automation is set up using Flow. The Flow is triggered when the Advanced Implementation checkbox on the TaskRay Project is set to true.
  • As the final action of the flow, the Clone a TaskRay Task Apex action is leveraged to create and add a new task to the identified project.

 

Template Configuration

The first step of the process is to set up the necessary template in the TaskRay Template Hub. You can learn more about creating templates here

 

Set Up the Template

For the purpose of the use case outlined in this article, we will only need a single template task. In TaskRay, a task is considered to be a template task if it is created as part of a template project.

For the purpose of this configuration, the template task should include details that should carry over when the task is cloned and added to the new project. Below is a sample template task configuration:

  • Task Name: Advanced Implementation
  • Priority: High
  • Owner: Technical Architect (Role) 
    Tip: In TaskRay, Roles are used for placeholder assignments. In this example, the Advanced Implementation task is planned to be executed by a Technical Architect, but the specific person could vary depending on the onboarding project. As such, the Technical Architect Role is used as a placeholder for assignment on the template task. Then, when the task is cloned and added to the project, the task can be assigned to an actual user, as needed.
  • The template task includes a checklist. The checklist outlines some items that need to be executed on the task when it is added to the project.

a0342dbf-3f80-4c88-8aed-559b2868da5b.jpeg

 

Get Template Task Addressable ID

Now that the template task is set up, you will need to get its Addressable ID. This ID will be used to configure the Flow later in the article. 

Note: This step assumes that Template Versioning is enabled. This is the recommended approach. If you do not have Template Versioning enabled, you will not be able to get Addressable IDs for the templates. Instead, you can use Salesforce record IDs from the templates (not recommended).

The TaskRay Task object has a field labeled Addressable ID. To get the template task's Addressable ID, you can generate a report and surface the Addressable ID field.

 

Flow Configuration [Admin]

Now that the template task is set up, we are ready to configure the Flow. The Flow will be triggered from the TaskRay Project object when the Advanced Implementation checkbox is selected.

 

Flow Overview

Below is a sample configuration of the Flow:

2024-12-17_18-05-03.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 Project object because the automation should be triggered when the Advanced Implementation checkbox is selected on a TaskRay Project record.

  1. In the Configure Start modal, click into the Object field and search for TaskRay Project.
  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:
    1. Field = Advanced_Implementation__c (Advanced Implementation)
    2. Operator = Equals
    3. Value = True
  5. For When to Run the Flow For Updated Records, select Only when a record is updated to meet the condition requirements.
  6. Leave the remaining options as-is and click Done.

Screen_Shot_2022-12-19_at_7.10.19_PM.png

 

 

Step 3: Configure the Clone a TaskRay Task Apex Action

As the final part of the Flow, we will configure the Apex action that will be responsible for cloning the template task.

Note: The inputs below can be adjusted as needed. For example, it is possible to schedule the task based on its end date, update the task's name, reassign it, as well as reference different fields for this purpose. With that said, some parameters are required, such as the Template Task Addressable Id parameter. Adjust these parameters as needed. 
  1. On the Flow canvas, click on the Plus / Add Element icon below the Get Records element.
  2. Select the Action option.
  3. In the New Action modal, in the Action field, search for Clone a TaskRay Task.
  4. Enter a Label (e.g. "Clone a TaskRay Task") and API Name.
  5. Under Set Input Values, click into the Project for task field and enter {!$Record.Id} (clickpath: Triggering TASKRAY__Project__c > Record ID).
  6. For the Source Object Id field, enter {!$Record.Id} (clickpath: Triggering TASKRAY__Project__c > Record ID).
  7. For Starting Date of Task, enter {!$Flow.CurrentDate} (clickpath: $Flow > CurrentDate) (this will use the current date for scheduling the task).
  8. For Template Task Addressable Id, enter the Addressable ID of the template task that you saved previously (in the Get Template Task Addressable ID section).
  9. Click Done.

2024-12-17_18-04-20.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. "Clone a TaskRay Task") 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, using sample test records.

For the purpose of testing, you can use a TaskRay Project record and update the Advanced Implementation checkbox field on it to true. The successful outcome will clone and create a new TaskRay Task in the project.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request