---
schema_version: "1"
id: 17eae429c74e2425d41e4650a39504e0e10da458f214b7b9e8f2e99d9b3abb1e
title: Functions in Salesforce Spiff
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_functions.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_functions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f2f617d0e09a66e75fd25514ed6d23c48efbf1c8b626a8f03683b6e1bfe9d582
description: Salesforce Spiff Designer provides a library of functions for calculating values and handling different data types.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Functions in Salesforce Spiff

Salesforce Spiff Designer provides a library of functions for calculating values and handling different data types.

### 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: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</td></tr></tbody></table>

Access the function library from the top middle panel in Designer by clicking the functions icon in the formula bar.

![Function library opened from a worksheet in Designer](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_functions_library.png)

When you select a datasheet, worksheet, table, or filter in Designer, the right panel shows the functions tab.

![Functions tab opened from a worksheet in Designer](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_functions_tab.png)

Selecting a function shows its description, syntax, examples, and arguments.

![Function tab, showing details for the quota function](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_functions_details.png)

When you enter the name of a function in the formula bar, the function name turns yellow if the function is recognized and a tooltip shows the expected syntax and arguments. To show more details about the function without searching for it, click the dropdown menu. Selecting the function in the formula bar opens the function library in the right panel.

![Formula bar in a worksheet, showing a tooltip with details for the date\_between function](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_functions_formula.png)

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/images/icon_tip.png)

Tip When you enter the name of a function, move the cursor to the start of the function name by selecting the first few letters of the function and pressing the left arrow key.

- **[Year, Quarter, or Month Functions](https://help.salesforce.com/s/articleView?id=sales.spiff_functions_date_period.htm&release=264.0.0&type=5)**  
    Functions for the beginning and end of a year, quarter, or month in Salesforce Spiff help you compare data during the specified time period. Combine these functions with other functions that process dates.
- **[Team and User Objects in Salesforce Spiff Functions](https://help.salesforce.com/s/articleView?id=sales.spiff_functions_team.htm&release=264.0.0&type=5)**  
    Reference teams and teams in some Salesforce Spiff functions.
- **[Null and Zero in Salesforce Spiff Functions](https://help.salesforce.com/s/articleView?id=sales.spiff_functions_zero.htm&release=264.0.0&type=5)**  
    Some functions in Salesforce Spiff divide by zero, return null, or accept null as an argument.
- **[Selecting One Item or Record from a List or Array in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_functions_one.htm&release=264.0.0&type=5)**  
    Functions in Salesforce Spiff commission logic often require that you reference one item or record in a list or array, such as the first invoice, latest payment record, or current user. Sometimes you must make sure that you select an item even when the list or filter contains only one item.
- **[Dot Syntax in Salesforce Spiff Formulas](https://help.salesforce.com/s/articleView?id=sales.spiff_dot_syntax.htm&release=264.0.0&type=5)**  
    Functions and formulas in Salesforce Spiff use dot syntax for efficiently referencing fields, relationships, Team object details, and data from multiple records.
- **[Salesforce Spiff Function Reference](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref.htm&release=264.0.0&type=5)**  
    Each function in Salesforce Spiff requires specific syntax and arguments.
- **[Helper Functions in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_functions_helper.htm&release=264.0.0&type=5)**  
    Helper functions in Salesforce Spiff save time and provide clarity. A helper function is interchangeable with a standard function, but uses simpler syntax so you can create logic more easily.