---
schema_version: "1"
id: a505c87fb3173d03614094d23fb55679dbf2680040cb0767ad7688a7f5154389
title: quotas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_quotas.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_quotas.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2c32bb8c8d9e3ea90c62b80b3edc176fe93090e13b3ac153a6a191d1ed4cb802
description: Returns a list of quota values from a quota table in Salesforce Spiff. The quota values are for a specific user in a specific time period.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# quotas

Returns a list of quota values from a quota table in Salesforce Spiff. The quota values are for a specific user in a specific time period.

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

```
quotas(users_or_users, quota_name, start_date, end_date)
```

## Arguments

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:20%">
          <col style="width:20%">
          <col style="width:60%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d17286e105">Argument</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d17286e108">Required?</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d17286e111">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Argument" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e105 "><samp class="parmname">user or users</samp></td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e108 ">Optional</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e111 ">
              <p>The user or list of users to return quota values for.
              </p>
              <ul>
                <li>To return quota values for all users, use the <code>null</code> keyword, <code>=quotas(null)</code>.</li>

                <li>To return quota values for the current rep, use the <code>rep</code> keyword, <code>=quotas(rep)</code>. This value is the default behavior when you don't specify a user or list of users.</li>

                <li>To return values for a different user, reference the rep's User object.</li>

                <li>To return values for an entire team, use the <code>members()</code> function.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Argument" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e105 "><samp class="parmname">quota_name</samp></td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e108 ">Optional</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e111 ">The name of a quota from a quota table, enclosed in double quotes. This argument updates automatically when the name of the quota table changes. To specify a list of multiple quota tables, enclose the list in brackets with comma-separated values.</td>

          </tr>
          <tr class="">
            <td data-label="Argument" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e105 "><samp class="parmname">start_date</samp></td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e108 ">Optional</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e111 ">The lower bound of the date range to get quota values for. This argument supports any date functions. To specify a date as a string in YYYY-MM-DD format, use the <code>date()</code> function and enclose the string in double quotes.</td>

          </tr>
          <tr class="">
            <td data-label="Argument" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e105 "><samp class="parmname">end_date</samp></td>

            <td data-label="Required?" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e108 ">Optional</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d17286e111 ">The upper bound of the date range to get quota values for. This argument supports any date functions. To specify a date as a string in YYYY-MM-DD format, use the <code>date()</code> function and enclose the string in double quotes.</td>

          </tr>
        </tbody>
      </table>

## Considerations

Combine the `sum()` function with the `quotas()` function so you can sum a list of quota values.

## Examples

Return quota values for a specific user, Teresa Lee. Create a data filter on the User object that contains only the rep, and use the `single()` function within the `quotas()` function to select the user from the data filter's list.

```
=quotas(single(TeresaLee), "CorporateAEQuarterlyQuota")
```

Return quota values for the current rep for the calendar year.

```
=quotas(rep, "CorporateAEQuarterlyQuota", beginning_of_year(statement_period.start_date), end_of_year(statement_period.end_date))
```

Return values for all users from multiple quota tables.

```
quotas(null, ["CorporateAE", "EnterpriseAE"])
```

Return values for the current rep for the current quarter.

```
quotas(rep, "CorporateAE", beginning_of_quarter(statement_period.start_date), end_of_quarter(statement_period.end_date))
```

Return quarter-to-date quota values.

```
quotas(rep, "CorporateAE", beginning_of_quarter(statement_period.start_date), statement_period.end_date)
```

Sum quotas in the fiscal year.

```
=sum(quotas(rep, "CorporateAE", StartOfFiscalYear, EndOfFiscalYear), amount)
```

Sum all team member quotas.

```
TeamManaged =choose(1, direct_manager_of(BeginningOfPeriod, EndOfPeriod))
UsersInManagedTeam =users_in_team(TeamManaged, BeginningOfPeriod, EndOfPeriod)
SumTeamQuotas =sum(quotas(UsersInManagedTeam, "QuotaTable", BeginningOfPeriod, EndOfPeriod), amount)
```

Sum team member quotas in different currencies.

```
sum(quotas(members("team"), "QuotaTable", beginning_of_quarter(statement_period.start_date), end_of_quarter(statement_period.end_date)), convert_currency(amount, "USD", statement_period.start_date))
```

#### See Also

- [members](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_members.htm&release=264.0.0&type=5 "Returns a list of user objects for users who belong to one or more teams in Salesforce Spiff, based on a specific date range and levels of team hierarchy. Optionally return both managers and team members or team members only. To return managers only, use the managers() function.")
- [single](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_single.htm&release=264.0.0&type=5 "Returns the first and only record of a list in Salesforce Spiff. This function validates that only one record is returned and converts the list of records into an individual record.")
- [sum](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_sum.htm&release=264.0.0&type=5 "Calculates a total value from a list of numbers in Salesforce Spiff. This function works well with records in a data filter.")