Imagine you’ve got a record in Salesforce that needs to be approved and double-checked. That’s easy enough to build, just build an approval process with a number of steps and force unanimous approval. But what if you have a business process that involves two steps of approval, and should the record be rejected at the second level, you want it to just go straight back to that next time?
Unrestricted Receptacles
Sarah, the Regional Sales Manager at Unrestricted Receptacles, has seen too many cowboy sales folks sending all sorts of discounts out to customers and it’s having an impact on the win rate. There are a few behaviours she wants to encourage and she also wants to show that she trusts the judgement of her talented sales reps. Sarah is a busy lady; when she approves orders, she only wants to approve them once.
David, a member of our sales team, just wants to sell, but he wants to make sure he’s selling correctly. He likes working at Unrestricted Receptacles.
Jonas just wants to place an order. He has a great relationship with David – he trusts him – and wants David to handle his purchase.
The Business Process
Jonas contacts David to place an order
David generates an Order against the opportunity. Two order forms are needed:
one for the receptacles
the other for their installation.
David’s order forms need to go to the Regional Sales Manager.
If any order is approved, it goes to Finance for final checks.
If an order is rejected, David has to fix and resubmit it.
By this point, a conversation will have taken place between David and Sarah to discuss any adjustments. The price won’t change, but the tax, payment schedule and selected Terms and Conditions might
Finance receives the resubmission. Their administrator checks the order form again and approves or rejects it accordingly
The Solution
The solution for building this in Salesforce requires the following ingredients:
1 Approval Process (of course!)
Some nasty formula fields
A load of checkboxes / status fields
Process Builder
First things first, let’s take a look at the Order object.
Looks pretty straightforward as far as custom objects go. You’ll see I have a whole section here containing fields that deal with approvals. These are my markers that ensure the record goes down the right approval process.
Helper Field 1: Current Approval State
I also have a nasty formula field called “Current Approval State” there, which is evaluating which stage this record is at in terms of the business process. Helper formula fields are awesome. For the formula fanatics, here’s the formula for your enjoyment. Yummy.
Stamp Fields
OK, the next thing to do is to create your fields. I like to put date stamps on things because
It makes it easier to create list views for To-Do Lists
It helps you to report on productivity / Average Handling Time
Everyone is armed with the information they need to poke their teams with a sharp stick to get things approved
Your approval process will be ticking and stamping these boxes as it progresses.
Create the Approval Process
Then, create your approval process. Here’s my sample 2 step process for your enjoyment.
Nice? I’ve got all sorts going on there. The only thing is, my approval process is currently going to fail unless I can get the Sales Manager field populated on my Order record.
Who’s it Going to?
It’s got to be a user lookup field that I can get the system to reference. In the olden days, it was a case of getting someone clever to write and cover an Apex trigger to get that field stamped. NOT ANY MORE.
I’ve built a little Flow in Process Builder to set this (and other) fields automatically when an Order is created. It saves the user time; believe me, many users do get princessy about having to fill in lookup fields.
Take a little look at this:
I’m only setting these fields based on record creation; there are no additional criteria, you can just get the job done.
Test It
Now that my fields are being set, my approval process can function correctly. Take a look:
Step 1: Route it to the sales manager:
Step 2: Sales Manager approves, off it goes to Finance
Step 3: Finance Rejects
Step 4: Resubmitted straight back to Finance (cutting out the sales manager)
Step 5: Finance are finally happy
What else can I use this for?
Expense Report approvals – approved by a line manager, with finance checking for supporting documents and approving for payment
Opportunity approvals – try a multi-step process between sales manager, finance and order fulfilment
AP invoice approvals – Contractors bill you for services, a project manager approves the cost in principle, with finance approving the invoice to be posted
Timesheets – line managers approve timesheets and regional managers have the final sign off
Field Service – Supervisors approve a work order from a customer service agent, after it’s been approved by their customer service manager
Purchase Orders – use two-step approvals to approve spend at the initial level and then add a second level if the potential spend is over a set amount
Goods Receipting – If the cost of items purchased is higher than the tolerance level for a matched receipt on a Purchase Order, you could have a line manager and then a head of department approves the spend
Gemma
Share post:
Imagine you’ve got a record in Salesforce that needs to be approved and double-checked. That’s easy enough to build, just build an approval process with a number of steps and force unanimous approval. But what if you have a business process that involves two steps of approval, and should the record be rejected at the second level, you want it to just go straight back to that next time?
Unrestricted Receptacles
Sarah, the Regional Sales Manager at Unrestricted Receptacles, has seen too many cowboy sales folks sending all sorts of discounts out to customers and it’s having an impact on the win rate. There are a few behaviours she wants to encourage and she also wants to show that she trusts the judgement of her talented sales reps. Sarah is a busy lady; when she approves orders, she only wants to approve them once.
David, a member of our sales team, just wants to sell, but he wants to make sure he’s selling correctly. He likes working at Unrestricted Receptacles.
Jonas just wants to place an order. He has a great relationship with David – he trusts him – and wants David to handle his purchase.
The Business Process
The Solution
The solution for building this in Salesforce requires the following ingredients:
First things first, let’s take a look at the Order object.
Looks pretty straightforward as far as custom objects go. You’ll see I have a whole section here containing fields that deal with approvals. These are my markers that ensure the record goes down the right approval process.
Helper Field 1: Current Approval State
I also have a nasty formula field called “Current Approval State” there, which is evaluating which stage this record is at in terms of the business process. Helper formula fields are awesome.
For the formula fanatics, here’s the formula for your enjoyment. Yummy.
Stamp Fields
OK, the next thing to do is to create your fields. I like to put date stamps on things because
Your approval process will be ticking and stamping these boxes as it progresses.
Create the Approval Process
Then, create your approval process. Here’s my sample 2 step process for your enjoyment.
Nice? I’ve got all sorts going on there. The only thing is, my approval process is currently going to fail unless I can get the Sales Manager field populated on my Order record.
Who’s it Going to?
It’s got to be a user lookup field that I can get the system to reference. In the olden days, it was a case of getting someone clever to write and cover an Apex trigger to get that field stamped. NOT ANY MORE.
I’ve built a little Flow in Process Builder to set this (and other) fields automatically when an Order is created. It saves the user time; believe me, many users do get princessy about having to fill in lookup fields.
Take a little look at this:
I’m only setting these fields based on record creation; there are no additional criteria, you can just get the job done.
Test It
Now that my fields are being set, my approval process can function correctly. Take a look:
Step 1: Route it to the sales manager:
Step 2: Sales Manager approves, off it goes to Finance
Step 3: Finance Rejects
Step 4: Resubmitted straight back to Finance (cutting out the sales manager)
Step 5: Finance are finally happy
What else can I use this for?
Related