In this series of posts we're going to explore the creation of a fully populated TaskRay project when other conditions within Salesforce are met. For this example we'll use the condition of an Opportunity entering Closed Won status, but the condition could really be anything tracked as Salesforce field data. Automating the creation of projects and tasks based on Opportunity status is a common usage scenario with TaskRay customers who are managing fulfillment, onboarding, or customer success processes after a deal is closed.
In the past, automating the creation of projects and tasks required custom Apex development to develop triggers. With the recent introduction of Process Builder, we can now utilize Visual Flow in a much more automated fashion than was previously possible. This allows us to avoid writing and deploying any Apex code.
To build this customization we need to complete a few steps, each of which will be its own blog post:
Part 1: Install the TaskRay Project Clone Flow plugin. This is an unmanaged package that allows you to customize as needed.
Part 2: Create a custom flow that will use the plugin and determine what template will be cloned.
Part 3: Create a Process which will fire the custom flow when an opportunity moves to Closed Won status.
In the first part of this series we will cover the plugin installation and adding some custom fields in TaskRay that will be used in the automation.
Flow plugin installation
The TaskRay Project Clone Flow plugin is an unmanaged package. You will need to install this package to your Salesforce org from this link: https://login.salesforce.com/packaging/installPackage.apexp?p0=04tj0000001X4dU
The source for this package can be found at: https://github.com/BracketLabs/trflowplugin
Custom field creation
For this particular automation example, we will use a few custom lookup fields between our TaskRay and Opportunity objects. This will enable us to use automatically generated Related Lists on our records as well as TaskRay Task Card labels. If you're unfamiliar with adding custom fields to Salesforce and TaskRay, here's a short article on the topic: https://taskray.uservoice.com/knowledgebase/articles/216461-best-practice-adding-custom-fields-to-project-t
For the TaskRay Project object:
Add a custom field named Account which is a lookup to the Account Object
Add a custom field named Opportunity which is a lookup to the Opportunity Object
For the TaskRay Task object:
Add a field named Account which is a lookup to the Account Object
Add a field named Opportunity which is a lookup to the Opportunity Object
For the Opportunity object:
Add a field Named TaskRay Template Project (API Name: TaskRay_Template_Project) which is a lookup to the TASKRAY__Project__c Object.
With this customization complete we're ready to move onto Part 2, creating a custom visual flow.