--- title: "Targeted Sale (TS) engine" slug: "targeted-sale-ts-engine" description: "The Targeted Sale (TS) engine generates an aggregation of historical sales by customer ID and product group. This aggregation is the basis of Sales IQ’s Inventory and Substitution output worksheets." updated: 2024-04-08T13:56:23Z published: 2024-04-08T13:56:23Z canonical: "docs.zilliant.com/targeted-sale-ts-engine" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zilliant.com/llms.txt > Use this file to discover all available pages before exploring further. # Targeted Sale (TS) engine The Targeted Sale (TS) engine generates an aggregation of historical sales by customer ID and product group. This aggregation is the basis of Sales IQ’s **[Inventory](/v1/docs/inventory-inv-output-worksheet)** and **[Substitution](/v1/docs/substitution-sub-output-worksheet)** output worksheets. ## Configuration To configure this engine, adjust the following components. ### Engine Parameters To view the parameter settings for this engine, go to the Engine Parameters worksheet. Depending on your user permissions, the worksheet will resemble the following image. ![Engine Parameters worksheet](https://cdn.document360.io/24f960e8-3c1c-4c18-a2c6-83b6ae4aab84/Images/Documentation/Engine%20Parameters.png?sv=2026-02-06&spr=https&st=2026-11-12T13%3A12%3A11Z&se=2026-11-12T14%3A12%3A11Z&sr=c&sp=r&sig=8YLHjOIfU99qfEHYHAv1F8kVuzVvbPlNGkbGTWgle0s%3D) The TS engine uses the **Baseline_Periods** parameter associated with the Action Type Id of *TS*. **Baseline_Periods** specifies the number of historical aggregation periods used to calculate this action type’s Baseline time period. To view an action type’s Baseline time period, go to the Aggregated Time Periods worksheet. To update an action type’s Baseline time period, run the **Prep Data and Update Time Periods** worksheet action. ### Volume Metric To view the volume metric for this engine, go to the **Sales IQ** > **Engine Config** > **Sales IQ Transactions Aggregated** worksheet. Depending on your user permissions, the worksheet will resemble the following image. ![SIQ Txns Aggregated worksheet](https://cdn.document360.io/24f960e8-3c1c-4c18-a2c6-83b6ae4aab84/Images/Documentation/SIQ%20Txns%20Aggregated%20worksheet.png?sv=2026-02-06&spr=https&st=2026-11-12T13%3A12%3A11Z&se=2026-11-12T14%3A12%3A11Z&sr=c&sp=r&sig=8YLHjOIfU99qfEHYHAv1F8kVuzVvbPlNGkbGTWgle0s%3D) The **TS Volume Metric** [calculated column](/v1/docs/calculated-columns) defines the volume metric used in the TS engine. The following default calculation uses revenue normalized with any applicable currency conversions. Update this calculation as needed. ``` (CASE WHEN ([Currency Conversion Rate] > 0) THEN [Currency Conversion Rate] ELSE 1 END) * [Revenue] ``` ### Product Group To view how this engine groups products, go to the Sales IQ Products worksheet and navigate to the **TS Product Group** [calculated column](/v1/docs/calculated-columns). Depending on your user permissions, the worksheet will resemble the following image. ![SIQ Products worksheet](https://cdn.document360.io/24f960e8-3c1c-4c18-a2c6-83b6ae4aab84/Images/Documentation/SIQ%20Products%20worksheet.png?sv=2026-02-06&spr=https&st=2026-11-12T13%3A12%3A11Z&se=2026-11-12T14%3A12%3A11Z&sr=c&sp=r&sig=8YLHjOIfU99qfEHYHAv1F8kVuzVvbPlNGkbGTWgle0s%3D) Edit the calculated column to use any available product attributes that best define the product grouping level for the TS engine. This engine excludes products configured with a *null* value from engine outputs. Note This column does not support commas or slashes, as these special characters can cause issues when retrieving analytics for published [actions](/v1/docs/about-campaigns#actions). ## Outputs To view the results of running the TS engine, go to the TS Output worksheet. Depending on your user permissions, the worksheet will resemble the following image. ![TS Output worksheet](https://cdn.document360.io/24f960e8-3c1c-4c18-a2c6-83b6ae4aab84/Images/Documentation/TS%20Engine%20Output%20worksheet.png?sv=2026-02-06&spr=https&st=2026-11-12T13%3A12%3A11Z&se=2026-11-12T14%3A12%3A11Z&sr=c&sp=r&sig=8YLHjOIfU99qfEHYHAv1F8kVuzVvbPlNGkbGTWgle0s%3D) This engine generates results for every Customer Id + Product Group combination observed during the Baseline time period. This worksheet contains the following metric fields: - **Baseline Volume**—Total volume of the Baseline time period. The engine measures this volume in the TS Volume Metric. - **Baseline Transaction Count**—Total number of transactions during the Baseline time period. - **Last Sale Period**—Most recent aggregation period with an observed transaction. To navigate, go to **Sales IQ** > **Engine Config** > **Engine Parameters**. To navigate, go to **Sales IQ** > **Engine Runner** > **Aggregated Time Periods**. To navigate, go to **Sales IQ** > **Engine Config** > **Sales IQ Products**. To navigate, go to **Sales IQ** > **Outputs** > **TS Output**.