df16 imprivata - getting started with formulas

35
Chris Duncombe Manager, Business Applications Imprivata [email protected] @sfdc_ninja Getting Started with Formulas They aren’t scary….. Chris Rustici Sr. Salesforce Analyst Imprivata [email protected] @ChrisRustici

Upload: christophe-rustici

Post on 11-Apr-2017

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DF16 Imprivata - Getting Started with Formulas

Chris Duncombe

Manager, Business Applications

Imprivata

[email protected]@sfdc_ninja

Getting Started with FormulasThey aren’t scary…..

Chris Rustici

Sr. Salesforce AnalystImprivata

[email protected]@ChrisRustici

Page 2: DF16 Imprivata - Getting Started with Formulas

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.

Page 3: DF16 Imprivata - Getting Started with Formulas

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

Page 4: DF16 Imprivata - Getting Started with Formulas

Chapter 1: FormulasWhat are they and is there a method to the madness?

Page 5: DF16 Imprivata - Getting Started with Formulas

How new admins sometimes feel about formulas…

Page 6: DF16 Imprivata - Getting Started with Formulas

How admins will feel about formulas…

Page 7: DF16 Imprivata - Getting Started with 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.

Page 8: DF16 Imprivata - Getting Started with Formulas

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

Page 9: DF16 Imprivata - Getting Started with Formulas

Let’s draw it out…

Data In

Functions

Calculations

Operators

Constants

Etc.

Value Out

BusinessLogic

Page 10: DF16 Imprivata - Getting Started with Formulas

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

Page 11: DF16 Imprivata - Getting Started with Formulas

How do I turn my business logic into an actual Formula???

Page 12: DF16 Imprivata - Getting Started with Formulas

Chapter 2: FunctionsThere’s a lot… we’ll give you four must haves

Page 13: DF16 Imprivata - Getting Started with Formulas

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() FunctionIf X and Y are True, then True, else False

Page 14: DF16 Imprivata - Getting Started with Formulas

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() FunctionIf X or Y are True, then True, else False

Page 15: DF16 Imprivata - Getting Started with Formulas

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() FunctionIf X, then do Y, else do Z

Page 16: DF16 Imprivata - Getting Started with Formulas

CASE() FunctionLook 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 2 Option 1, Value 1

Good, Poor, Average, 😐

Page 17: DF16 Imprivata - Getting Started with Formulas

Chapter 3: Use Cases🎵 Is this the real life, or is this just formula fantasy? 🎵

Page 18: DF16 Imprivata - Getting Started with Formulas

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 AgeSales 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.

Page 19: DF16 Imprivata - Getting Started with Formulas

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 AgeSales 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.

Page 20: DF16 Imprivata - Getting Started with Formulas

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…

Page 21: DF16 Imprivata - Getting Started with Formulas

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

Page 22: DF16 Imprivata - Getting Started with Formulas

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 Flago Yellow Flago Red Flag

*Even though this is an image. You will return TEXT

Object: Case

Field(s): Priority

Business Case #2: Case PriorityCases 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

Page 23: DF16 Imprivata - Getting Started with Formulas

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 PriorityCases 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

Page 24: DF16 Imprivata - Getting Started with Formulas

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

Page 25: DF16 Imprivata - Getting Started with Formulas

Business Case #2: Case PriorityCases 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

Page 26: DF16 Imprivata - Getting Started with Formulas

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 OpportunitiesSales 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.

Page 27: DF16 Imprivata - Getting Started with Formulas

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 OpportunitiesSales 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.

Page 28: DF16 Imprivata - Getting Started with Formulas

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

Page 29: DF16 Imprivata - Getting Started with Formulas

Business Case #3: Strategic OpportunitiesSales 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.

Page 30: DF16 Imprivata - Getting Started with Formulas

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…

Page 31: DF16 Imprivata - Getting Started with Formulas

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!

Page 32: DF16 Imprivata - Getting Started with Formulas

Thank Y u

Page 33: DF16 Imprivata - Getting Started with Formulas

Trivia

Question: What is our formula to building formulas?

Answer: Data In Business Logic Value Out

Page 34: DF16 Imprivata - Getting Started with Formulas

Chapter 4: QuestionsWhat’s the meaning of life?

Page 35: DF16 Imprivata - Getting Started with Formulas

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