---
schema_version: "1"
id: ddd17406629362944f0f97343cbfb244eaa3a752c8603653a6f2bd5ad1650fde
title: Context Definition for Stock Rotation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/chrm_stock_context_definition.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.chrm_stock_context_definition.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a3034fc6001804bd00df5e568bd4c9fb1e16843f7f49094003c3f5284c7ba401
description: Use the preconfigured context definition, StockRotationExecutionContext, to provide the data structure and mapping required to identify eligible inventory and calculate stock rotation benefits. This definition allows for the execution of Stock Rotation rules, ensuring integration between Stock Rotation Executions, Stock Rotation Execution Line Items, and Stock Rotation Claims.
products:
  - Partner Cloud
  - Cross Cloud
  - Manufacturing
release: "264"
---
# Context Definition for Stock Rotation

Use the preconfigured context definition, StockRotationExecutionContext, to provide the data structure and mapping required to identify eligible inventory and calculate stock rotation benefits. This definition allows for the execution of Stock Rotation rules, ensuring integration between Stock Rotation Executions, Stock Rotation Execution Line Items, and Stock Rotation Claims.

### 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: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions that have Stock Rotation enabled.</td></tr></tbody></table>

The system calls the context definition whenever a user clicks **Simulate** or **Generate Claim** on the Stock Rotation Execution page. The context definition maps the data from Stock Rotation Execution Line Items (SREIs) and ensures it is persisted correctly. While the context definition handles the data mapping, the actual calculation of the "Calculated Amount" or the rebate claim is performed by the associated Expression Set.

By default, the system automatically uses the StockRotationExecutionContext template. You can customize the context definition to suit your specific business requirements. Users can clone or extend the default context definition to add extra fields. For more information, see [Context Definitions](https://help.salesforce.com/s/articleView?id=ind.context_service_context_definitions.htm&type=5&language=en_US).