Pragmatic Solutions while we wait on Salesforce Ideas

We love Salesforce and love the flexibility it gives us. There are times where functionality isn’t quite released yet. So this page contains a list of tools you can use until the functionality is released. They are all designed for admins to be fired from process builder.

We operated on the following principles:

  • Avoid replicating standard functionality
  • Build everything declaratively is possible (then anyone can understand and tailor it)
  • Avoid Apex – it is slow to develop on, harder to change, hard to delete and requires testing.
  • Use process builder and not triggers
  • Easily removable – we don’t want to install multiple features at once as we are planning for Salesforce to remove the need for workarounds with standard features.
Process_Builder_v637dz

Launch with Process Builder

Add Opportunity Contact Roles

A flow that checks if an opportunity contact already exists before adding one. Inputs: Contact ID and Opportunity ID. Unmanaged Package Idea to upvote

Add/update Campaign Members

Checks where a campaign member exists and then adds one. If you add straight from process builder you will get a flow error on duplicates. You can optionally choose to overwrite the status by entering a status and marking ‘OverrideStatus’ as true

Install Link. Idea to upvote

Delete Anything

Not supported by us as you can do it in flows and it’s a rare business case. There is this github package that can do it for you though: https://github.com/mshanemc/processBuilderBlocks 

Idea to upvote.

Auto Convert leads

Convert Leads into Accounts, Contacts, and (optional) Opportunities on-demand according to your criteria. This solution includes one apex class and its unit test. See instructions in stall link for setting this up with Process Builder or Flow to automate your lead conversion needs.

Install Link. Idea to upvote.

Credit: Doug Ayers

Convert Contact to Person Account

Made with in process builder to work on professional edition. For lot’s of our client’s, it’s an all or nothing switch to person accounts. Data gets messy when you have contacts and person accounts in the same org. Unfortunatly, at present you cannot create a person account from a contact lookup, only contacts. So this tool in the background converts the contacts to a person account.

You will need to create a process builder to trigger this flow. Make the criteria a contact with no account. Launch this flow as the immediate action. Enter the record types and names. Mailing addresses are copied to billing and shipping.

Install Link. Idea to upvote.

Campaign Activator

Campaigns need to be active to work in Salesforce lookups. This simple process build will activate the campaign on the start date and deactivate the campaign a day after the end date.

Install Link. Idea to upvote .

Better Chatter Posts

We cannot post to related records in process builder. Use this flow to specify the record, message and anybody you want to mention (only one user).

Install Link. Idea to upvote.

 

If you need more advance features like rich text chatter posts or choosing the post is posted by see: https://github.com/DouglasCAyers/salesforce-chatter-bot-feeds

NPSP Process BuilderTools

Add/Update Relationships

You can create relationships with process builder. But, if the relationship already exists it will create a duplicate. Use this flow to check for an existing relationship and then only create a new one if the contacts are not already linked.

Install Link. Idea to upvote.

Add/Update Affiliations

You can create Affiliations with process builder. But, if the Affiliations already exists it will create a duplicate. Use this flow to check for existing affiliations and then only create a new one if the contact and accounts are not already linked.

Install Link. Idea to upvote.

Applications and Triggers

Rollup Anything (Declarative Rollups for Lookups)

A comprehensive and must use tool! Perform rollups on schedules or in real time from any lookup. It’s free and better than roll up helper or the built in roll-ups (which have major limitations)

Install Link. Idea to upvote.

Credit: Andy Fawcett

Declarative Scheduler (and add campaign members automatically)

Run monthly, daily, hourly schedules the declarative way. This tool utilises Salesforce’s report engine to select the records and fields you want to update. Then this tool changes a datetime field to trigger a process builder

Instructions. Idea to upvote.

Opportunity Primary Contact Role Trigger

So we can’t do anything with opportunity contact roles as they are a second class object. No triggers or process builders. So when a contact is added as the primary role we want to have access to that contact on the opportunity. To install: create a field called Primary_Contact__c on the opportunity. Now whenever, you edit the opportunity and there is no primary contact then this trigger will populate it will the primary contact in the opportunity contact roles.

Unmanaged Package (this could be built with process builder and flows, however, we wanted it to not have any dependencies on any fields as many of you will already have a primary contact field)

Idea to upvote

Preserve Related Files on Account, Contact, or Lead Merge

Apparently, you lose related files when you merge accounts, contacts or leads. That’s terrible. It’s not a known problem for most of our client’s but we install this fix so it never needs to be.

Install Link. Idea to upvote.

Credit: Doug Ayers

Campaign list builder

The Campaign List Builder is a tool to help you quickly build complex mailing lists based on multiple Campaigns. Using a series of filters, you decide who should be part of the Campaign list.

Install Link. Idea to upvote.

Opportunity Stage Insert

Opportunities are fussy as they always require a stage and close date. This simple trigger allows you to specify the stage to use for each record type and if a close date is missing it adds in today’s date:

Install Link. Idea to upvote.

Custom Fields to Quote Lines

When a Quote is created or is syncing and you create an OpportunityLineItem then Salesforce automatically copies and syncs the OpportunityLineItem standard fields to the QuoteLineItem standard fields. Custom fields are ignored.

This project allows you to define via custom setting which OpportunityLineItem custom fields you want copied down to the newly created QuoteLineItem custom fields.

Please note that this project currently does not handle syncing.

Install Link. Idea to upvote.

Credit: Doug Ayers

Even Lead Assignment

Lead Assigner allows Admins to distribute leads evenly among its sales representatives. Admins can configure rules for lead assignment and select users to whom leads need to be routed. It also provides the capability to assign leads to only logged in users.

Install Link. Idea to upvote.

Other Admin and Development Tools

Bulk Field Level Security Editor

Edit all of your profiles on all or your objects at once. A dream come true.

Install Link. Idea to upvote.

Bulk adding fields

Schema Builder – there is a lot of talk about bulk creating tools. We have tried a few approaches. But this standard feature is just as quick as anything. It gives FLS to everyone and doesn’t add it to the page layout. It’s not good for adding formulas or roll ups, but those shouldn’t be added on mass as they need consideration.

Trailhead Link

Skyvia Data Loader

dataloader.io was a go to, but the free version has more limits now. Skyvia allows you to set constants and formulas on import which is great for set statuses or record types. You can also import child objects of the same row. Skyvia will import the parent object and then get the ID and add it to the child object in one go

Link

Mass Switching validation rules, workflows, triggers and process builder.

An awesome tool to be able to toggl on and off all validation rules and workflows. Great for apex deployment are importing records.

Install Link. 

Credit: Ben Edwards

Untitled-1

Ideas to develop

Ideas in draft

In Draft

  • Add Account Partners
  • Lookup or add existing contacts to a record (feed it contact details and it creates or finds a contact/account and saves the result to the record of your choice)
  • Declarative API – pass variables it makes the call and then writes the results to a record of your choice

Ideas:

  • Batch anything – allow the ability to run declarative automations through batching to reduce soql 101errors

Declarative Scheduler Tool

Credit – I need to give ample credit and then some more to Doug Ayers. The original version was inspired by some of his work and then in version 2 it is literally copied off his work. His schedule adding campaign members is built into the tool

Sample user cases

  • A report of all leads over 4 days that have been stuck on a status for 4 days
  • Create a task to follow up on all opportunities that have a closed date in the past and no follow up tasks and haven’t been modified in the last 7 days
  • Send an email on a contacts birthday
  • Process mass updates to all data (create a workflow to fire when the triggering field change and then to do the function you want)
  • Delay bulk workflow actions into a nightly job
  • Backdate workflow processing – when you created a workflow/process build you can trigger it to run on all of the existing records 🙂
  • Let me know yours…

Notes: – It works off batch apex so you can change the batch size on each record. This stops any soql 101 or timeout process builder/flow errors – Has been tested to work on reports of up to 50,000 records. It’s built to be generic so works across all obejects – but you should add in your own datetime field.

Instructions

 

  1. Set up a report 
    1. Include an ID field of the record to update
    2. Include a datetime field that can be changed by the tool
    3. Add in report filters to limit the number of records to update
  2. Add a “Scheduled Report” record
    1. Select the record type “Update Field on Records”
    2. Select the frequency of the update. This tool will run every hour and detects if any “Scheduled Report” records are due to be updated.
    3. Look up the report in the drop down boxes at the bottom. Select the Id and datetime fields
    4. Click save –
    5. WARNING: saving the report selection schedules the tool to fire in one minutes time. If your record meets the condition then it will fire straight away. Make sure no other records are going to be scheduled at the same time.
  3. Set up a process builder to fire when the datetime field is changed:

Right click on the image to save it to your computer.

Installation

Managed Package

View the code on GitHub

 

Troubleshooting steps

  • Check the scheduled report logs for error messages
  • Reduce the batch size
  • Try and manually change the datetime field – might by another validation rule or flow in place causing problems
  • Leave an issue on the github page

Declarative Scheduler Tool for Salesforce admins – use the reporting engine and subscribe feature to update records in report on a daily/weekly/monthly schedule

  • Create a report with the record id in column 1 and a datetime field in column 2
  • Add the filters you like
  • Click subscribe. Then select a custom action. Then Declarative Scheduler (make sure to turn off the salesforce1 notification
  • Set up when you would like these records to update and then schedule away
  • On the scheduled time the datetime field will be updated. So set up a process builder to fire when that field changes. And voilla you have a repeating schedule.

Sample user cases

  • A report of all leads over 4 days that have been stuck on a status for 4 days
  • Create a task to follow up on all opportunities that have a closed date in the past and no follow up tasks and haven’t been modified in the last 7 days
  • Send an email on a contacts birthday
  • Process mass updates to all data (create a workflow to fire when the triggering field change and then to do the function you want)
  • Delay bulk workflow actions into a nightly job
  • Backdate workflow processing – when you created a workflow/process build you can trigger it to run on all of the existing records 🙂
  • Let me know yours…

Notes: – It works off super batch apex so you can change the batch size in custom settings. This stops any soql 101 or timeout process builder/flow errors – Has been tested to work on reports of up to 50,000 records. Don’t go larger of Salesforce CPU times out – It’s built to be generic so works across all obejects – but you should add in your own datetime field.
Todo: – Proper test classes – Instructions – Testing – Guidelines and examples

Instructions

Install the package below.
Right click on the image to save it to your computer.

Right click on the image to save it to your computer.

Right click on the image to save it to your computer.

 

View the code and download the package at GitHub