18 Apr 2016

formulas used in salesforce.com applications----Part6

Part6=======>>>Formulas for:::

• Opportunity Management
• Web Site Links


Opportunity Management

Create Event
Adds a link called "Create Event" that, when clicked, creates a new event that is associated with the current opportunity.

                                         |
                                         |
Formula------->HYPERLINK("00U/e?retURL=%2F006x0000001T8Om                               &what_id=" & {!Id}, "Create Event")

Opportunity Data Completeness
Calculates the percentage of your important opportunity fields that are being filled by your sales personnel. This formula field checks 5 fields to see if they are blank. If so, a zero is counted for that field. A "1" is counted for any field that contains a value and this total is divided by 5 (the number of fields evaluated).

                                           |
                                           |
Formula-------->(IF(ISNULL({!Maint_Amount__c}), 0, 1) +                                                 IF(ISNULL({!Services_Amount__c} ), 0,1) +                                             IF(ISNULL({!Discount_Percent__c} ), 0, 1) + 
                            IF(ISNULL({!Amount} ), 0, 1)+IF(ISNULL
                            ({!Timeline__c} ), 0, 1)) / 5

Opportunity Discounting with Approval
Add a "Discount Approved" checkbox to Opportunity. Sets up FLS so that only a sales ops exec can approve discounts. Uses conditional logic to check the value of the approval flag before calculating the commission.

                                           |
                                           |
Formula--------->IF({!Discount_Approved__c, ROUND({!Amount} –                                   {!Amount} * {!DiscountPercent__c}, 2), {!Amount})

Total Deal Size
Calculates the sum of maintenance and services amounts.

                                           |
                                           |
Formula--------->{!Amount} + {!Maint_Amount__c} +                                                          {!Services_Amount__c}

Completed Opportunity Fields
Calculates the percentage of your important opportunity fields that are being filled by your sales personnel. This formula field checks 5 fields to see if they are blank. If so, a zero is counted for that field. A "1" is counted for any field that contains a value, and this total is divided by 5 (the number of fields evaluated).
                                                       |
                                                       |

Formula---------->(IF(ISNULL({!Maint_Amount__c}), 0, 1) +                                                 IF(ISNULL({!Services_Amount__c} ), 0,1) +                                             IF(ISNULL({!Discount_Percent__c} ), 0, 1) + 
                              IF(ISNULL({!Amount} ), 0, 1)+IF(ISNULL(
                              {!Timeline__c} ), 0, 1)) / 5

Revenue Display (no "$")
Returns the expected revenue amount of an opportunity in text format without a dollar sign. For example, if the Expected Revenue of a campaign is "$200,000," this formula field displays "200000."

                                               |
                                               |
Formula----------->TEXT({!ExpectedRevenue})

Expected Product Revenue
Calculates total revenue from multiple products, each with a different probability of closing.
                                               |
                                               |
Formula--------->{!ProductA_probability__c} *                                                                     {!ProductA_revenue__c} + {!ProductB_probability__}                             * {!ProdB_revenue__c}

Shipping Cost by Weight
Calculates postal charges based on weight.

                                               |
                                               |
Formula--------->{!package_weight__c}*{cost_lb__c}

Professional Services Calculation
Estimates professional service fees at an average loaded rate of $1200 per day. Consulting Days is a custom field on Opportunity.

                                                |
                                                |
Formula--------->{!Consulting_Days__c} * 1200

WEB SITE LINKS

Web Site Link
Creates a link named "Company’s Website" that connects a user to the Web site address on the account record.

                                                |
                                                |
Formula-------->HYPERLINK({!Website}, "Company’s Website")

formulas used in salesforce.com applications----Part5

Part5=======>>>Formulas for:::

• Lead Management
• News Services

Lead Management

Auto dial
Creates a linkable phone number field that automatically dials the phone number when clicked. In this example, replace "servername" and "call" with the name of your dialing tool and the command it uses to dial. The merge field, {!Id} inserts the identifier for the contact, lead, or account record. The first {!Phone} merge field tells the dialing tool the number to call, and the last {!Phone} merge field uses the value of the Phone field as linkable text the user clicks to dial.

                                      |
                                      |
Formula----> HYPERLINK("http://server name/call?id=" & {!Id} &                                "&phone=" & {!Phone}, {!Phone})

Round-Robin Lead Assignment
Evenly distributes leads to a pool of users using a simple round-robin algorithm. This scenario applies the MOD function to the Lead Number field (a custom autonumber field with display format of {000000}, to produce a number that repeatedly cycles between 1 and the number of users in the round robin pool (3 in this example). After creating this formula field, you must create lead assignment rules based on it. For each value of the formula field (1, 2, or 3 in this example), you specify the user or queue assignment.

                                         |
                                         |
Formula---->MOD( VALUE({!Lead_Number__c} ), 3) + 1

Lead Aging (for open leads)
Checks to see if a lead is open and, if so, calculates the number of days it has been open by subtracting the date and time created from the current date and time. The result is the number of days open rounded to 0 decimal places. If the lead is not open, this field is blank.

                                          |
                                          |
Formula----->IF(ISPICKVAL({!Status} , "Open"), ROUND(NOW()-                                  {!CreatedDate}, 0), NULL)

Lead Data Completeness
Calculates the percent of your important lead fields that are being filled by your sales personnel. This formula field checks 2 fields to see if they are blank. If so, a zero is counted for that field. A "1" is counted for any field that contains a value and this total is divided by 2 (the number of fields evaluated). Lead_Num must be a numeric.
                                           |
                                           |
Formula----->( IF({!Phone} = "", 0, 1) + IF({!Email} = "",

                       0, 1) ) / 2

Lead Numbering
Returns a number for the text value in the auto-number field "Lead Number." This can be useful if you want to use the "Lead Number" field in a calculation, such as for round-robin or other routing purposes. Note that auto-number fields are text fields and must be converted to a number for numeric calculations.

                                            |
                                            |
Formula------>VALUE( {!Lead_Number__c} )

NEWS SERVICES

Google Search
Creates a Google search on Account Name.

                                             |
                                             |
Formula----->HYPERLINK("http://www.google.com/search?en&q="&                         {!Account_Name}, "Google")

Google News Search Company Name
Creates a Google news search on Account Name.

                                              |
                                              |
Formula------>HYPERLINK("http://www.google.com/news?en&q="&                           {!Account_Name}, "Google News")

Yahoo News Search
Creates a Yahoo news search on Account Name.

                                               |
                                               |
Formula------->HYPERLINK("http://news.search.yahoo.com/search/
                          news?p="&{!Account_Name}, "Yahoo News")

Yahoo Search
Creates a Yahoo search on Account Name.

                                                |
                                                |
Formula------->HYPERLINK("http://search.yahoo.com/search?p="&{!Account_Name}, "Yahoo Search")

BBC News
Searches for company information on BBC news on Account_name.

                                                 |
                                                 |
Formula-------->HYPERLINK("http://newssearch.bbc.co.uk/cgi-                                        bin/search/results.pl?scope=newsifs&tab=news&q="&                           {!Account_name}, "BBC News")

CNN News Search
Searches for company information on the CNN Web site on Account_name.

                                                   |
                                                   |
Formula------>HYPERLINK("http://websearch.cnn.com/search/search?                          source=cnn&invocationType=search%2Ftop&sites=
                         web&query="&{!Account_name}, "CNN News")

Forbes News Search
Searches for company information on Forbes online on Account_name.

                                                   |
                                                   |
Formula------->HYPERLINK("http://www.forbes.com/search/
                          results.jhtml?MT="&{!Account_name},"Forbes News")

11 Apr 2016

formulas used in salesforce.com applications----Part4

Part4=======>>>Formulas for:::

• Date Calculations
• Discounting
• Expense Tracking
• Financial Calculations
• Integration Links

Date Calculations

Day of the Year
Calculates today’s numeric day of the year (a number between 1 and 365)

                                    |
                                    |
Formula----->TODAY() – DATE(YEAR(TODAY()), 1, 1) + 1

Day of Week (number)
Calculates today’s day of the week as a number (0 = Sunday, 1 = Monday, 2 = Tuesday, etc.). This formula can be applied to any date field by substituting the date field instead of the TODAY function.

                                    |                               
                                    |
Formula----->MOD(TODAY() - DATE(1900, 1, 7), 7)

Day of Week (text)
Calculates today’s day of the week and displays as text. This formula can be applied to any date field by substituting the date field instead of the TODAY function.

                                     |
                                     |
Formula----->CASE(MOD( TODAY() - DATE(1900, 1, 7), 7), 0, "Sunday", 1, "Monday", 2, "Tuesday", 3, "Wednesday", 4, "Thursday", 5, "Friday", 6, "Saturday","Error")

DISCOUNTING

Opportunity Discounting
Calculates a discounted Opportunity amount using a simple percentage. This is a simplistic scenario where discount is applied at the Opportunity level, rather than the Opportunity Line level. Discount Percent is a custom field on Opportunity.

                                     |
                                     |
Formula----->ROUND({!Amount} – {!Amount} *                                                             {!DiscountPercent__c}, 2)

EXPENSE TRACKING

Mileage Expense Calculation
Calculates mileage expenses associated with visiting a customer site, at 35 cents per mile.

                                     |
                                     |
Formula------>Mileage Expense = {!Miles_Driven__c} * 0.35

Expense Number String Connect
Displays the text "Expense# " followed by the expense number. This is a text formula field that uses an expense number custom field.

                                     |
                                     |
Formula------>"Expense# "& {!ExpenseNumber__c}

FINANCIAL CALCULATIONS

Compound Interest
Calculates interest, compounded m times per year, you will have after t years.

                                      |
                                      |
Formula----->{!P} * ( 1 + {!R} / {!M} ) ^ ( {!T} * {!M) )

Continuously Compounding Interest
Calculates interest, if continuously compounded, you will have after t years.

                                      |
                                      |
Formula----->{!P} * EXP({!R} * {!T})

Payment Status
Determines if the payment due date is past and the payment status is "UNPAID." If so, returns the text "PAYMENT OVERDUE" and if not, leaves the field blank. This example uses a custom date field called Payment Due Date and a text custom field called Payment Status on contracts.

                                       |
                                       |
Formula------>IF(AND({!Payment_Due_Date__c} < TODAY(),{!Payment_Status__c} ="UNPAID") , "PAYMENT OVERDUE", null )

Payment Due Indicator
Returns the date five days after the contract start date whenever Payment Due Date is blank. Payment Due Date is a custom date field on contracts.

                                        |
                                        |
Formula------>NULLVALUE({!Payment_Due_Date__c} , {!StartDate}                             +5)

Rules-based Status Message
Uses conditional logic to display a "Payment Overdue" status message for open invoices.

                                          |
                                          |
Formula------>IF(AND({!PaymentDueDate__c} < TODAY(),                                              ISPICKVAL({!PaymentStatus},"UNPAID")), "PAYMENT                            OVERDUE", "")

INTEGRATION LINKS

Application API Link
Creates a link to an application outside Salesforce, passing the parameters so that it can connect to Salesforce via the API and create the necessary event.

                                           |
                                           |
Formula------>HYPERLINK("https://www.myintegration.com?sId="&                            GETSESSIONID() & "?&rowID="&{!Name} &                                              "action=CreateTask","Create a Meeting Request")

Skype Auto Dialer Integration
Creates a linkable phone number field that automatically dials the phone number via the Skype VOIP phone application. This example requires installation of the Skype application (a third-party product not provided by salesforce.com) on your desktop and modification of your PC’s registry to associate the "callto:" protocol with the Skype application.

                                               |
                                               |
Formula------>HYPERLINK("callto://+" & {!Country_Code__c} & {!Phone_Unformatted__c}, {!Phone})