---
schema_version: "1"
id: 50377f733717cf3f31efe454a3874479a2128b66a0daf6f3f00c0b8bc956f9e9
title: Sample Case Management Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/useful_advanced_formulas_case_mgmt.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_case_mgmt.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a8560a402705b6e4d98e207c20a122ca538c112229d6f2cd695913ac5eb7d506
description: Create autodial links, categorize cases by age, measure data completeness, and suggest agent prompts or offers based on purchase and support information.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Sample Case Management Formulas

Create autodial links, categorize cases by age, measure data completeness, and suggest agent prompts or offers based on purchase and support information.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

For details about using the functions included in these samples, see [Formula Operators and Functions](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&release=264.0.0&type=5 "Use these operators and functions when building formulas. All functions are available everywhere that you can include a formula, such as formula fields, validation rules, approval processes, and workflow rules, unless otherwise specified.").

## Autodial

This formula 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 what number to call and the last Phone merge field uses the value of the Phone field as the linkable text the user clicks to dial.

```
HYPERLINK("http://servername/call?id=" & Id & "&phone=" &
                      Phone, Phone)
```

## Case Categorization

This formula displays a text value of “RED,” “YELLOW,” or “GREEN,” depending on the value of a case age custom text field.

`IF(DaysOpen__c > 20, "RED", IF(DaysOpen__c > 10, "YELLOW",  "GREEN") )`

## Case Data Completeness Tracking

This formula calculates the percentage of specific custom fields that contain data. The formula checks the values of two custom number fields: Problem Num and Severity Num. If the fields are empty, the formula returns the value “0.” The formula returns a value of “1” for each field that contains a value and multiplies this total by fifty to give you the percentage of fields that contain data.

`(IF(ISBLANK(Problem_Num__c), 0, 1) + IF(ISBLANK(Severity_Num__c ), 0,1)) * 50`

## Suggested Agent Prompts

This formula prompts an agent with cross-sell offers based on past purchases.

`CASE(Product_Purch__c,  "Printer", "Extra toner cartridges", "Camera", "Memory cards",  "Special of the day")`

## Suggested Offers

This formula suggests a product based on the support history for a computer reseller. When the Problem custom field matches a field, the formula field returns a suggestion.

`CASE(Problem__c,  "Memory", "Suggest new memory cards", "Hard Drive failure", "Suggest new hard drive with tape backup",  "")`