Dreamfoce 2013 Formula Ninjas
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Dreamfoce 2013 Formula Ninjas

on

  • 591 views

Presented By Deepa Patel, Halak Consulting, LLC, Steve Molis, Epsilon, Francisc Pindar, Radnip

Presented By Deepa Patel, Halak Consulting, LLC, Steve Molis, Epsilon, Francisc Pindar, Radnip

Statistics

Views

Total Views
591
Views on SlideShare
589
Embed Views
2

Actions

Likes
2
Downloads
30
Comments
0

1 Embed 2

https://plus.google.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Dreamfoce 2013 Formula Ninjas Presentation Transcript

  • 1. Formula Ninjas Deepa Patel, Halak Consulting, LLC, President @halakconsulting Steve Molis, Epsilon, Salesforce Administrator @stevemorforce Francisc Pindar, Radnip, Technical Consultant @radnip
  • 2. 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.
  • 3. Deepa Patel Halak Consulting, LLC @halakconsulting
  • 4. 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/
  • 5. Formula Ninjas - Basics Traditional Formula Writing Compared to Writing Formulas in Salesforce
  • 6. Formula Ninjas - Basics Simple If Formula Statement Traditional Formula: If Apple = Salesforce Formula: then Good to Eat ELSE IF (Apple = "Red", "Good to Eat", "Not Good to Eat") Not Good to Eat END IF 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”.
  • 7. Formula Ninjas - Basics What do you do if you have nested if statements Traditional Formula: IF Apple = Salesforce Formula: then Sour If( Apple = "Green", "Sour"), ELSE If Apple = If (Apple = "Yellow", "Semi Sweet"), then Semi Sweet If (Apple = "Red", "Delicious"), ELSE If Apple = "Rotten" then Delicious ) ELSE ) Rotten END IF END IF END IF )
  • 8. Formula Ninjas - Basics Now what if we want to use “AND” in our formula Traditional Formula: Salesforce Formula: IF Apple = AND Apple = Good to Eat ELSE Not Good to Eat END IF 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...)
  • 9. Formula Ninjas - Basics Same applies to the “OR” criteria Traditional Formula: Salesforce Formula: IF Apple = OR Apple = Good to Eat = “Yes" ELSE Good to Eat = “No" END IF 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" ) Salesforce World: OR(value 1, value 2, value 3....) (value 1 || value 2 || value 3...)
  • 10. Formula Ninjas - Basics Now lets combine the "AND" & "OR" parameters IF Picklist value is "Closed/Won" OR "Closed/Lost" AND Marketing Qualified Date is not blank, then Calculate Close Date - Marketing Qualified Date Traditional Formula: 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
  • 11. Formula Ninjas - Basics Now lets combine the "AND" & "OR" parameters Salesforce Formula: 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 )
  • 12. Formula Ninjas - Basics Now lets combine the "AND" & "OR" parameters Salesforce Formula: 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 )
  • 13. Formula Ninjas - Basics Lets look at two "AND" statements and two "OR" statements Traditional Formula: IF (StageName = "Closed/Won" OR StageName = "Closed/Lost") AND (Unqualified Date = " " OR Marketing Qualified Date = " " ) then Calculate CloseDate - Created Date) End If
  • 14. Formula Ninjas - Basics Lets look at two "AND" statements and two "OR" statements Salesforce Formula: IF ( AND ( OR( ISPICKVAL( StageName , "Closed/Won"), ISPICKVAL( StageName , "Closed/Lost") ), OR ( ISBLANK( Unqualified Date ), ISBLANK( Marketing Qualified Date) ) ), ( CloseDate) - DATEVALUE( CreatedDate), 0 )
  • 15. Formula Ninjas - Basics Lets look at two "AND" statements and two "OR" statements Salesforce Formula: 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 )
  • 16. Formula Ninjas Business Case We want to see a score card for all accounts that have not been followed up on for the last 30 days 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
  • 17. Formula Ninjas Field Name Follow up Interval Days Initial Follow up Date Follow up Status Account Last Activity Date Next Follow Up Date Days Since Last Activity Account Follow Up Status Field Type Number – Default 30 Date Text Date Date Number Text Attribute Read Only Formula Formula Formula Formula Formula Formula - hidden
  • 18. 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) )
  • 19. Formula Ninjas TaDa!
  • 20. Formula Ninjas TaDa!
  • 21. Francis Pindar Radnip @radnip
  • 22. 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
  • 23. FORMULA FROM HELL
  • 24. Salesforce Enhanced Formula Editor
  • 25. Installing Salesforce Enhanced Formula Editor 1. Load Google Chrome Browser 2. http://bit.ly/FormulaEditor 3. 4. Say thanks to Kyle Peterson (@kpeterson85)
  • 26. 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”)
  • 27. Using distance with user location
  • 28. Steve Molis Epsilon @stevemoforce
  • 29. 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
  • 30. > 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
  • 31. > 1 way to deal with a Picklist field (or skin a cat) *
  • 32. > 1 way to deal with a Picklist field (or skin a cat) * Function: ISPICKVAL (aka “old faithful”) Function: CASE Description: Determines if the value of a picklist field is equal to a text literal you specify. Description: Checks a given expression against a series of values. Example: Example: IF(ISPICKVAL(Weather, "Zombies!"), "RUN!!!", CASE(Weather, IF(ISPICKVAL(Weather, "HOT"), "Go Swimming", "Zombies!", "RUN!!!", IF(ISPICKVAL(Weather, "WARM"), "Play Wiffle Ball", "HOT", "Go Swimming", IF(ISPICKVAL(Weather, "COLD"), "Sit by the fire", "WARM", "Play Wiffle Ball", "Send out for Pizza")))) "COLD", "Sit by the fire", "Send out for Pizza")
  • 33. > 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…
  • 34. > 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.
  • 35. > 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)))
  • 36. > 1 way to deal with a Picklist field (or skin a cat) Problem: Calculate the Opportunity Discount Amount from Discount% (a custom picklist field)
  • 37. > 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)
  • 38. > 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
  • 39. > 1 way to deal with a Picklist field (or skin a cat) Problem: Require priority 1-3 for any “Existing Customer” opportunities.
  • 40. > 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))
  • 41. > 1 way to deal with a Picklist field (or skin a cat) Problem: Do not allow “Renewal” Cases for Inactive Accounts
  • 42. > 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"))
  • 43. 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.p df • Building a Cross Object Formula https://help.salesforce.com/HTViewHelpDoc?id=fields_creating_cross_object_a dvanced.htm&language=en_US
  • 44. Deepa Patel Steve Molis Francis Pindar President @halakconsulting Salesforce Administrator @SteveMoForce Technical Consultant @radnip
  • 45. Do Not Forget! Please fill out the Evaluation Forms