Salesforce – how to automate things

This is part of my serie „what we didn’t do during implementation and should„, so you might not find anything interesting or you might just open your eyes wide and say wow! And automating things is definitely the part you probably didn’t do at the beginning but should do now as it is similar to how we are used to do things – crawl -> walk -> run.

So what can you automate, what does it take and how to do it?

There are a few ways how – workflow, process builder, (lightning) flow or APEX. APEX is definitely the most advanced thing, workflow we should forget (even though it still has some great edge use-cases), process builder should be history soon and flow is the way to go for declarative administrator. Let’s speak about process buider (because it is still here) and flows for now.

Process Builder

You can super easily define the rules when something shoud happen. I would say anyone can understand after a few minutes, especially if you ever draw some process diagram. And there is a nice module on Trailhead.

It can run when you create record or after you change it, you can also run it after sometime from any date field you have on your record.

Practical example:

  • when I change opportunity status to Offer sent it will create a task for sales rep to get in touch with customer after a week. If the opportunity is still in the Offer sent status after two weeks, manager will be notified;
  • when opportunity status is change to Closed Won change account status to Customer;
  • when opportunity is not Closed Won or Closed Lost a week after Close Date send email to sales rep to finally decide;
  • send email to customer when the invoice is not paid a week after due date;
  • notify sales rep one month before contract end to get in touch with customer about renewal;
  • notify sales rep a month after opportunity was won to check with customer how it goes.

They might be small things. But those are the things which people will slowly and surely appreciate, because they don’t have to think about them.

One warning – don’t to automation for everything, sometimes report is better. It is great to send info about unpaid invoice to accountant week after due date, but it is maybe even better to create a report which will show the invoices, so they don’t have to go one by one, but can open the report and do the calling in one blast. But maybe they prefer it one by one because they need to mark as „done“ those they called and keep the rest for next day. Meaning you should always know how the users work in the system and tweak it to their work style. And that can change or be changed, because the new system offers so much more. 

Flow

Flow can be a bit more complex, especially now-a-days when it is screen flow, before save, after save, run from button, … and a few other types.

It is more like a programming – you have decision elements, assignment elements, loops, get, update, create, plus it can be extended with other components, … but at the end, as long as you are able to draw the process, you should be fine. If not, definitely check Rakesh’s or Jen’s blogs as they both have specific use cases and step by step how to solve them.

When would I use flow instead of process builder?

  • when I need to have screens with some questions, fields for additional information, etc;
  • when the process is more complex – notify sales rep one month before contract end, but not in case there is already a new opportunity.

Why use screen flow?

Well, I understand, it is really easy to create opportunity. You just need to check whether the account and contact already exist, create the opportunity, find the right product and add it. The users should be able to learn it really quickly.

But maybe create some simple wizard, which will ask for account name and if it cannot find it in the database ask for more details. Then offer all contacts to choose from plus fields for a new one. Another screen for opportunity name and close date plus which (one) of your product you want to offer. And then create all the records in the background and open it for you. Sounds easier?

As you can insert the screen flow into Lightning Page you can also do quick setting of some field values. One customer had to update documents and it took a while to open the lookup field on each of them and search for the contact from that exact company. Screen flow, which get all the contacts and just let him choose was a miracle.

Quickly select related record you want to save to lookup field.

Some other examples:

  • assign the right SLAs and working hours to cases;
  • contract creation, which ask a few more details and generated all the relevant documents;
  • NDA generation, which you can start from account but it will create related records in the background and send for approval if needed.

There is great trailmix for flow and some videos. Definitely watch them.

What are your use-cases, what you did and it saves a lot of work for your users? Will you share with me or maybe with Automation Hours webinar?

Leave a Reply