Happy Holidays!

The holidays are often a time of reflection and thankfulness. As I look back on 2014 at Bracket Labs, I continue to be tremendously thankful for our amazing customers, our growth, and most of all our team - our very awesome team. 

And especially for the hire of this guy:

Happy Holidays from all of us here at Bracket Labs, but especially from Darren Geary, full of cheer and the guy that makes us all laugh every day!

Automating TaskRay Template Project Creation With Visual Flow and Process Builder - Part 3

This is Part 3 of a series on using Visual Flow and Process Builder to automate the creation of fully populated TaskRay projects within Salesforce. Previously in Part 1 we installed the TaskRay clone flow plugin, and in Part 2 we covered the details of building a custom visual flow.

Process Builder

So, now we will use Salesforce’s new Process Builder set up our flow to run automatically when an opportunity becomes Closed Won.

In order to access this, go to Setup->”Processes” and click on New Process.

Name this process: “Create TaskRay Project on Opp Closed Won”

Add a description, something like: “This process will clone a TaskRay project template if an opportunity becomes Closed Won and has a TaskRay template specified.”

Click Save

You should now have something that looks like this:

process.builder.1.png

Click the gray Add Object node on the screen, set Object to “Opportunity”, and set the radio button below to “created or edited”

Now click Save.

Next, click on the Add Criteria diamond, name this criteria “isWon” and leave the radio buttons with their default values (don't change anything) and set the Field to “Won” equals true.

Finally, check the “Yes” checkbox that says you want to execute the actions only if the record was created or edited to meet criteria. You should have something that looks like:

Click Save.

Now we need to add an action when the process determines the opportunity isWon.

Click the Add an action under “Immediate actions”

Set the action name to “RunCloneFlow”

And Flow to “Clone_TaskRay_Template_From_Opportunity”,

Click “Add Row” and set the Flow Variable to opportunityId and the value to our opportunity’s Id. The method for doing this is a little tricky, you click on the pencil, then you see it changes to a lookup icon, now you can select the main dropdown and find OpportunityId in the list. At the end it should look like this:

Now we need to activate our new process by clicking the activate button at the top of the Process Builder ineterface.

Test everything

To test this, let’s associate an opportunity with a TaskRay template project and see what happens when we change it to close won. Here's a screencast of the action: 

http://screencast.com/t/6gENDh7pa

As you can see the TaskRay concurrency picks up the data inserted by the flow and we are able to see the associations the flow has made to the opportunity and account.

What are you going to build?

This was a simple example of how Visual Flow and Process Builder can be combined to create sophisticated automation in Salesforce without any custom code. And while our example uses a TaskRay Clone Flow plugin we've provided, that's specific to the TaskRay template use case. You can easily put these tools to work in automating Salesforce interactions without any plugins.  If you build something cool we'd love to hear about it, feel free to post descriptions in the comments.

 

Automating TaskRay Template Project Creation With Visual Flow and Process Builder - Part 2

This is Part 2 of a series on using Visual Flow and Process Builder to automate the creation of fully populated TaskRay projects within Salesforce. In this post we will cover the details of building a custom visual flow. You can find Part 1 here.

Create the trigger ready flow

For our example automation (templated TaskRay project created when an Opportunity is Closed Won) we will need to create a Visual Flow that can be used with Process Builder. This flow will take an input parameter of "opportunityId" and then utilize the Apex flow plugin we installed in Part 1 to clone a TaskRay project.

To start flow creation we will go to Setup -> Flows -> New Flow

Resource creation

The first thing we need to do is create some variables for our flow to use.

In order to create these variables, go to the "Resources" tab of the left sidebar of the flow designer, and double click "Variable" under the "CREATE NEW" section. You should get a popup that looks like this:

All of the variables for this flow will be "Text" type so we really just need to update the "Unique Name" and "Input/Output Type" for our variables. Create the variables detailed in the table below:

Unique NameInput/Output Type
opportunityIdInput Only
opportunityNamePrivate
templateProjectIdPrivate
accountIdPrivate
accountNamePrivate
newParentProjectIdPrivate

Now save your flow! Let's name it "Clone TaskRayTemplate From Opportunity"

Next we need to create some Formulas for our flow to use.

In order to create formulas, double click on the "Formulas" button under the Create New section of the left sidebar. It should present you with a dialog that looks like this:

All of our formulas are going to be of the text data type so all we need to do is populate the Unique Name field and populate the formula in the text area on the bottom of the dialog. We're going to create the three formulas detailed below.

newProjectName: Create a Formula with the Unique Name set to "newProjectName". We are going to use this formula field to figure out what our newly created project's name will be. For this implementation we are going to use a formula of:

"Customer Onboarding for: "+{!accountName}+" - "+{!opportunityName}

When you're done it should look like this:

 

taskFieldOverrideJSON: Create a Formula with the Unique Name set to "taskFieldOverrideJSON". The purpose of this formula is to map some TaskRay task field updates we would like to perform after our template clone has been created. For this implementation we are going to update the TaskRay Task fields Account__c and Opportunity__c with the values sourced from the opportunity we are passing in. To do this we are going to use a JSON string, if you are unfamiliar with JSON don't worry about it, it’s just an easy way for us to represent some key-value pairs. The formula for this field will be:

'{"Account__c":"'+{!accountId}+'","Opportunity__c":"'+{!opportunityId}+'"}'

projectFieldOverrideJSON: Create a Formula with the Unique Name set to "projectFieldOverrideJSON". This formula maps field updates we will apply to TaskRay project records after our template clone has been created . For this implementation we are going to update the project fields Account__c and Opportunity__c with the values sourced from the opportunity we are passing in. To do this we are going to use another JSON string.

'{"Account__c":"'+{!accountId}+'","Opportunity__c":"'+{!opportunityId}+'"}'

Now that we have done this initial setup it’s time to start doing some flow design! Also, you should probably hit Save!

Opportunity Record Lookup

In order to get some information about the Opportunity Id being passed, we need to add a “Record Lookup” from the left sidebar on the “Palette” tab. To do this, just drag the "Record Lookup" element from the sidebar into the main work area and drop it. 

Now you're presented with a dialog to complete, let's name this Record Lookup "OpportunityLookup". Now we have to complete the assignments section for this record lookup:

In the "Look up" field select Opportunity as the object, if you just start typing “Opp”, it will autocomplete.

Now under "Field" set the “Select field” to “Id”, the operator to “equals”, and the value to our input parameter,

Now scroll down to the variable assignment section, now we can fill up some of our other private variables..

In the field dropdown, assign:

field “AccountId” to the variable {!accountId}

field “TaskRay_Template_Project__c” to the variable {!templateProjectId}

field “Name”” to the variable {!opportunityName}

and check the “Assign null values to the variable(s) if no records are found”, because that just sounds like a good idea.

Finalize these settings by clicking "OK"

No Template Decision

Now we need to make a decision in our flow; if there is no Template assigned to the Opportunity, we need to stop the flow.

From the palette tab of the left sidebar, select a “Decision” (under the logic header), and drag it below Record Lookup and drop. Name this Decision: "Opp Template Assigned". Add an outcome called "Opportunity has template", and set the resource to {!templateProjectId}, operator “does not equal”, and leave the value field blank. Now click on the default outcome on the left and name that “No template” and click "OK".

Account Record Lookup

Now we need to populate some more variables from the account the opportunity belongs to.

Pull another Record Lookup from the left sidebar and put it under the decision you just made. Now name this one “AccountLookup”. Under filters and assignments, set the selected object to Account, set the field to “Id”, operator to “equals”, and “Value” to accountId.

Now assign the field “Name” to the variable {!accountName}, and check the assign null values to the variables if no records are found checkbox. At the end it should look like this:

TaskRay Clone Plugin

Now we need to pass all the data we have gathered to the Apex plugin we installed. This plugin is what is going to perform the template clone operation for us. To do this drag the "CloneProjectFlowPlugin" under the TaskRay header on the left sidebar of the flow pane below the last Record Lookup (named AccountLookup) in the center pane.

Name this plugin: Clone TaskRay Template

Under inputs, set templateProjectId’s source to {!templateProjectId}

Now we need to add some optional parameters by clicking Add Row:

Set newProjectName to the {!newProjectName} formula

Set projectFieldOverridesJSON to the {!projectFieldOverrideJSON} formula

Set taskFieldOverridesJSON to the {!taskFieldOverrideJSON} formula

 

Under outputs:

Set newParentProjectId to the {!newParentProjectId} variable

The dialog should now look like this:

Now click "OK", and you should probably click Save on your flow designer, ignore the warnings for now.

Wiring the flow

That was a lot of work. Now we have all four components created and we just have to wire them up.

Click and drag the little diamond on the bottom of the Opportunity Record Lookup box in the center pane to the diamond on the bottom of the Decision box right below it.

Now click and drag the diamond on the Decision box to the Account Record Lookup's diamond, and when prompted set “Opportunity has template” as the decision outcome for this line.

Now drag the AccountLookup diamond to the CloneProjectFlowPlugin diamond.

Finally,  set the start item of the flow by hovering over the OpportunityLookup header and clicking the downward facing arrow with a green background.

Hit save, Close, then activate the flow.

Testing the flow

We can test our flow to make sure what we want to happen occurs manually. To do this, let’s populate our TaskRay_Template_Project__c field on a sample opportunity record. I am going to associate a template called “Template: Customer Onboarding” to an Opportunity named “Test Opportunity”.

testopp.template.association.png

Note that our “Test Opportunity” has an ID of: 006e0000007yoa3 - we'll need this to test our flow.

To execute the flow manually we’re going to navigate back to our newly created flow, and click the run button. This should take us to a URL similar to: /flow/Clone_TaskRay_Template_From_Opportunity/301e00000004bI0AAI

We will need to pass in our Opportunity's ID (called opportunityId) to get our flow to execute. To do this simply delete the end of the resulting flow url so it looks like

/flow/Clone_TaskRay_Template_From_Opportunity?opportunityId=006e0000007yoa3

Once this loads, you should see “YOUR FLOW FINISHED”. If you get some kind of exception, you can view the exceptions by opening the developer console and viewing the debug logs for the flow transaction.

Now we should be able to see what happened in TaskRay:

We can also check to make sure that our field updates processed as intended:

A quick way to verify this is to go look at the related lists on the Opportunity. Since we have lookups back to Opportunity on all of our TaskRay tasks and projects, a successful execution of our flow will result in TaskRay Projects and Tasks being displayed in related lists on our “Test Opportunity”. See the screenshot's TaskRay Projects and TaskRay Tasks related lists.

Halfway there

After all of that we’ve done pretty much all the hard work. We have a Flow that will take an OpportunityId as input, decide if it needs to clone a TaskRay project, then clones a project template we have specified on the Opportunity.

Now all we need to do is get this flow to run automatically when an opportunity becomes close won. That's Part 3.

Automating TaskRay Template Project Creation With Visual Flow and Process Builder - Part 1

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.

Squeezing in one more TaskRay release for 2014!

blog.png

New Features!

At Bracket Labs we love release day and today is no exception. With the end of the year quickly approaching, we are exciting to pack in one more hearty release before 2015. Take a look at some of the new features we have available for you:

Checklist Improvements

Checklists are now drag and drop sortable! This means you can order and re-order those checklists - and even keep that order for repeating tasks or cloned templates.

Record Types

Record Types are a Salesforce feature that allow you to run multiple processes within an object. In TaskRay you can use task record types to display different sets of columns per task type, or track different fields per task type.

Important! Record Types are an optional feature. It does add complexity to the user experience and should only be considered for organizations requiring multiple processes or multiple page layouts per task type.

Completed Status

We have added a new Completed checkbox that will automatically populate to 'checked' when moving a task to the last column. We found so many of you were handling this with a workflow that we thought it might make it easier if we built it straight into the product. The Completed checkbox is great as simple criterion when creating list views as well as reports and dashboards. It is also smart enough to know which column is "Completed" if you are using Record Types with different columns per different task types.

completed.png

Fun Usability Features

Here are just a few more frequent user requests we packed in:

  • Double-click any task card to open!
  • Clear All dates available when cloning project hierarchies
  • One-click to Chatter feed from task card (even when no Chatter currently exists)

RELEASE SCHEDULE

This release will be available on the following dates:

  • Tuesday, December 9: Available on AppExchange
  • Tuesday, December 9: Direct Install Link available
  • Saturday, December 27: Automatic upgrade to Sandbox
  • Saturday, January 17: Automatic upgrade to Production

Here are additional highlights of enhancements we are delivering in this release. For a full list of features and bug fixes, check out our release notes page.

  • Record Types: Record types supported on TaskRay Task & Project objects, including multiple column support and customizable detail pages.
  • Task Detail: Edits pending confirmation added to the new task and edit detail.
  • Task Detail: Now possible to double-click task card to open.
  • Checklists: Now includes drag and drop sorting.
  • Checklists: Included in clone & repeating tasks.
  • Completed: New Completed checkbox, automatically populated when moving task to last column (or last column in record type).
  • Limit Change: Increased time out limit on Share to All Internal Users (public/private project).
  • Repeating Tasks: Topics persist on repeating tasks.
  • Chatter: Added ability to one-click to Chatter feed from task card even if no Chatter currently exists.
  • URL Parameter: New parameter to hide the Salesforce header.
  • Project Clone: Clear All options for Start and End Dates in Project Clone.

UPCOMING WEBINARS

TaskRay Veteran?

Join us for our deep-dive webinar to see the latest features.

Date: Wednesday, January 7th  Time: 9 am PT / 12 pm ET / 5 pm GMT   REGISTER HERE
Date: Wednesday, January 21st  Time: 3 pm PT / 6 pm ET / 11 pm GMT  REGISTER HERE

New to TaskRay?

Join us for our overview webinar to see an introduction to TaskRay.

Date: Thursday, January 8th  Time: 3 pm PT / 6 pm ET / 11 pm GMT   REGISTER HERE
Date: Thursday, January 22nd  Time: 9 am PT / 12 pm ET / 5 pm GMT   REGISTER HERE