---
schema_version: "1"
id: 169b5af15d2d97853cba472ca48921ec69abe1ec0a9cf0eec854ec587dc0cc1c
title: Create a Team Attainment Rule for Managers
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_rules_team.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_rules_team.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a180f70a58abfdecdb156ec89cc8a4d91417bcd94446cdeea8dccd9cd570612a
description: Show a team’s attainment to their manager. Empower managers to proactively drive their team’s sales performance and influence their own commissions.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Create a Team Attainment Rule for Managers

Show a team’s attainment to their manager. Empower managers to proactively drive their team’s sales performance and influence their own commissions.

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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d86969e77">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d86969e77 ">To create a team attainment rule:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d86969e77 ">
              <p>A Spiff <a href="https://help.salesforce.com/s/articleView?id=sales.spiff_users_roles_and_permissions.htm&amp;release=264.0.0&amp;type=5" title="Give users the appropriate level of access so they can be successful in Salesforce Spiff, and enforce the principle of least privilege. Assign a default role to each user, or create custom roles with access to specific Spiff functionality.">user role</a> with this permission turned on.</p>
              <p style="margin-bottom:0;">Designer Configuration: Manage</p>
            </td>

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

1. Create data filters.
    1. Create a MyTeamsUsers filter that returns the reps in a team.
        
        ```
        contains(TeamAttainmentForManagers_Worksheet!MyTeamsIds, Id)
        ```
        
        The `MyTeamsIds` value is based on a worksheet calculation, `=transform_list(RepsInTeam, Id)`.
        
        The `RepsInTeam` value is based on a worksheet calculation, `=users_in_team(single(direct_manager_of))`.
        
        For Salesforce environments, the ID corresponds to the user ID. ‌For other configurations, use the appropriate ID field for your User object.
        
        ![Manager's team data filter](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/spiff/spiff_rules_attainment_managers_team.png)
    2. Create an AllUsers filter that returns all users and retrieves the ID for the rep on the manager's team.
        
        You can use any field on the User object for this filter, such as the Spiff\_User\_\_c field.
        
        ```
        Spiff_User__c = true
        ```
    3. Create a ClosedInQtr\_AllReps filter that returns deal attainment data for all users during the period.
        
        Remember to exclude any ownership within your data filter.
        
        ```
        InQuarter AND ClosedWon
        ```
2. Create these datasheet calculations by using the MyTeamsUsers data filter on the User object.
    1. Create a UserSum calculation that sums the total deals for the rep in the manager's team for the applicable period.
        
        The `let()` function returns the user ID of the rep and sums the deals closed in quarter by using the relevant amount field.
        
        ```
        =let(userID, Id, sum(filter(ClosedInQtr_AllReps, OwnerId = userId), Amount_USD))
        ```
    2. Create a UserQuarterlyQuota calculation that returns the quota value for the rep on the manager's team.
        
        The first calculation retrieves the user ID of the rep.
        
        ```
        =sum(quotas(ThisUser, "QuarterlyQuota"), amount)
        ```
        
        The second calculation uses the ID to return the quota value.
        
        ```
        =let(ThisUserId, Id, filter(AllUsers, Id = ThisUserId))
        ```
    3. Create a TeamMemberAttainment calculation that returns the team member’s attainment by dividing UserSum by UserQuarterlyQuota.
        
        ```
        =if(UserSum = 0, 0, UserSum / UserQuarterlyQuota)
        ```
3. Create worksheet calculations that are appropriate for your needs. Consider these examples.
    
    - A IsRepActiveInTeam calculation that determines whether a rep is active in the team.
        
        ```
        =in_team?(choose(1, direct_manager_of), id, statement_period.edn_date)
        ```
    - A HasRepAchievedTarget calculation that checks whether the team member's attainment is greater than or equal to 100%.
        
        ```
        =MyTeamUsers_TeamAtainmentForManagers!TeamMemberAttainment >= 100%
        ```
    - The TeamAttainment calculation displays the percentage of reps on the team achieving their target.
        
        ```
        =if(RepsAchievingTarget = 0, 0, RepsAchievingTarget / TotalRepsInTeam_EndofQtr)
        ```
4. Create a What-If? payout rule that uses any calculation from the data filter you created for the MyTeamsUser filter, and add the rule to a plan.
5. Showcase the calculations by adding them to a statement and updating all display names and formats.
    
    Consider adding emoji to the statement for added visual appeal.

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

#### See Also

- [Create a What-If? Rule](https://help.salesforce.com/s/articleView?id=sales.spiff_rules_what_if.htm&release=264.0.0&type=5 "Motivate reps to close deals with What-If? rules. Show reps potential commission earnings when they meet the criteria you define in your data filter. For example, let reps see the commission they can earn if they close all pipeline deals for the period.")
- [Customizing Statements in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_statement_design.htm&release=264.0.0&type=5 "Admins can customize the information shown in rep statements in Salesforce Spiff. Modify the metrics that are included in statements, change display names, freeze columns and adjust column widths on payout rule tables, and add some fun to the experience with emojis. Every rep on the same plan has the same statement layout, so editing a statement for a rep applies changes to everyone on the plan.")
- [Considerations for Adding Emoji to Statements](https://help.salesforce.com/s/articleView?id=sales.spiff_statement_emoji.htm&release=264.0.0&type=5 "Enhance communication, simplify complex information, and create an engaging experience for your reps with emoji. Help reps be more productive by presenting information that’s informative and visually engaging on commission statements.")