Is there a way to create a report that groups by activity subtype? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Elijah WindellElijah Windell 

Is there a way to create a report that groups by activity subtype?

I have already created a workflow rule that pulls the TASK type field and the EVENT type field and puts the data into a new custom field under Activity.  My new challenge is to remove the type picklist from the layout.  Once the type field isnt being filled in my report is back to square one.  My real question is.....

1. Is there a field that is auto populated when people log a call or task or event. 
2. If a field does exist, is there a way to write a formula or a workflow rule to capture that fields data and put it in a custom field under activity so I can run my report again.

Thanks!
Best Answer chosen by Elijah Windell
Elijah WindellElijah Windell
I found the solution!

First, I created a custom field under the Activity Object.
Then, I used process builder to build out two different processes.  The first was built around the task activity subtype and the criteria was that the "task subtype" field was populated.  The immediate action was whenever the "task subtype" field was filled with call then the copy that data into my custom field under Activity object.  An additional immediate action was if the "task subtype" field was filled with task then copy that data into my custom field under Activity object.  The second process was built around the event activity subtype and was the same as the first.  Criteria is the "event subtype" field wasn't empty and the immediate action was when the "event subtype" was filled with event it populates my custom field under the Activity object with the data in the "event subtype" field.

Once I activated the two processes I was able to build a report and group that report by salesman and my new custom field.  The result is a report that shows activity subtypes by salesman.  So, instead of seeing a report that says john doe has had 8 activities you see one that says john doe has 4 calls, 3 tasks and 1 event.

 

All Answers

adam marksadam marks
There is no field that is autopopulated out of the box. Well, that's not entirely true. Subject is populated with "Call" if you use the standard Log a Call Action. 

Now we could use that same concept, prefilling fields in an Action, to help you accomplish what you are trying to do. As an example if you had multiple Task types such as "Call" or "In Person Meeting" you could have Actions that create these Tasks with the appopriate Type prefilled. Your user would see the Actions on a page layout and simply choose the one that meets their needs. 
Elijah WindellElijah Windell
Adam,
First of all, thank you for the quick response.  I have thought about using subject as my "criteria field"  but unfortunately the way my org is set up the subject line is editable for my users and there is no way to gaurantee that they all use the same vernacular.  Creating a new action that populates is an interesteing idea that I may be able to implement a little further down the road but for now my goal is keep the UI the same as it is until my users adjust to using SF.  

I noticed a field called "Task Subtype" that I think is being populated like I want and i tried to use it in a workflow rule instead of the "Type" field but I was not able to find it when writing the formula.  Do you happen to know why it does not exist as an option in workflow rules?  
adam marksadam marks
I have no idea why that field is not available, but I can't see it in Workflow or Process Builder. Strange. You could just create a custom Task SubType field and then you would see it. 
Elijah WindellElijah Windell
I dont know how that field is being populated so if I were to create a custom field I don't know what I would need to do to make it work if that makes sense.
Elijah WindellElijah Windell
I found the solution!

First, I created a custom field under the Activity Object.
Then, I used process builder to build out two different processes.  The first was built around the task activity subtype and the criteria was that the "task subtype" field was populated.  The immediate action was whenever the "task subtype" field was filled with call then the copy that data into my custom field under Activity object.  An additional immediate action was if the "task subtype" field was filled with task then copy that data into my custom field under Activity object.  The second process was built around the event activity subtype and was the same as the first.  Criteria is the "event subtype" field wasn't empty and the immediate action was when the "event subtype" was filled with event it populates my custom field under the Activity object with the data in the "event subtype" field.

Once I activated the two processes I was able to build a report and group that report by salesman and my new custom field.  The result is a report that shows activity subtypes by salesman.  So, instead of seeing a report that says john doe has had 8 activities you see one that says john doe has 4 calls, 3 tasks and 1 event.

 
This was selected as the best answer
Stephanie BoggsStephanie Boggs
Upvote this idea - Make TaskSubType editable - https://success.salesforce.com/ideaView?id=0873A000000COq5QAG
Hugo WortelHugo Wortel
Hi!

Elijah, after creating the criteria that the Task Subtype should be populated, how do you populate your custom Activity field? I can't see how to 'add an immediate' action to an Activity field. The Activity object doesn't seem to be available in any of the options I try.

Thanks!
Neetu DhussaNeetu Dhussa
Hello Elijah, Could you please explain how did you Use process builder to add immidiate action? Thanks