You are here:
managers
Returns a list of user objects for managers of one or more teams in Salesforce Spiff, based on a specific date range and levels of team hierarchy. To return team members and managers, use the members() 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
managers(team_or_teams, date_or_date_range, 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 managers that have ever been part of the team or teams. |
| level_or_level_range | Optional | An integer that specifies the number of levels in the team hierarchy, relative to team_or_teams, to return manager 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 managers for Team A and Team B for the first half of the year.
=managers(["Team A", "Team B"], [date("2024-01-01"), date("2024-06-30")])Return the current managers for the team above Team A in the hierarchy.
=managers("Team A", Today, -1)Return managers one level above and one level below Team A.
=managers("Team A", Today, [-1, 1])See Also
Did this article solve your issue?
Let us know so we can improve!

