---
schema_version: "1"
id: 25ca39d16836d36db41f9f8e0b2035a50b42b79e2d4e7d89eda3758a922f2eb3
title: Create a Line-By-Line Rule
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_rules_line_by_line_create.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_rules_line_by_line_create.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c378e660bbf6bc330a8c076fa31bd6826801b48a2badc22c1cd027d502d2f69d
description: Line-by-line rules apply a calculation to each item in a data filter. To get the total for the rule, the calculation output from each item in the data filter is summed.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Create a Line-By-Line Rule

Line-by-line rules apply a calculation to each item in a data filter. To get the total for the rule, the calculation output from each item in the data filter is summed.

### 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="d86506e77">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d86506e77 ">To create a line-by-line rule:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d86506e77 ">
              <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 a folder for the rule.
    1. In Designer, click the three dots next to the plan you’re creating the rule for, and click New **Folder**.
    2. Rename the rule folder.
2. Create a datasheet in the rule folder.
    1. Click the three dots next to the rule folder and click **New Datasheet**.
    2. From the right panel, select the object and filter, such as the Deals object and ClosedInPeriod filter.
    3. Rename the datasheet.
    4. Add fields such as ARR\_\_c and CloseDate to the datasheet.
        
        ![Plan datasheet showing fields](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_line_by_line_fields.png)
    5. Create a commission calculation. Add a commission field and enter a calculation.
        
        ```
        =CommissionRate*ARR__c
        ```
    6. If you don’t already have a commission rate calculation, hover over CommissionRate in the function bar, click **New Field**, and enter your calculation.
        
        ```
        =if(ARR__c >= 20000, 5%, 3%)
        ```
    7. Update the display name and format.
3. Add the new rule as a payout rule.
    1. Click a plan in the left panel and click **New Payout Rule**.
    2. Name the rule and select the commission calculation field as the payout amount.

After creating a line-by-line rule, calculate it.

#### See Also

- [Calculate a Line-By-Line or Lump-Sum Rule](https://help.salesforce.com/s/articleView?id=sales.spiff_rules_calculate.htm&release=264.0.0&type=5 "After adding a rule to a plan page, calculate the rule and view it on the rep statement.")