---
schema_version: "1"
id: 1b79a8af43abedf711db3c9fdd5c7618a7c2f99198d43c6b1d84b9d6ae6ca352
title: users_in_team
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_users_in_team.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_users_in_team.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5cb39aaac96fa67d01c23fd7b292096f9211d7c7f8a2d546d8c634c992d24632
description: Returns a list of user IDs from a team in Salesforce Spiff. Combine other functions to count the number of reps on a team or sum team member quotas. For a rollup of team members, use a Guided Rollup instead.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# users\_in\_team

Returns a list of user IDs from a team in Salesforce Spiff. Combine other functions to count the number of reps on a team or sum team member quotas. For a rollup of team members, use a Guided Rollup instead.

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

```
users_in_team(team, start_date, end_date)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| team | Required | The name of a team that's defined on the Teams page in Spiff. Enclose the name in double quotes. |
| start\_date | Required | The lower bound of the date range to check. This argument supports any date functions. |
| end\_date | Required | The upper bound of the date range to check. This argument supports any date functions. |

## Example

Count the number of users on a team, where the team name is defined in a TeamName custom field on the Plan object.

```
=count(users_in_team(plan.TeamName))
```

Sum the quotas of all team members.

```
=sum(quotas(users_in_team(plan.TeamName), "CorporateAEQuarterlyQuota"), amount)
```

Sum the quotas of all team members for the current statement period.

```
=sum(quotas(users_in_team(plan.TeamName, statement_period.start_date, statement_period.end_date), "CorporateAEQuarterlyQuota"), amount)
```

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

Note These examples assume that all team members of the same plan are on the same team, so the TeamName custom field on the Plan object returns all the data you want. If a plan has members who are on different teams, create a custom field on Plan Assignment instead and assign a team name for each member individually from the Plans tab in Spiff.

#### See Also

- [count](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_count.htm&release=264.0.0&type=5 "Returns the total number of items in a list or data filter in Salesforce Spiff.")
- [quotas](https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_quotas.htm&release=264.0.0&type=5 "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.")
- [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.")