dreamfoce 2013 formula ninjas
DESCRIPTION
Presented By Deepa Patel, Halak Consulting, LLC, Steve Molis, Epsilon, Francisc Pindar, RadnipTRANSCRIPT
Formula Ninjas Deepa Patel, Halak Consulting, LLC, President @halakconsulting Steve Molis, Epsilon, Salesforce Administrator @stevemorforce Francisc Pindar, Radnip, Technical Consultant @radnip
Safe harbor Safe harbor 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.
Deepa Patel Halak Consulting, LLC
@halakconsulting
All about Halak Consulting, LLC
Halak Consulting LLC a Salesforce partner. We help firms identify problem areas and propose solutions that meet the firm’s requirements.
We work with clients to define their business goals, analyze current business infrastructure and identify nonexistent business processes.
We focus only on Salesforce.com software services
Silicon Valley User group co-leader, run Process & Strategy and Salesforce Certification Study Group on Success Community
Visit Us – www.halakconsulting.com
www.linkedin.com/in/deepapatelhalakconsulting/
Formula Ninjas - Basics
Traditional Formula Writing
Compared to
Writing Formulas in Salesforce
Formula Ninjas - Basics
In Salesforce world: IF( field = "Value", then do this, else do that) Comma is use in place of “THEN” and “ELSE”. Right parenthesis is used in place of “END IF”.
Simple If Formula Statement
If Apple = then Good to Eat ELSE Not Good to Eat END IF
Traditional Formula: Salesforce Formula:
IF (Apple = "Red", "Good to Eat", "Not Good to Eat")
Formula Ninjas - Basics What do you do if you have nested if statements
IF Apple = then Sour ELSE If Apple = then Semi Sweet ELSE If Apple = then Delicious ELSE Rotten END IF END IF END IF
Traditional Formula: Salesforce Formula:
If( Apple = "Green", "Sour"), If (Apple = "Yellow", "Semi Sweet"), If (Apple = "Red", "Delicious"), "Rotten" ) ) )
Formula Ninjas - Basics Now what if we want to use “AND” in our formula
IF Apple = AND Apple = Good to Eat ELSE Not Good to Eat END IF
Traditional Formula: Salesforce Formula:
IF( AND(Apple = "Yellow", Apple = "Red"), "Good to Eat", "Not Good to Eat" ) OR IF( (Apple = "Yellow" && Apple = "Red"), "Good to Eat", "Not Good to Eat" )
Salesforce World: AND(value 1, value 2, value 3....) (value 1 && value 2 && value 3...)
Formula Ninjas - Basics Same applies to the “OR” criteria Traditional Formula:
Salesforce World: OR(value 1, value 2, value 3....) (value 1 || value 2 || value 3...)
IF Apple = OR Apple = Good to Eat = “Yes" ELSE Good to Eat = “No" END IF
Salesforce Formula:
IF( OR(Apple = "Yellow", Apple = "Red"), "Good to Eat", "Not Good to Eat" ) OR IF( (Apple = "Yellow" || Apple = "Red"), "Good to Eat", "Not Good to Eat" )
Formula Ninjas - Basics
IF Picklist value is "Closed/Won" OR "Closed/Lost" AND Marketing Qualified Date is not blank, then Calculate Close Date - Marketing Qualified Date
Now lets combine the "AND" & "OR" parameters
IF (StageName = "Closed/Won" OR StageName = "Closed/Lost") AND Marketing Qualified Date <> Blank then Days to Close = Closed Date - Marketing Qualified Date ELSE Days to Close = 0 End IF
Traditional Formula:
Formula Ninjas - Basics Now lets combine the "AND" & "OR" parameters
IF( AND ( OR(ISPICKVAL(StageName, "Closed/Won"), ISPICKVAL(StageName, "Closed/Lost)), //Stage Field is a Picklist field NOT(ISBLANK(Marketing Qualified Date)) ), (CloseDate) - DATEVALUE(Marketing Qualified Date), // Marketing Qualified Date is a DateTime Field 0 )
Salesforce Formula:
Formula Ninjas - Basics Now lets combine the "AND" & "OR" parameters
OR – a little more easier to interpret IF( ((ISPICKVAL(StageName, "Closed/Won") || ISPICKVAL(StageName, "Closed/Lost)) && NOT(ISBLANK(Marketing Qualified Date))), (CloseDate) - DATEVALUE(Marketing Qualified Date), 0 )
Salesforce Formula:
Formula Ninjas - Basics Lets look at two "AND" statements and two "OR" statements
IF (StageName = "Closed/Won" OR StageName = "Closed/Lost") AND (Unqualified Date = " " OR Marketing Qualified Date = " " ) then Calculate CloseDate - Created Date) End If
Traditional Formula:
Formula Ninjas - Basics Lets look at two "AND" statements and two "OR" statements
IF ( AND ( OR( ISPICKVAL( StageName , "Closed/Won"), ISPICKVAL( StageName , "Closed/Lost") ), OR ( ISBLANK( Unqualified Date ), ISBLANK( Marketing Qualified Date) ) ) , ( CloseDate) - DATEVALUE( CreatedDate), 0 )
Salesforce Formula:
Formula Ninjas - Basics Lets look at two "AND" statements and two "OR" statements
OR– a little more easier to interpret IF ( (ISPICKVAL( StageName , "Closed/Won") || ISPICKVAL( StageName , "Closed/Lost")) && (ISBLANK( Unqualified Date ) || ISBLANK( Marketing Qualified Date)), ( CloseDate) - DATEVALUE( CreatedDate), 0 )
Salesforce Formula:
Formula Ninjas Business Case
Sales reps are supposed to follow up with their accounts at least once in 30 days. How can I see a score card that allows me to see at a glance which accounts have been followed up on?
Solution We built seven fields to build out this whole process: Follow up Interval Days – By default this will be 30 days Initial Follow up Date – Need this as this shows the deadline for when an account is first added Follow up Status Flag – This will hold our colorful flags for the score card. Account Last Activity Date – Inherit the system Last Activity Date Next Follow up Date – Shows the next deadline for follow up Days Since Last Activity – Calculates how long an account has not been followed up for Account Follow Up status – values in this field are used to populate the Follow Up Status Flag
We want to see a score card for all accounts that have not been followed up on for the last 30 days
Formula Ninjas Field Name Field Type Attribute Follow up Interval Days Number – Default 30 Read Only Initial Follow up Date Date Formula Follow up Status Text Formula Account Last Activity Date Date Formula Next Follow Up Date Date Formula Days Since Last Activity Number Formula Account Follow Up Status Text Formula - hidden
Formula Ninjas Formulas
• Initial Follow Up Date – CreatedDate + Follow_up_Interval_Days__c • Days Since Last Activity - IF( ISBLANK( LastActivityDate), (TODAY() -
Initial_Follow_up_Date__c ), ( TODAY() - LastActivityDate) ) • Account Follow Up Status - IF( Days_Since_Last_Activity__c >
Follow_up_Interval_Days__c , "Red", "Green") • Follow Up Status - CASE( Account_Followup_Status__c ,
"Red", IMAGE ("/servlet/servlet.FileDownload?file=01550000000rzRO", "Red", 16,16), “Blue", IMAGE ("/servlet/servlet.FileDownload?file=01550000000rzRG", “Blue", 16,16), "")
• Account Last Activity Date – LastActivityDate • Next Follow Up Date - LastActivityDate + Follow_up_Interval_Days__c • Days Since Last Activity - IF( ISBLANK( LastActivityDate), (TODAY() -
Initial_Follow_up_Date__c ), ( TODAY() - LastActivityDate) )
Formula Ninjas TaDa!
Formula Ninjas TaDa!
Francis Pindar Radnip
@radnip
All about Francis Pindar Solutions Architect with over 15 years in the web world. Now working on global Salesforce.com projects.
Founding member & architect of NCALT; eLearning service being used by over 120k British civil servants on a weekly basis.
My #DF13 Sessions today: – Salesforce Integration (Hilton 1pm-2pm) – Apex 10 Commandments (Moscone West 4pm – 4.45pm)
Spare time I work in film, theatre & TV and most recently producer for RENT in London. BAFTA nominated work on www.thelandofme.com
http://linkedin.com/in/francisuk/ or @radnip
FORMULA FROM HELL
Salesforce Enhanced Formula Editor
Installing Salesforce Enhanced Formula Editor
1. Load Google Chrome Browser 2. http://bit.ly/FormulaEditor 3. 4. Say thanks to Kyle Peterson (@kpeterson85)
DISTANCE() Formula Calculates the distance between two locations in miles or kilometers:
• Syntax: DISTANCE(mylocation1, mylocation2, “unit”)
• Examples: • DISTANCE(warehouse_location__c, store_location__c, “mi”)
• DISTANCE(warehouse_location__c, GEOLOCATION(37.775,-122.418), “km”)
Using distance with user location
Steve Molis Epsilon
@stevemoforce
All about SteveMo
3 Time Salesforce MVP: 2011, 2012, 2013
Success Community: 1,700+ Best Answers
DeveloperForce: 400+ Solutions Authored
Pliny the Elder's owed: 2,100+
1 App named after me “Thanks Reid Carlberg!”
0 Salesforce Admin or Developer Certifications
Self-Taught Salesforce Administrator/Developer
Community College Drop-Out: 0.67 GPA * * Margin of error: +/- 0.67
> 1 way to deal with a Picklist field (or skin a cat) *
• ISPICKVAL • CASE • TEXT
• ISBLANK • VALUE • BEGINS • CONTAINS
* No Animals Were Harmed in the Making of These Formulas
> 1 way to deal with a Picklist field (or skin a cat) *
> 1 way to deal with a Picklist field (or skin a cat) *
Function: ISPICKVAL (aka “old faithful”) Description: Determines if the value of a picklist field is
equal to a text literal you specify.
Example:
IF(ISPICKVAL(Weather, "Zombies!"), "RUN!!!", IF(ISPICKVAL(Weather, "HOT"), "Go Swimming", IF(ISPICKVAL(Weather, "WARM"), "Play Wiffle Ball", IF(ISPICKVAL(Weather, "COLD"), "Sit by the fire", "Send out for Pizza"))))
Function: CASE
Description: Checks a given expression against a series of values.
Example:
CASE(Weather, "Zombies!", "RUN!!!", "HOT", "Go Swimming", "WARM", "Play Wiffle Ball", "COLD", "Sit by the fire", "Send out for Pizza")
> 1 way to deal with a Picklist field (or skin a cat)
Function: TEXT Description: Converts picklist values to text in Validation Rules, Formula Fields, and Workflow Field Updates.
So you can do stuff like this…
> 1 way to deal with a Picklist field (or skin a cat)
Problem: Make a custom picklist field called “Loss Reason” required if the Opportunity Stage is Closed/Lost.
> 1 way to deal with a Picklist field (or skin a cat)
Solution: Create a Validation Rule Formula: AND( TEXT(StageName) = "Closed Lost", ISBLANK(TEXT(Loss_Reason__c)))
> 1 way to deal with a Picklist field (or skin a cat)
Problem: Calculate the Opportunity Discount Amount from Discount% (a custom picklist field)
> 1 way to deal with a Picklist field (or skin a cat)
Solution: Create a custom field Datatype: Formula Result: Currency Formula: Amount * ( VALUE( TEXT( Discount_Pct__c )) / 100)
> 1 way to deal with a Picklist field (or skin a cat)
Tip: Create a custom Enhanced List View or Report to double-check your Formulas
> 1 way to deal with a Picklist field (or skin a cat)
Problem: Require priority 1-3 for any “Existing Customer” opportunities.
> 1 way to deal with a Picklist field (or skin a cat)
Solution: Create a Validation Rule Formula: AND( BEGINS(TEXT(Type),"Existing"), VALUE(TEXT( Priority__c )) > 3))
> 1 way to deal with a Picklist field (or skin a cat)
Problem: Do not allow “Renewal” Cases for Inactive Accounts
> 1 way to deal with a Picklist field (or skin a cat)
Solution: Create a Validation Rule Formula: AND(Account.Active__c = FALSE, CONTAINS( TEXT(Status) , "Renewal"))
Formula Ninjas Resources
• Introduction to Formulas - http://wiki.developerforce.com/page/An_Introduction_to_Formulas
• Formulas Quick Reference Guide - https://na13.salesforce.com/help/pdfs/en/salesforce_formulas_cheatsheet.pdf
• Useful Validation Rules - http://na13.salesforce.com/help/pdfs/en/salesforce_useful_validation_formulas.pdf
• Building a Cross Object Formula - https://help.salesforce.com/HTViewHelpDoc?id=fields_creating_cross_object_advanced.htm&language=en_US
Deepa Patel
President @halakconsulting
Steve Molis Francis Pindar
Salesforce Administrator @SteveMoForce
Technical Consultant @radnip
Do Not Forget!
Please fill out the Evaluation Forms