---
schema_version: "1"
id: bfce8a3e843e4e4705facd0f2ed71210029173992291d0a1a3508ab316909344
title: error
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_error.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_error.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8f052113fb2df7d55a2bc2aac875d517255634776a283f1e6c734e5f2df79be9
description: Returns a custom message for a statement calculation error in Salesforce Spiff. This function stops statement calculations and helps you alert admins that information is missing or preventing the calculation from executing.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# error

Returns a custom message for a statement calculation error in Salesforce Spiff. This function stops statement calculations and helps you alert admins that information is missing or preventing the calculation from executing.

### 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>

## Syntax

```
error(message)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| message | Required | A string with the error message text, enclosed in double quotes. |

## Example

Show an error when a rep is missing an AE quota.

```
=if(CorpAEQuota != null, CorpAEQuota, error("Enter an AE Quota for this rep."))
```

![Example of an error when a rep is missing an AE Quota.](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_function_ref_error.png)