---
schema_version: "1"
id: fa85d745639c937204782e1a27ba43b4f1747b4e5da72dfe5a823149f5618bc4
title: Data Relationships in Salesforce Spiff
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_relationship.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_relationship.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 398fd61abb09ddb6e9c585d6d34601f08716621028e81d509676b0640f82a74a
description: Salesforce Spiff organizes data used for calculating commissions in multiple separate tables. To calculate commission logic correctly or create data filters, establish relationships between tables. A relationship requires a field in each table with a common value. For example, to connect Deals with Accounts, the values of the Deals table's CustomerAccount field match the values of the Accounts table's external_id field.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Data Relationships in Salesforce Spiff

Salesforce Spiff organizes data used for calculating commissions in multiple separate tables. To calculate commission logic correctly or create data filters, establish relationships between tables. A relationship requires a field in each table with a common value. For example, to connect Deals with Accounts, the values of the Deals table's CustomerAccount field match the values of the Accounts table's external\_id field.

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

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

Tip You don't need to establish a relationship for every association between tables. Only establish a relationship for commission logic and data filters.

Each relationship is one-way, so the CustomerAccount field on the Deals table represents a one-way relationship from Deals to Accounts. To create a reciprocal relationship from Accounts to Deals, establish a separate relationship. You can reuse the same fields in both directions.

A relationship can be one-to-one, one-to-many, or many-to-many.

To view established relationships in Spiff, go to the Data tab in Designer and click **Data Relationships**. The relationship map visualizes your related tables and shows the type of each relationship. In the map, you can rearrange objects and switch between horizontal and vertical views.

![Data relationships map view](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_relationship.png)

- **[One-to-One and One-to-Many Relationships in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_relationship_types.htm&release=264.0.0&type=5)**  
    When you create one-to-one or one-to-many relationships in Salesforce Spiff, you can directly reference the related object's fields in data filters or payout rules.
- **[Set Up a Data Relationship in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_relationship_create.htm&release=264.0.0&type=5)**  
    To set up a relationship between two object data tables in Salesforce Spiff, select a field with a common value for both objects.
- **[Viewing Related Records from a Datasheet in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_relationship_datasheet.htm&release=264.0.0&type=5)**  
    The View Related Records option on a record in a Salesforce Spiff datasheet shows you the record’s relationships to records on other objects. You can also access a related record from the Fields tab under Data.
- **[Create a Related Field in a Datasheet](https://help.salesforce.com/s/articleView?id=sales.spiff_relationship_datasheet_create.htm&release=264.0.0&type=5)**  
    In a Salesforce Spiff datasheet, add a related field that references data from a related object.
- **[Traverse Multiple One-to-Many Relationships in Salesforce Spiff](https://help.salesforce.com/s/articleView?id=sales.spiff_relationship_traverse.htm&release=264.0.0&type=5)**  
    Return data for an object that's separated by multiple layers of a relationship in Salesforce Spiff.