SlideShare a Scribd company logo
Chris Duncombe
Manager, Business Applications
Imprivata
cduncombe@imprivata.com
@sfdc_ninja
Getting Started with Formulas
They aren’t scary…..
Chris Rustici
Sr. Salesforce Analyst
Imprivata
crustici@imprivata.com
@ChrisRustici
Forward-Looking Statements
Statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or
if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the
forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any
projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies
or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology
developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for
our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of
growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed
and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand,
retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history
reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could
affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly
report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC
Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may
not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently
available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Chapter 1
There are tons…
…we’ll show you four
How can I use this?
Does this really work?
Prizes?
Who knows…
Chapter 2 Chapter 3 Chapter 4
What are they?
Is there a trick?
Formulas Functions Use Cases Questions
Chapter 1: Formulas
What are they and is there a method to the madness?
How new admins sometimes feel about formulas…
How admins will feel about formulas…
So what is a formula?
Similar to formulas in Excel, formulas derive their value from other fields, values, constants
and other variables present on the record. They can use functions and calculations to derive a
new value of some type.
So what does that really mean?
1. What is the data coming in?
2. What is my business logic?
3. How do I want my output to look?
At its most basic level, all formulas can be broken into 3 parts
Let’s draw it out…
Data In
Functions
Calculations
Operators
Constants
Etc.
Value Out
Business
Logic
Data In Business Logic Value Out
Score From 0 – 6 = Low
Score of 7 - 10 = High
Two Possible Values:
High or Low
Example: Low
Object: Case
Field: C-Sat Score
Example: Score = 6
Customer Satisfaction Example
How do I turn my business logic into an actual Formula???
Chapter 2: Functions
There’s a lot… we’ll give you four must haves
Conditions Example Result
Chris D
Chris R
Score = 15
Score = 30
TRUE
FALSE
TRUE
FALSE
Name is Chris, Has Red Hair
Name is Chris, Has Red Hair
Score > 10, Score < 20
Score > 10, Score < 20
AND() Function
If X and Y are True, then True, else False
Conditions Example Result
Chris D
Chris R
Open, Expired
Open, Amount = $50,000
TRUE
TRUE
TRUE
FALSE
Name is Chris, Has Red Hair
Name is Chris, Has Red Hair
Closed = true, Expired = true
Lost = true, Amount = $0
OR() Function
If X or Y are True, then True, else False
If… Then Else
Eat
“Large”
“In Progress”
Don’t Eat
“Small”
“Past Due”
I am Hungry
X > 10
Due Date > Today
Satisfaction Score > 7
IF() Function
If X, then do Y, else do Z
 
CASE() Function
Look at X, if it’s A, do this, If it’s B, do this, else do this
My Mood
Opportunity Stage
Shipping Cost
Customer Health
Good, Be Nice
Prospecting, “Early”
California, $10
Bad, Be Mean
Negotiating, “Late”
Massachusetts, $15
Be confused
“Mid”
$5
Look at ElseOption 2, Value 2Option 1, Value 1
Good,  Poor,  Average, 😐
Chapter 3: Use Cases
🎵 Is this the real life, or is this just formula fantasy? 🎵
Data In Business Logic Value Out
If Open:
Calculate number of days
between current date and
created date
If Closed:
Calculate number of days
between close date and
created date
Integer representing the
age, in days of the
opportunity
A.K.A. just a number
Object: Opportunity
Field(s):
Created Date
Close Date
Stage
Business Case #1: Opportunity Age
Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is
closed, it shouldn’t increase the number of days.
Data In Business Logic Value Out
Open
Today - CreatedDate
Closed
CloseDate - CreatedDate
Integer representing the
age, in days of the
opportunity
Object: Opportunity
Field(s) API Names:
CreatedDate
CloseDate
isClosed
Business Case #1: Opportunity Age
Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is
closed, it shouldn’t increase the number of days.
Business Case #1: Opportunity Age
IF(
isClosed,
CloseDate – DATEVALUE(CreatedDate),
TODAY() – DATEVALUE(CreatedDate)
)
Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is
closed, it shouldn’t increase the number of days.
One of our Core Functions
Value if condition is True
Value if condition is False (the Else)
The condition…
Business Case #1: Opportunity Age
Open Opportunity
Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is
closed, it shouldn’t increase the number of days.
Closed Opportunity
Data In Business Logic Value Out
Priority of Low is Green
Priority of Medium is
Yellow
Priority of High is Red
One of three images*:
o Green Flag
o Yellow Flag
o Red Flag
*Even though this is an
image. You will return
TEXT
Object: Case
Field(s): Priority
Business Case #2: Case Priority
Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of
their Cases. They need a visual way to see Low/Medium/High cases
Data In Business Logic Value Out
Priority of low
"/img/flag_green.gif”
Priority of medium
"/img/flag_yellow.gif”
Priority of high
"/img/flag_red.gif"
Output one of these three
images
Object: Case
Field(s) API Names:
Priority
Business Case #2: Case Priority
Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of
their Cases. They need a visual way to see Low/Medium/High cases
Business Case #2: Case Priority
IMAGE(
CASE(
Priority,
"Low", "/img/samples/flag_green.gif",
"Medium", "/img/samples/flag_yellow.gif",
"High", "/img/samples/flag_red.gif",
"/s.gif"
), "Priority Flag"
)
Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of
their Cases. They need a visual way to see Low/Medium/High cases
Function: IMAGE(image url, hover text)
Core Function: CASE(Condition, Option 1, Value 1, Option 2, Value 2, Else Value)
Case condition. Tells the formula to look at the priority field
If Priority is low, use this image URL for the image function
If Priority is medium, use this image URL for the image function
If Priority is high, use this image URL for the image function
If Priority is none of the above, use this image URL for the image function
Hover text. 2nd argument for the image function
Business Case #2: Case Priority
Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of
their Cases. They need a visual way to see Low/Medium/High cases
Data In Business Logic Value Out
New Business over $50k
OR
Upgrade over $100k
OR
Renewal over $150k
Display a $$ image when
true, otherwise show
nothing
Object: Opportunity
Field(s):
Amount
Type
Stage
Business Case #3: Strategic Opportunities
Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business
Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
Data In Business Logic Value Out
Type = "New Business" &
Amount > 50,000
OR
Type = "Upgrade" & Amount
>100,000
OR
Type = "Renewal" & Amount
>150,000
/img/icon/cash24.png
Object: Opportunity
Field(s) API Names:
Amount
Type
isClosed
Business Case #3: Strategic Opportunities
Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business
Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
Business Case #3: Strategic Opportunities
IF(
AND(
IsClosed = False,
OR(
AND(ISPICKVAL( Type , "New Business"), Amount > 50000),
AND(ISPICKVAL( Type , "Upgrade"), Amount > 100000),
AND(ISPICKVAL( Type , "Renewal"), Amount > 150000)
)
),
IMAGE('/img/icon/cash24.png', 'Strategic Opp'),
Null
)
Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business
Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
Core Function #2
The condition…
Yet another Core Function…now we’re showing off!
New Business over $50k
Upgrade over $100k
Renewal over $150k
If above criteria is met, display $$ Image
Core Function #1
If above criteria is not met, display nothing
Business Case #3: Strategic Opportunities
Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business
Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
Data In Business Logic Value Out
Now you know it allWhen you walked in The Chris’s showed some tricks
The formula of this presentation…
So what did we learn???
Formulas make us look like Rock Stars (Images, #s, %s….)1
2
3
4
Functions are our friend (IF, AND, OR, CASE…)
Method to the formula madness (Data In, Business Logic, Value Out)
No Code!
Thank Y u
Trivia
Question: What is our formula to building formulas?
Answer: Data In  Business Logic  Value Out
Chapter 4: Questions
What’s the meaning of life?
Additional Resources
1. All icons available to use that are preloaded in your org
1. http://free-121d5f44d20-121d603d1c5-121ee2b8103.force.com/force2b/salesforceicons
2. Trailhead: Formulas & Validations
1. https://trailhead.salesforce.com/module/point_click_business_logic
3. Trailhead: Advanced Formulas
1. https://trailhead.salesforce.com/module/advanced_formulas
4. Chatter: Formulas - Help, Tips and Tricks
1. https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001ocs

More Related Content

Viewers also liked

Pratap Narayan R & D Engineer In Production
Pratap Narayan R & D Engineer In ProductionPratap Narayan R & D Engineer In Production
Pratap Narayan R & D Engineer In Production
PRATAP NARAYAN
 
Shot list
Shot listShot list
Shot list
Micheal Victor
 
LOCATION RECCES
LOCATION RECCESLOCATION RECCES
LOCATION RECCES
Micheal Victor
 
Storyboard
StoryboardStoryboard
Storyboard
Micheal Victor
 
call sheet
 call sheet  call sheet
call sheet
Micheal Victor
 
SKILLS AUDIT
SKILLS AUDITSKILLS AUDIT
SKILLS AUDIT
Micheal Victor
 
InsidePA-May2016-Web
InsidePA-May2016-WebInsidePA-May2016-Web
InsidePA-May2016-Web
Bryce Kile
 
Onur Air
Onur AirOnur Air
Onur Air
Semin Eser
 

Viewers also liked (8)

Pratap Narayan R & D Engineer In Production
Pratap Narayan R & D Engineer In ProductionPratap Narayan R & D Engineer In Production
Pratap Narayan R & D Engineer In Production
 
Shot list
Shot listShot list
Shot list
 
LOCATION RECCES
LOCATION RECCESLOCATION RECCES
LOCATION RECCES
 
Storyboard
StoryboardStoryboard
Storyboard
 
call sheet
 call sheet  call sheet
call sheet
 
SKILLS AUDIT
SKILLS AUDITSKILLS AUDIT
SKILLS AUDIT
 
InsidePA-May2016-Web
InsidePA-May2016-WebInsidePA-May2016-Web
InsidePA-May2016-Web
 
Onur Air
Onur AirOnur Air
Onur Air
 

Similar to DF16 Imprivata - Getting Started with Formulas

ABC of Einstein Analytics
ABC of Einstein AnalyticsABC of Einstein Analytics
ABC of Einstein Analytics
rikkehovgaard
 
Get the Analytic Edge, Learn Einstein Analytics
Get the Analytic Edge, Learn Einstein AnalyticsGet the Analytic Edge, Learn Einstein Analytics
Get the Analytic Edge, Learn Einstein Analytics
rikkehovgaard
 
Improving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Improving Enterprise Findability: Presented by Jayesh Govindarajan, SalesforceImproving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Improving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Lucidworks
 
Aan009 Contreras 091907
Aan009 Contreras 091907Aan009 Contreras 091907
Aan009 Contreras 091907
Dreamforce07
 
Czech Dreamin
Czech DreaminCzech Dreamin
Czech Dreamin
rikkehovgaard
 
Get the analytics edge, learn Einstein Analytics, Rikke Hovgaard
Get the analytics edge, learn Einstein Analytics, Rikke HovgaardGet the analytics edge, learn Einstein Analytics, Rikke Hovgaard
Get the analytics edge, learn Einstein Analytics, Rikke Hovgaard
CzechDreamin
 
Fun with Flows - Terry Cole
Fun with Flows - Terry ColeFun with Flows - Terry Cole
Fun with Flows - Terry Cole
Salesforce Admins
 
Hcn training job plan_11-11-11 v3
Hcn training job plan_11-11-11 v3Hcn training job plan_11-11-11 v3
Hcn training job plan_11-11-11 v3
jsaunders_accolo
 
Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)
Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)
Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)
Salesforce Partners
 
Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...
Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...
Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...
Judy Loehr
 
Template for submitting Business Plan in AKTU Parikrama Competition.
Template for submitting Business Plan in AKTU Parikrama Competition.Template for submitting Business Plan in AKTU Parikrama Competition.
Template for submitting Business Plan in AKTU Parikrama Competition.
Engineers inc
 
Clean Data: A Journey Not a Destination
Clean Data: A Journey Not a DestinationClean Data: A Journey Not a Destination
Clean Data: A Journey Not a Destination
RingLead
 
B P S008 Thayer 091907
B P S008  Thayer 091907B P S008  Thayer 091907
B P S008 Thayer 091907
Dreamforce07
 
Linked in data to power sales - dreamforce nov 18 2013 - vfinal w. appendix
Linked in   data to power sales - dreamforce nov 18 2013 - vfinal w. appendixLinked in   data to power sales - dreamforce nov 18 2013 - vfinal w. appendix
Linked in data to power sales - dreamforce nov 18 2013 - vfinal w. appendix
Andres Bang
 
How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth
Salesforce Admins
 
Build an AI Roadmap and Win the Consumer Goods Intelligence Race
Build an AI Roadmap and Win the Consumer Goods Intelligence RaceBuild an AI Roadmap and Win the Consumer Goods Intelligence Race
Build an AI Roadmap and Win the Consumer Goods Intelligence Race
Gib Bassett
 
Presentation
PresentationPresentation
Presentation
Batish Sama
 
Programming the ExactTarget Marketing Cloud
Programming the ExactTarget Marketing CloudProgramming the ExactTarget Marketing Cloud
Programming the ExactTarget Marketing Cloud
Salesforce Developers
 
Demystifying salesforce predictions ea user group brightgen
Demystifying salesforce predictions   ea user group brightgenDemystifying salesforce predictions   ea user group brightgen
Demystifying salesforce predictions ea user group brightgen
rikkehovgaard
 
Process Builder and Flow: An Admin's Trigger by Rich Englhard
Process Builder and Flow: An Admin's Trigger by Rich EnglhardProcess Builder and Flow: An Admin's Trigger by Rich Englhard
Process Builder and Flow: An Admin's Trigger by Rich Englhard
Salesforce Admins
 

Similar to DF16 Imprivata - Getting Started with Formulas (20)

ABC of Einstein Analytics
ABC of Einstein AnalyticsABC of Einstein Analytics
ABC of Einstein Analytics
 
Get the Analytic Edge, Learn Einstein Analytics
Get the Analytic Edge, Learn Einstein AnalyticsGet the Analytic Edge, Learn Einstein Analytics
Get the Analytic Edge, Learn Einstein Analytics
 
Improving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Improving Enterprise Findability: Presented by Jayesh Govindarajan, SalesforceImproving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
Improving Enterprise Findability: Presented by Jayesh Govindarajan, Salesforce
 
Aan009 Contreras 091907
Aan009 Contreras 091907Aan009 Contreras 091907
Aan009 Contreras 091907
 
Czech Dreamin
Czech DreaminCzech Dreamin
Czech Dreamin
 
Get the analytics edge, learn Einstein Analytics, Rikke Hovgaard
Get the analytics edge, learn Einstein Analytics, Rikke HovgaardGet the analytics edge, learn Einstein Analytics, Rikke Hovgaard
Get the analytics edge, learn Einstein Analytics, Rikke Hovgaard
 
Fun with Flows - Terry Cole
Fun with Flows - Terry ColeFun with Flows - Terry Cole
Fun with Flows - Terry Cole
 
Hcn training job plan_11-11-11 v3
Hcn training job plan_11-11-11 v3Hcn training job plan_11-11-11 v3
Hcn training job plan_11-11-11 v3
 
Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)
Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)
Introduction to A.I in Sales Cloud and Sales Cloud Einstein (April 27, 2017)
 
Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...
Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...
Bootstrap, Angel or Venture: Determining the Right Financing Strategy for You...
 
Template for submitting Business Plan in AKTU Parikrama Competition.
Template for submitting Business Plan in AKTU Parikrama Competition.Template for submitting Business Plan in AKTU Parikrama Competition.
Template for submitting Business Plan in AKTU Parikrama Competition.
 
Clean Data: A Journey Not a Destination
Clean Data: A Journey Not a DestinationClean Data: A Journey Not a Destination
Clean Data: A Journey Not a Destination
 
B P S008 Thayer 091907
B P S008  Thayer 091907B P S008  Thayer 091907
B P S008 Thayer 091907
 
Linked in data to power sales - dreamforce nov 18 2013 - vfinal w. appendix
Linked in   data to power sales - dreamforce nov 18 2013 - vfinal w. appendixLinked in   data to power sales - dreamforce nov 18 2013 - vfinal w. appendix
Linked in data to power sales - dreamforce nov 18 2013 - vfinal w. appendix
 
How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth How to Choose the Right Automation Tool by Jonathan Hackworth
How to Choose the Right Automation Tool by Jonathan Hackworth
 
Build an AI Roadmap and Win the Consumer Goods Intelligence Race
Build an AI Roadmap and Win the Consumer Goods Intelligence RaceBuild an AI Roadmap and Win the Consumer Goods Intelligence Race
Build an AI Roadmap and Win the Consumer Goods Intelligence Race
 
Presentation
PresentationPresentation
Presentation
 
Programming the ExactTarget Marketing Cloud
Programming the ExactTarget Marketing CloudProgramming the ExactTarget Marketing Cloud
Programming the ExactTarget Marketing Cloud
 
Demystifying salesforce predictions ea user group brightgen
Demystifying salesforce predictions   ea user group brightgenDemystifying salesforce predictions   ea user group brightgen
Demystifying salesforce predictions ea user group brightgen
 
Process Builder and Flow: An Admin's Trigger by Rich Englhard
Process Builder and Flow: An Admin's Trigger by Rich EnglhardProcess Builder and Flow: An Admin's Trigger by Rich Englhard
Process Builder and Flow: An Admin's Trigger by Rich Englhard
 

DF16 Imprivata - Getting Started with Formulas

  • 1. Chris Duncombe Manager, Business Applications Imprivata cduncombe@imprivata.com @sfdc_ninja Getting Started with Formulas They aren’t scary….. Chris Rustici Sr. Salesforce Analyst Imprivata crustici@imprivata.com @ChrisRustici
  • 2. Forward-Looking Statements Statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Chapter 1 There are tons… …we’ll show you four How can I use this? Does this really work? Prizes? Who knows… Chapter 2 Chapter 3 Chapter 4 What are they? Is there a trick? Formulas Functions Use Cases Questions
  • 4. Chapter 1: Formulas What are they and is there a method to the madness?
  • 5. How new admins sometimes feel about formulas…
  • 6. How admins will feel about formulas…
  • 7. So what is a formula? Similar to formulas in Excel, formulas derive their value from other fields, values, constants and other variables present on the record. They can use functions and calculations to derive a new value of some type.
  • 8. So what does that really mean? 1. What is the data coming in? 2. What is my business logic? 3. How do I want my output to look? At its most basic level, all formulas can be broken into 3 parts
  • 9. Let’s draw it out… Data In Functions Calculations Operators Constants Etc. Value Out Business Logic
  • 10. Data In Business Logic Value Out Score From 0 – 6 = Low Score of 7 - 10 = High Two Possible Values: High or Low Example: Low Object: Case Field: C-Sat Score Example: Score = 6 Customer Satisfaction Example
  • 11. How do I turn my business logic into an actual Formula???
  • 12. Chapter 2: Functions There’s a lot… we’ll give you four must haves
  • 13. Conditions Example Result Chris D Chris R Score = 15 Score = 30 TRUE FALSE TRUE FALSE Name is Chris, Has Red Hair Name is Chris, Has Red Hair Score > 10, Score < 20 Score > 10, Score < 20 AND() Function If X and Y are True, then True, else False
  • 14. Conditions Example Result Chris D Chris R Open, Expired Open, Amount = $50,000 TRUE TRUE TRUE FALSE Name is Chris, Has Red Hair Name is Chris, Has Red Hair Closed = true, Expired = true Lost = true, Amount = $0 OR() Function If X or Y are True, then True, else False
  • 15. If… Then Else Eat “Large” “In Progress” Don’t Eat “Small” “Past Due” I am Hungry X > 10 Due Date > Today Satisfaction Score > 7 IF() Function If X, then do Y, else do Z  
  • 16. CASE() Function Look at X, if it’s A, do this, If it’s B, do this, else do this My Mood Opportunity Stage Shipping Cost Customer Health Good, Be Nice Prospecting, “Early” California, $10 Bad, Be Mean Negotiating, “Late” Massachusetts, $15 Be confused “Mid” $5 Look at ElseOption 2, Value 2Option 1, Value 1 Good,  Poor,  Average, 😐
  • 17. Chapter 3: Use Cases 🎵 Is this the real life, or is this just formula fantasy? 🎵
  • 18. Data In Business Logic Value Out If Open: Calculate number of days between current date and created date If Closed: Calculate number of days between close date and created date Integer representing the age, in days of the opportunity A.K.A. just a number Object: Opportunity Field(s): Created Date Close Date Stage Business Case #1: Opportunity Age Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is closed, it shouldn’t increase the number of days.
  • 19. Data In Business Logic Value Out Open Today - CreatedDate Closed CloseDate - CreatedDate Integer representing the age, in days of the opportunity Object: Opportunity Field(s) API Names: CreatedDate CloseDate isClosed Business Case #1: Opportunity Age Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is closed, it shouldn’t increase the number of days.
  • 20. Business Case #1: Opportunity Age IF( isClosed, CloseDate – DATEVALUE(CreatedDate), TODAY() – DATEVALUE(CreatedDate) ) Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is closed, it shouldn’t increase the number of days. One of our Core Functions Value if condition is True Value if condition is False (the Else) The condition…
  • 21. Business Case #1: Opportunity Age Open Opportunity Sales wants to determine the overall Age of an Opportunity since it was created. If the Opportunity is closed, it shouldn’t increase the number of days. Closed Opportunity
  • 22. Data In Business Logic Value Out Priority of Low is Green Priority of Medium is Yellow Priority of High is Red One of three images*: o Green Flag o Yellow Flag o Red Flag *Even though this is an image. You will return TEXT Object: Case Field(s): Priority Business Case #2: Case Priority Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of their Cases. They need a visual way to see Low/Medium/High cases
  • 23. Data In Business Logic Value Out Priority of low "/img/flag_green.gif” Priority of medium "/img/flag_yellow.gif” Priority of high "/img/flag_red.gif" Output one of these three images Object: Case Field(s) API Names: Priority Business Case #2: Case Priority Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of their Cases. They need a visual way to see Low/Medium/High cases
  • 24. Business Case #2: Case Priority IMAGE( CASE( Priority, "Low", "/img/samples/flag_green.gif", "Medium", "/img/samples/flag_yellow.gif", "High", "/img/samples/flag_red.gif", "/s.gif" ), "Priority Flag" ) Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of their Cases. They need a visual way to see Low/Medium/High cases Function: IMAGE(image url, hover text) Core Function: CASE(Condition, Option 1, Value 1, Option 2, Value 2, Else Value) Case condition. Tells the formula to look at the priority field If Priority is low, use this image URL for the image function If Priority is medium, use this image URL for the image function If Priority is high, use this image URL for the image function If Priority is none of the above, use this image URL for the image function Hover text. 2nd argument for the image function
  • 25. Business Case #2: Case Priority Cases are given a priority of low, medium or high that the support team uses to rank and prioritize all of their Cases. They need a visual way to see Low/Medium/High cases
  • 26. Data In Business Logic Value Out New Business over $50k OR Upgrade over $100k OR Renewal over $150k Display a $$ image when true, otherwise show nothing Object: Opportunity Field(s): Amount Type Stage Business Case #3: Strategic Opportunities Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
  • 27. Data In Business Logic Value Out Type = "New Business" & Amount > 50,000 OR Type = "Upgrade" & Amount >100,000 OR Type = "Renewal" & Amount >150,000 /img/icon/cash24.png Object: Opportunity Field(s) API Names: Amount Type isClosed Business Case #3: Strategic Opportunities Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
  • 28. Business Case #3: Strategic Opportunities IF( AND( IsClosed = False, OR( AND(ISPICKVAL( Type , "New Business"), Amount > 50000), AND(ISPICKVAL( Type , "Upgrade"), Amount > 100000), AND(ISPICKVAL( Type , "Renewal"), Amount > 150000) ) ), IMAGE('/img/icon/cash24.png', 'Strategic Opp'), Null ) Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k. Core Function #2 The condition… Yet another Core Function…now we’re showing off! New Business over $50k Upgrade over $100k Renewal over $150k If above criteria is met, display $$ Image Core Function #1 If above criteria is not met, display nothing
  • 29. Business Case #3: Strategic Opportunities Sales needs to see all “strategic” opportunities that haven’t been closed. This is any New Business Opportunity over $50k, Upgrade Opportunities over $100k, and any Renewal Opportunity over $150k.
  • 30. Data In Business Logic Value Out Now you know it allWhen you walked in The Chris’s showed some tricks The formula of this presentation…
  • 31. So what did we learn??? Formulas make us look like Rock Stars (Images, #s, %s….)1 2 3 4 Functions are our friend (IF, AND, OR, CASE…) Method to the formula madness (Data In, Business Logic, Value Out) No Code!
  • 33. Trivia Question: What is our formula to building formulas? Answer: Data In  Business Logic  Value Out
  • 34. Chapter 4: Questions What’s the meaning of life?
  • 35. Additional Resources 1. All icons available to use that are preloaded in your org 1. http://free-121d5f44d20-121d603d1c5-121ee2b8103.force.com/force2b/salesforceicons 2. Trailhead: Formulas & Validations 1. https://trailhead.salesforce.com/module/point_click_business_logic 3. Trailhead: Advanced Formulas 1. https://trailhead.salesforce.com/module/advanced_formulas 4. Chatter: Formulas - Help, Tips and Tricks 1. https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001ocs