You are here:
members
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.
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
members(team_or_teams, date_or_date_range, include_managers, level_or_level_range)Arguments
| Argument | Required? | Description |
|---|---|---|
| team_or_teams | Required | A team or list of teams. Enclose team names in double quotes, exactly as they appear on the Teams page in Spiff. For a list of teams, enclose the list in brackets and separate values with commas, such as ["Team A", "Team B"]. |
| date_or_date_range | Optional | The time period for the team data. If you specify an individual date, this function uses the beginning and end of the day for the date range. To specify a range of dates, enclose a list in brackets and separate values with commas, such as [BeginningOfYear, date("2025-02-01")]. This argument supports other date functions. The default value is all, which returns all team members that have ever been part of the team or teams. |
| include_managers | Optional | A Boolean that specifies whether to include managers in the team member records. |
| level_or_level_range | Optional | An integer that specifies the number of levels in the team hierarchy, relative to team_or_teams, to return user records for. To move up in the team hierarchy, specify a negative value. The default value is 0, which means that the function returns only direct managers for the team_or_teams. To specify a range of levels, starting with the highest level, enclose a list in brackets and separate values with commas, such as [-1, 1]. |
Examples
Return the team members for Team A and Team B for the first half of the year.
=members(["Team A", "Team B"], [date("2024-01-01"), date("2024-06-30")])Return the current team members for the team above Team A in the hierarchy.
=members("Team A", Today, -1)Return team members one level above and one level below Team A.
=members("Team A", Today, [-1, 1])Sum quotas for Team A for the year. Combine the sum(), quotas(), and members() functions. The quotas() function requires a team object, which the members() function provides.
=sum(quotas(members("Team A"), "TeamAQuota", beginning_of_year(statement_period.start_date), end_of_year(statement_period.start_date)), amount)Did this article solve your issue?
Let us know so we can improve!

