You are here:
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
| Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available in: Enterprise, Unlimited, and Developer Editions |
| Available for an additional cost in: Professional Edition with Web Services API Enabled |
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 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.
Did this article solve your issue?
Let us know so we can improve!

