27 thoughts on “Auto Follow Records Based on Criteria

  1. Hi Rakesh,

    I want to know if this will work for my use case:

    How to automatically “Follow” in Chatter for all My Owned Opportunities where the campaign source is let’s say ‘Field Connect’.

    User wants to automatically follow the record which has been assigned to user.

    Please advise

  2. Hi Rakesh,
    So every time user changes amount on the opportunity Object, the flow will fire which will check if the amount on the preference object is greater than the ,amount on the Opportunity object. if it is then ensure that user follows the opp record….

    What will happen if the amount on the opportunity object changes few times then the flow will try to subscribe same user to the opp record couple of times which should throw an error…..Am I correct or missing something here?

  3. Hi Rakesh,

    If we have multiple users in the picklist on the opportunity object and once the admin selects multiple users for the opp object,then those users will me made to follow a particular opp record…Is there a way to loop through all user names?….Problem is that multiple usernames are stored together separated by a semi colon in a variable……How do i separate them so that i can query user object using user names?

    looking to do through After save record trigger

    Any suggestions?

  4. Hi Rakesh,

    Nice post on flow for auto following the record.

    I have a use case wherein the user should auto follow a record when the user name is updated in the field and the user names are maintained in multi pick-list field , so when an admin select the user/s on the record those users should auto follow the record.

    Could you please let me know how can this be achieved??

    We don’t need a custom object for this.

    Thanks,
    Harsha

    1. You don’t need to ma a new custom object for this purpose. Here are my suggestions:

      1. Store newly select username in a Variable
      2. Then find the USerID using Record Lookup element
      3. Use Record Create element to create a new follower

  5. I tried this but it isn’t working for me. I want a user called Sales RD to follow cases for their accounts. Note they are not the account owners but the user lookup field is on the account. I also could not start the flow with workflow rule but had to add a process builder.

    1. First, you’re right. Use Process Builder instead of Workflow Rule.
      Second, make sure that you have setup it correctly. Did you get any error?

  6. If you wanted to auto create a subscription based on Account Team member to follow Account, could you do that all in Process Builder? New Account Team member = new subscription? I’m following your steps, but it doesn’t appear to be working. I am trying to customize it for any Account Team member auto follow. Any thoughts where this would change for this scenario?

  7. Hi Rakesh,

    My Business case is: Opp Owner Manager, Manager’s Manager and VP (third in the role hierarchy) auto Follow the Opp record based on:
    Amount>100k, Forecast Cat = Commit and Closed Date = This Quarter.

    I’m not sure why I need to create the custom Object “Opp Follow”? Should I create custom lookups to the Opp for each condition?

    Isn’t a way to create a PB on the Opp Object to define the criteria and autolaunch the Flow?
    Can you advise how the Flow will look like in this solution? (considering I can map the OppID and the ManagerID Variables from the PB)

    The Flow only needs to check if the Manager already Follows the Opp record and if not then to create an Entity Subscription ID. If the Manager does Follows the Opp then to do nothing.

    Any help? 🙂

    1. You should with the help of Flow and Process Builder.

      1. You are right, define the criteria on Opportunity object Process Builder
      2. Use Flow to find “pp Owner Manager, Manager’s Manager and VP”
      3. Use Flow to Auto follow
  8. Just wondering why this entire thing cant be done in Process Builder. It looks like it needs a combo of Process Builder and Flow. What is it about the Flow that cant be done in Process Builder?

    1. You are right here, we have to use both Flow and Process Builder. We can’t implement it using Process builder, because it doesn’t allow us to store record id….For example store the record ID

  9. Hi Rakesh,

    I am on step 4. When I type {!Amount} or {!OwnerID}, it says “The merge field does not exist” so I can’t carry on…can you please help me?

  10. Hi Rakesh,
    I am walking through this tutorial and when I get to step 4, the “Ids” sobject collection variable (of type EntitySubscription, Input/output type: Input & Output) is not selectable in the variable list. If i change it to “opportunity type”, it shows up. But based on your step 3 graphic, it looks like “singleid” and “id” supposed to be EntitySubscription type…. can you please clarify description of step 3 variables? thanks very much for the tutorial.

    1. From step 6 (i.e. workflow Rule2) you have to migrate it to Process Builder, follow the below steps for more details
      1) Navigate to Setup | Build | Create | Workflow & Approvals | Process Builder and click on the New button to create new Process
      2) Enter the Process Name, Description and API Name, Once done click on Save button as shown in the following screenshot
      https://rakeshistom.files.wordpress.com/2015/02/create-new-process.png
      3) Now Click on Object then Select the Opp Follow Object and Evaluation Criteria for Process, as shown in the following screenshot
      https://rakeshistom.files.wordpress.com/2015/02/create-new-process1.png
      Once done click on Save button
      4) Next step is to add Process Criteria, To do that Click on Add Criteria, Please refer to the following screenshot for more details
      https://rakeshistom.files.wordpress.com/2015/02/add-proces-criteria.png
      Once done click on Save button.
      5) Next task is to add one Immediate Actions, i.e. Launch a Flow, Please refer to the following screenshot for more details
      https://rakeshistom.files.wordpress.com/2015/02/add-immediate-action.png
      Once done click on Save button.
      6) Final Step is to add one field update Immediate action, We will use update a record action in the Process, Please refer to the following screenshot for more details
      https://rakeshistom.files.wordpress.com/2015/02/update-start-field-to-false.png
      Once done click on Save button.
      7) Finally your Process will look like the following screenshot
      https://rakeshistom.files.wordpress.com/2015/02/prcoes.png
      8) Activate the Process. After you activate a process, you can no longer edit that process

  11. Hi Rakesh, i wanna create an rule that a manager will automatically follow all opportunity that have by their team role.
    I have been follow all step as your direction,
    and at last step i dont found flow trigger in workflow immediate action, any solution to do that?
    Thanks

    1. Flow trigger is under Pilot program, You can ask your Account Executive to get in touch with Salesforce.com support to enable it your org. Else you can use Process Builder for fire/call the Flow.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.