Too many reports or old reports in your Salesforce org can make for a poor user experience. Maybe it's time for a clean-up. In this post we show you 3 simple steps to clean up your Salesforce reports.
Wouldn’t it be great if Call Centre Managers’ and Supervisors had somewhere to go to get a realistic view of what’s going on with their Agents?
We all know how difficult it is to manage a Call Centre or Service Desk and at the end of the day you’re being measured on performance and customer satisfaction.
Well, hang on to your hats, Omni-Channel Supervisor is here.
Omni-Channel Supervisor works alongside Omni-Channel and gives Managers and Supervisors real-time insights into what is going on such as:
- waiting times;
- open work items;
- queue assignments;
- time an Agent has spent in a Presence Status;
- time since last login.
You can drill down into specific work items, Agents or queues to get more detail.
You don’t even have to refresh to pull new data it updates continuously itself. But it has a lot more to offer than just that.
It can also allow managers to access historical and future trends and projections.
As every Manager/Supervisor will want to see something different, Salesforce have gone with the ‘no one size fits all’ approach and, provided 3 different Tabs:
Here you can see which Agents are currently working, busy or available for work. You can also see which Queues they are assigned to and what Work Capacity they are running at. It will also show you how long they’ve been logged in and when the last work item was accepted by them.
You can view All Agents, which shows you:
This gives you an overall picture of your Agents and how they are performing.
Wow, job done I hear you say.
Hang on what happens if you find an Agent who has been on Away for an extended time, but you know they have been at their desk, wouldn’t it be good to be able to change their Presence Status? From here as a Manager you can! What could be better than changing the Presence Status of an Agent whose been Away for an extended period when you can see them at their desk on Facebook.
Select an Agent’s name to see more Details and their Timeline which give you detail on the Agent’s activity and timestamps. Their Timeline displays a calendar view which shows status changes and work.
Agents by Queue
Shows activity in your Queues, such as:
- How many Agents are assigned to each queue;
- How many are online, away or busy.
This information can help you to plan resources allocation to cover peaks and troughs.
As Supervisors you always need to assess what the backlog is, and the Queues Tab is where you can do this. Here you will see flow of the work through the Queues to the Agents allowing reallocation of resources if required.
Drilling down into the Queues you will see the configuration, availability of Agents, wait times and work items.
All Work Items reside in the Work Tab. The Work Summary View gives a breakdown of what’s in the Queues.
As before you can drill down into any of these by clicking on any Queue to see the Work detail.
So, let’s have a look at what reports we can get out of Salesforce.
OK, you’ve got all the data you need but, as it’s in real-time it’s changing constantly and, you can’t be looking at the screen all the time, so to make sure nothing gets missed I suggest creating a custom report type using Agent Work as the Primary Object. You don’t need to add any relationship objects.
This will then allow you to report on Assign Date, Active Time, Handle Time, Speed To Answer, Decline Date, Decline Reason etc.
Building the reports up and creating Dashboard like the example below.
So, do you want to get a real-time insight into your Service Offering or is it a can of worms too far?
If you’re a Service Desk Manager using Salesforce Service Cloud, then you’ll know all about cherry picking!
I was a Service Desk Manager myself for 11 years and I feel your pain.
So, I’m guessing that your Agents pick their work up from List Views allowing them to pick and choose which they work on.
So, what do you know about Omni-Channel? Nothing, or never heard of it?
OK, well Salesforce released Omni-Channel in 2016, a great feature that routes not just Cases but Leads, SOS Video Calls, Social Posts, Chats, Orders and Custom Objects in real-time to Agents based on their access to specific queues, capacity and their availability.
In this Blog we’re going to look at Cases.
Oh, wow you say let me at it.
Omni-Channel is available for all editions it just needs configuring.
There is a sequence for setting up Omni-Channel:
- Service Channel
- Routing Configuration
- Link Routing to Queue (create Queue if needed)
- Create/Set Presence Status for Agents and make it available to them
- Add Omni-Channel to a Console
Salesforce describe a Service Channel as:
‘Service Channels let you turn most Salesforce objects such as a case, lead, SOS session, or even a custom object into a work item. Omni-Channel then plucks these work items from their Queues—like flowers from the garden of agent productivity—and routes them to your agents in real time.’
Or you could think of it more like a container of items waiting for an Agent.
Omni-Channel needs to be told what to route and how to route it. This is where you determine how the work is routed to the Agents.
You also set the Routing Priority here so, if this Configuration is say for High Priority cases then it would have a Routing Priority of 1. The most important work items are assigned first, then the oldest items are assigned.
The Units of Capacity on the Routing go towards determining where these Cases are routed. If an Agents Capacity is 6, then a High Priority Case from this Routing would take 4 away from his Capacity leaving him with a Capacity of 2, meaning he couldn’t take on another High Priority routed Case until this one was off his case load. We wouldn’t want to overload an Agent!!
Omni-Channel uses Queues to route the work. Think of the Queue a bit like the Cupboard that stores the Containers until they are needed. So, we need to link a Queue to a Routing Configuration, so that Omni-Channel knows which Queue to route the work to.
Presence Configuration and Presence Status
What the heck are these, where do Salesforce get these labels from??
So, these are all about the Agent.
Presence Configurations set how much work can be allocated to Agents. You can have multiple configurations for different groups of Agents.
You can also allow them to decline the work item. You can also set the Configuration to automatically accept requests which will stop Agents declining the work item and banish cherry picking.
These show if an Agent is available to receive Work Items or is Busy or Away. OK, I know what you’re going to say, can’t an Agent put their status to busy or away even when they’re not? Yes, they can, but with Omni-Channel you can report on Available, Away and Busy times against Work items assigned, so you get a better insight into exactly what is happening.
You can create Status’ that have one or more work item channels such as, Web Support which could include, emails and Live Chat.
Presence Status’s can be added via Profiles or you can create Permission sets and assign them that way.
Right so the last thing we need to do is add the Omni-Channel to the Console.
The widget will appear in the bottom right hand corner of the console. It allows Agents to change their Status and see their incoming Work Items.
So, there you go, a quick look at Omni-Channel. Look out for the next Blog where l’ll be looking at Omni-Channel Supervisor and the Reporting side of Omni-Channel.
What do you do to keep track of your engineers out in the field? Do you know where, they are or what they are doing? Is it out of your control?
It doesn’t matter what your business is or what your field operatives are doing, they might be drill wielding technicians, or an agency care assistant, it’s more about knowing who’s out there, where they need to go, what they need to do when they get there and being able to see the status of the job in real-time.
OK, I hear you say, I have no idea where my Technicians are and please tell me where they need to be.
Right, grab and drink and a seat and all will be revealed!
So, Salesforce have given us this Module called Field Service Lightning. Once enabled you get access to a set of standard Salesforce objects to play with.
Geocoding (location data) is also turned on automatically when you enable Field Service Lightning.
There are four roles within the Field Service:
Perfect, so how do I use it?
OK, OK, we’re getting there, just have another drink and chill!
So, Field Service Lightning has three main parts, I suggest you start simple and add as and when you need.
Part 1 – The Core
The core part gives you all the following features to play around with and configure:
With the Core part of Field Service, you can do the following:
- Provide Mobile access to your Service Technicians;
- Track your parts and stock to ensure your Technicians are equipped with what they need for their Service Calls;
- Set operating hours and skills specific to your Technicians and your Organisation;
- Plan and track resources and all field work;
- Analysis of field service data.
Part 2 - Field Service Lightning Managed Package
This adds to the Core features with:
- Scheduling Optimizer allowing allocation of resources to appointments using skills, travel time, location etc;
- Scheduling console which allows Dispatchers and Supervisors transparency of all scheduled service appointments;
- Ability to define your own scheduling model using scheduling policies and work rules;
- Customisation of out of the box triggers for display and scheduling preferences.
Part 3 - Mobile App (free on App Exchange)
Allows Mobile workers to:
- View their appointment schedules
- Check their work orders, contact details etc
- Create and edit work log, create follow up appointment and create Service Reports
- Track van inventories, parts and updates.
Let’s look at some of the features.
Service Territories and Work Rules
Bit like Territories in Sales, they represent regions your Service Staff work in.
Staff can be members of more than one territory, although they will only have one Primary Territory and a Secondary one.
You can also specify the period they are assigned to that Territory if required. Service Territories also have their own Operating Hours.
Identify resources that can be assigned to a Service Appointment. Salesforce provides several out of the box rules:
Active Resources - Service Resources that are currently active;
Due Date - schedule Service Appointments to complete before the Due Date;
Earliest Start Permitted - schedule Service Appointments to start after the Early Start;
Start - schedule Service Appointments to start after the appointment booking window start;
Finish - schedule Service Appointments to start before the appointment booking window ends;
Excluded Resources - Members of the Work Order's Resource Preference of Type Excluded;
Required Service Resource - Members of the of the Work Order's Resource Preference of Type Required;
Match Territory – Only looks at Territories where the Resources are Primary members;
Working Territories - Only looks at Service Resources who are Secondary members. You'll need to enable "Working Location Enable Primary" to also consider Service Territory Members that are of type Primary.
Match Skills - Only Service Resources with the correct skill set. You can enable the "Match Skill Level" setting to take into consideration skill levels.
Maximum Travel from Home - Limit scheduling to a radius of distance or travel time around the Service Resource's Homebase. When set to travel time, the scheduling engine uses aerial routing to determine the travel time regardless of whether street-level routing (SLR) is enabled.
Service Appointment Visiting Hours - respects Business Operating/Visiting Hours that are selected on the Work Order when scheduling.
Resource Availability - schedule Service Appointments only to Service Resources who are available. This will take into consideration existing assigned Service Appointments, Resource Absences, travel time and breaks.
So, say we have a Service Appointment in Birmingham and we have the following configuration:
Service Territory Member
Jane Smith – Birmingham (Primary)
Sam Jones - London (Primary) Birmingham (Secondary)
John Doe – Leeds (Primary)
Here, either Jane or Sam could potentially be candidates.
If you’re using the ‘Match Territory’ work rule only Jane would be considered, however, if using the ‘Working Territories ‘rule both Jane and John would be considered.
When work is being assigned, the Field Service scheduling engine (under the bonnet) will take the Territory into consideration when the work is allocated.
Composed of both Work Rules and Service Objectives.
Again, there are some out of the box ones to get you started:
Customer First – Works on customer selection of a specific employee and the ability to provided service ASAP.
Emergency - Schedules emergencies from the emergency action
High Intensity - Used in times of high service volumes, like a bad weather scenario, focusing on employee productivity first and customer preferences as a second priority
Soft Boundaries – Same as the customer first policy, but allows sharing of employees between territories in order to enhance service coverage
This is a goal for scheduling, objective can be weighted by importance against others in the policy.
Out of the box Objectives are:
ASAP - schedule as soon as possible;
Minimize Overtime - avoid utilization of Extended Hours.
Minimize Travel - Service Resources with the least travel time will be considered optimal.
Preferred Service Resources - tries to assign the Service Appointment to the Service Resources that are members of the Work Order's Resource Preference of Type Preferred.
Resource Priority - prefer high ranking resources.
Skill Level - used to prioritise the least qualified or most qualified Service Resource.
So, that's a lot to take in! Field Service Lightning brings the 'loose ends' into the Service process, but only you can decide if it adds value to your business. For me, I don't see how you could live without it!!
Salesforce is amazing, right?
All that wonderful data linked together, figures floating around looking good!
But wait, let’s take a step back, what is that data telling us?
Do you know how your sales and pipeline are looking month on month, can you show a comparison on this time last year?
As a Sales Rep, do you know how your quarter is going or how you’re doing against your target?
While all this information can be achieved through standard Salesforce reporting, what if you could ask questions and get back a set of ‘intelligent’ results which give you insights into how you can increase your pipeline or what you need to change to serve your clients better?
Think about the best customer service experience you’ve ever had, chances are it was that one time where the person you were talking with had that ‘personal touch’. They knew who you were, knew the issues you’d had before and, best of all, solved your problem efficiently and personably.
Or that thing you wanted to buy, you bought one last year, but can’t remember what it was called, but that Agent on the end of the phone knows what it was, what you paid and quickly completed the sale, well…. say hello to Einstein Analytics Apps.
Salesforce has combined AI into their analytics functionality which allows analysis of vast amounts of data points without the need to write algorithms.
I know what you’re going to say and, yes, it is an additional licence cost but one that could pay for itself very quickly!
Let’s have a look at the differences.
Salesforce Standard Reporting
Ideally used to track and measure the sales, service and marketing team’s performance. Great for operational statistics.
The data it reports on resides within your Salesforce Org and delivers real-time metrics. Whilst you can report historically using Snapshots, the can be fiddly to set up and a little temperamental.
Einstein Analytics Apps
Serves a more strategic purpose than Standard Reporting. It allows you to gain more insights, by asking questions into how your business is doing, why it’s doing better in some areas and not others. You can drill down into lower levels of data to find answers or causes of specific trends. Using Einstein Discovery, it checks and confirms each trend is valid and provides explanations for identified trends.
Data can be imported from elsewhere and used alongside the Salesforce data, such as Quota data alongside Sales Reps performance.
Using the Wave Platform, it can handle huge amounts of data and deliver results in a quick, flexible way.
Oh, and it inherits Salesforce’s multi-layered security model.
Salesforce has been kind and provided us with some pre-built Sales and Service Apps with Dashboards and datasets to start us off. While you can do some customise on these, you will definitely want to harness the power and create your own custom ones.
Being native in Salesforce, you can connect to all Objects, fields and relationships in your Org including any custom Objects.
Before we start diving into what we can get out of Analytics let me introduce you to the Terminology.
Once you’ve set up your data, you can view the data from different viewpoints through a lens, drill down into the interesting bits, or add a combination of Lenses to a Dashboard.
Very similar to other BI apps, the Einstein Analytics Platform creates a story which is great as, I don’t know about you, but I like stories better than numbers.
Dashboards holds several widgets which can be linked by filters meaning the whole dashboard view can be changed by one filter change.
Einstein Analytics Sales App
Allows Sales Teams to be more focused on the right prospects, while allowing Managers transparency into their Team’s performance. Clearer, visible forecasting allows Sales Teams to collaborate and gain real-time insights to allow them to take immediate actions as needed.
It allows smarter decisions to be made, reviews of KPI’s. pipelines and performance metrics, due to the intelligence of the Platform.
If you’re a Sales Rep, what happens if you don’t think you are going to make you’re your quarterly target? How do you know which customers are on the cusp of ordering, or which customers are talking to Competitors? With Einstein Analytics you can ask for help on all these issues and it will return suggestions on how to close your deals faster which, in turn will help you meet your targets!
Below are some examples of Data that Einstein Analytics Sales App can provide.
Einstein Service Analytics App
Provides managers with the insights they need to help them to predict customer satisfaction, assess Agent efficiency and channel optimization.
Imagine you’re a Service Agent, would you like information about your customers at the tip of your fingers, what they have bought before, what issues they had, which products were dodgy etc, you can get this all with Service Analytics. So forewarned is forearmed, watch those Satisfaction scores soar.
And, if all this wasn’t enough Salesforce have just introduced Conversational Queries which makes interacting with data easier. Now you can type data related phrases such as ‘show me top accounts by segment’ and the answers are displayed in charts.
So, fancy being a Data Scientist?
Even though Salesforce has a comprehensive, multi-layered, yet fairly easy to set up and use security Model, people still seems to get ‘twitchy ‘whenever the word ‘cloud’ is mentioned.
Never more so than now with the imminent introduction of GDPR and the demands it will impose on data security.
Salesforce is pretty hot on security and the model they have developed has several components that give finite control over:
- Who sees what;
- Who can access what and where from;
- What they can do with what they can access;
OK, sounds good, so how do they do this?
Record access can be managed in four ways:
Organisation Wide Defaults (OWD)
Denotes the access level users have to each other’s records. OWD locks down data to the most restrictive level.
Top down access for users higher in the hierarchy.
Used to provide automatic exceptions to OWD’s for specific users or groups of users, so they can access records they don’t own or have access to. Like Roel Hierarchies they are only used to give additional users access to records. They can’t be stricter than your OWD’s.
Owners of specific records can share them manually with other users. Manual sharing isn’t automated like the other options, but it can be useful if situations such as Holiday or sick cover.
So, let’s delve a little deeper into each of the four Types.
OWD’s specify the baseline minimum level of access to the records in an Object. Privileges granted by the OWD’s affect everyone. Different OWD’s can be set for internal and external users.
The option for OWD’s are:
Private – only accessible to users who have access via ownership, role hierarchy, permissions or sharing or manual sharing rules.
Public Read Only – all Object records can be viewed by everyone internally.
Public Read/Write – all Object records can be viewed and edited by everyone internally.
Controlled by Parent – Users can perform the same actions on a Controlled by Parent record as the Actions set for all associated master records.
Automatically grants access to data owned by users in roles below them. Although a role is not a pre-requisite when we create a user, it represents a useful way of securing data level access. Don’t think of it in terms of your Organisation’s hierarchy, think of it more as groups of users who need access to the same data.
Sharing Rules are used to further extend user access to specific data. They can be based on the record owner, roles or other criteria. You can create Public Groups and share records between Groups.
Allows record owners to share access from individual Records to other individual users, roles or groups. This isn’t automated it provides an additional flexibility to share records which the other security features don’t cover. Allows owners to give the following levels of Access:
So those are the standard Salesforce Security features, however, there is one more that is very useful and that is Permission Sets.
Say you have a User with a Sales User Profile, which allows them to Read Create and Edit Leads, however, part of their role is to transfer leads to other members of the Team, how would you do that?
Create a new profile maybe? Is that worth it for one person though?
This is where Permission sets come into their own!
Here you would create a Permission set giving rights to Transfer leads and assign that Permission set to that specific user. It doesn’t change their overall Sales User Profile, it just gives them alone additional functionality with Leads.
Permission sets can also be used to open visibility to certain fields within an Object. If you have restricted field accessibility on say Accounts for a certain Profile in Sales but there is one person who needs to see the figures, then you would create a Permission Set, make those fields visible and editable if required and assign that Permission set to that specific user.
How do you handle Sales Reps and their revenue? Are they reluctant to share?
How do you handle Pipeline reporting when you have multiple Sales Reps working on the same deal?
How do your Salespeople manage their Quotas?
What do you know about Opportunity Teams and Revenue Splitting?
So, Opportunity Teams are a group of people working on an Opportunity each with an individual role.
OK, so how do I set them up?
Go into Setup – Opportunity Teams – Select Opportunity Team Settings
Select Enable Team Selling and select Save
Add the Related List to the Page Layout and select Save.
Got it, what about Opportunity Splits
Revenue splitting lets you share the revenue of an Opportunity with the Opportunity Team members.
There are two types of Splits:
Revenue – Lets you share revenue between Opportunity Team members.
Overlay – Allows you to give credit to supporting team members, for this you can use Splits that total over 100%.
Go to Setup – Opportunity Splits – Settings.
Select Setup Opportunity Splits
Select which Split type(s) you require and select Save. Select Enable on the Warning popup.
Select which Page Layouts you want to add the Related List to and select Save.
If you go back to an Opportunity you will see that there are two new Related Lists, Opportunity Teams and Opportunity Splits.
From these lists you can add new Team Members and new Revenue Splits.
New Team Members
Members can have Roles within the Team and access can be Read only or Read/Write.
New Splits can be added with a % of the revenue split (make sure the Total % = 100%.
An Overlay split can take the % over 100%
Great so where can I get an overview of what this looks like?
When you activate Opportunity Teams and Opportunity Splits, Salesforce will add some new report options.
However, if these don’t give you what you need you can always create a new Report Type.
I created a custom Report Type using Opportunities and Opportunity Split Objects which gives me the following report:
If you’re using Collaborative Forecasts within Salesforce then you can incorporate the Opportunity Splits within this. Details on how to set up Collaborative Forecasting can be found here.
You will need to configure an Opportunity Revenue Splits forecast type from Setup – Customise – Forecasts – Settings Select Add another forecast type and select Opportunity Revenue Splits.
Select the columns you want to display in the Opportunities Related List.
Repeat the process for Overlay Splits.
Now when you go to the Forecasts Tab you should have a Revenue Splits and Overlay Splits options in the dropdown of Forecast Type.
If you select a period, you will see all the Opportunities with a close date within that period owned by you and people within your team. If you notice below the Split column will show 100%, the one without a Split will display a -.
If you select the Split it will give you details of the Split breakdown.
Whilst reading through the release notes for Spring ’18 and the various comments and blogs it seems that Salesforce have started playing ‘hide and seek’ with us.
Spring ’18 has some ‘hidden’ functions that Salesforce forgot to document.
Now this came as a shock, never been heard of before!
No idea whether it was deliberate or just a human error but, hey, who cares, here they are.
What if you need a formula to calculate a date based off another date on a record. i.e. you need to calculate a Review Date which might be the Close Date + 6 months.
Up until now you would have needed a long drawn out formula something like this below.
So now all you need is this to add 6 months to the Close Date.
The WEEKDAY function returns the day of the week as a number (1-7) based on a date field in Salesforce.
Again, we could do this with a cumbersome formula such as:
The new way is just this:
It returns the days as a number:
This formula returns the conversion rate for a record’s currency code. Great if you manage sales across countries.
You need to have Currency Management activated to use this function.
So, if your default currency is USD, but the record is GBP, you can retrieve the conversion rate, display it as a formula and use it in reports. You will need to add in the isocode and remember to put it in quotes “EUR”.
The value returned will be the conversion rate such as 0.5678, you can control the number of decimal places.
MFLOOR and MCEILING
We already have access to the Round function, which allows you to round up a decimal number to the number of decimals specified in the formula but, you couldn’t round up or down! Well now you can…
MFLOOR will round down and MCEILING will round up!
This function is similar to the DATEVALUE function but with a TIMEVALUE function.
Great for splitting the time element out for emails for Conferences, minutes etc.
This function returns the current moment time.
All you need is the TIMENOW() function, no additional input is required.
MILLISECOND, MINUTE, SECOND, HOUR
Probably not FUNCTIONS you would use every day.
Looks like a few people online have tried to find a use case but not had much luck. If anyone finds a use case for any of these I’m all ears!
Now you’ve all read the last Blog about Product Schedules and I know you're itching to get started with them, let’s look at making them a bit funkier.
Here’s the Scenario.
Toots Printers have implemented Product Schedules, it’s saving a lot of time and producing much more accurate revenue forecasting. However, they've hit a problem as the Close Dates on their Opportunities tend to move quite a lot and they want the Schedule dates of a Product to move with the Close Date.
OK, so how are we going to do this?
First things first, what tools within Salesforce will allow us to get to the Product Schedules?
After a lot of head scratching, turning Workflows and Process Builder inside out, it looked like it would have to be done with a Trigger.
Hmm, we always lean towards standard solutions in advance of code.
Whilst I ‘m hanging on for a developer I remembered an article I came across written by a guy called Nick Spencer (Thank you Nick you’re amazing!) who had done something similar with a mix of workflows, process builders and Visual Flow! Never being one to reinvent the wheel I thought I’d have a go at using his approach and adjusting it to meet the needs of Toots Printers.
So, onwards and upwards!
Let’s list out what we need:
Custom Date field ‘Days Shifted’ on the Opportunity as we need to capture how many days the date has moved by;
- 2 flows;
- Flow 1 to update the Line Schedule
- Flow 2 to update Opportunity Line Item Dates
- Flow 1 will be a sub-flow of Flow 2;
- A Process which will fire the Flow;
- Workflow to update the number of days the date has moved by.
Create the ‘Days Shifted’ number field with no decimal places on the Opportunity.
Workflow to Populate the field in Step 1. This workflow will fire whenever the Close Date changes.
The action for the Workflow sets the value for the ‘Days Shifted’ field, remember to tick the ‘Re-evaluate Workflow Rules after Field Change’.
Before you go to Step 3, if you’re new to Flow then you need to read my previous Blog and also check out the Salesforce guide here.
Step 3 Flow 1 – Update Line Schedules
This flow is the sub-flow in Flow 2. So, don’t worry if you have some loose ends flying around!
This is going to find all the Product Schedule records that are associated to an Opportunity Line record and then it will update all the dates on the records.
Here is an overview of the Process
1. Flow Fast Lookup
The Fast Lookup will find all the OpportunityLineItemSchedule records that’s Opportunity LineItem ID is the same as the svarOpportunityLineItem.Id. – we will use the svarOpportunityLineItem.Id in the other flow.
All records that meet the criteria will be put into a collection (scvLineSchedules) and the ScheduleDate of the records is stored along with the ID’s in the Collection.
1. The Loop
The Loop cycles through all the records in the scvLineSchedules collection and assigns the next record to the SObject variable svarLineSchedule.
If a connection is found a connection from a loop, it gives two options: “for each value in the collection” and “when there are no more values to process”.
3. Assigning the new Date to the Record
Once the Loop has added a single record to svarLineSchedule, now it needs to assign the new date value to that record. The formula for that was set up in the flaNewScheduleDate.
4. Add the updated record to a new Collection
Now we have the new date in our variable we need to add it to a new collection within the Flow.
In this assignment the operator is Add.
The flow will now loop around and repeat the process until all the records are processed.
5. Fast Update Salesforce
Now Salesforce will be updated with the values from the new Collection – scvNewLineSchedules.
Save the Flow.
Flow 2 – Updating Opportunity Line Item Dates
While the first Flow updates the dates on all the Product Schedule Records. This flow loops through the Opportunity Line Items related to the Opportunity and calls Flow 1 as a sub-flow.
- Looks up the Opportunity and populates a new variable
- Finds all the Opportunity Line Item records relating to the Opportunity and assigns them to an sObject Collection variable.
- Assigns the first record in the Collection to a sObject Variable and passes that record to…
- Flow 1
- Assigns the new Date value to the Opportunity Line Item record.
- Adds that record to another sObject Collection Variable
- All the records get updated using the new Collection’s values.
- Sets the custom Field ‘Days Shifted’ back to 0
There are a few similarities between the two flows. The main differences are Steps 1, 4 and 8. This time it is looping through Opportunity Line Items and not Product Schedule records.
Variables and Formulas needed for this flow are below, remember we probably has some of these already floating around at a loose end!
1. Lookup Opportunity
Looks up Opportunity that has had its closed date changed. It uses the value in ‘Days Shifted’ to populate the variable in the Flow.
Steps 2 and 3 are more or less identical to the first flow.
4. Calling Flow 1
Now we’re going to call Flow 1 but we need to let Salesforce know which variables it’s setting in the target flow and what values to set.
Follow Flow 1 for Steps 5, 6, and 7.
8. Resetting the ‘Days Shifted’ to Zero
Simple Record update to reset the value to 0.
Make sure you activate all the Flow and Workflows. Have Fun.
In the next Blog we will take this a little further....
Salesforce have already given us workflows and process builder but, sometimes they just don’t cut it.
How often have you started a workflow or a process and realised it just won’t do what you need it to?
Well say Hello to Visual Flow… Visual Flow lets you automate business processes, collect, update, edit, create and delete Salesforce date/records. You can even call Apex Classes and all without code! Oh, and it has a drag and drop interface too.
We all know how hard it can be to get users to fill in the right data, so what would you say to showing the users pre-defined screens walking them through what they needed to enter, how great would that be?
What if you worked on an IT service desk, it would be really cool if you had a set of screens which talked you through the customer’s issues and suggested fixes etc.
Whilst Visual flow is more of a front-end tool, using a set of screen and actions triggered by the user, although flows can be used for a multitude of processes and can be autolaunched.
So how does it work?
So, let get down to the nitty gritty.
Flow contains a number of components:
Step Element (input screens)
Kind of Placeholders, which can be converted into an input screen, these are the building blocks of the Flow.
Screens can be created using the Screen Element or converted from a Step above. The screens are a series of windows that are presented to the user who can use the previous or next buttons to move through them. The Screen element allows you to add Fields, Buttons, etc.
Uses logic and data inputs to move the user to the next logical step.
Allows variables to be set to store data for the process as data variables may need to be set or rest during the process
Uses a loop variable to hold the values for the current item, then it loops round to the next item in the variable.
Allows you to add a ‘waiting time’ to a flow before an event is triggered
Data components are used when you need to look for a value or a record or need to create, update or delete a record.
New Apex Code can be created specifically for your flow or you can call existing Apex code.
You can call existing flows within more complex flows and flows can be used more than once.
Controls how the flow is executed.
Used to store updateable values
Can store multiple updated values of the same data type
Updateable field values for a specific Salesforce Record
sObject Collection Variable
As above but for multiple Salesforce Records.
Progress through the Flow in the logic or the UI such as some kind of indicator.
Fixed value to use throughout the flow.
Store numeric formulas.
Store Text for the flow.
Standalone choice option.
Dynamic Record Choice
Collects data from an object’s records and generates a set of choices when run.
Generates a set of choices form the values of s Picklist or Multi-select picklist.
The great thing with Resources is that they can be created on the fly, no more having to cancel out, create the variable and restart the process!
Got it, but it seems complicated so can you show me an example?
It is complex and, when you first start with Flow, it requires patience, lots of coffee or alcohol (or whatever floats your boat) and time. Don’t get disheartened if it doesn’t work first time, perseverance is the key!
Right an example hmm …. OK have a look at my next Blog ‘Crafty things with Visual Flows, Process Builder and a bit of Magic‘.