---
schema_version: "1"
id: 51f74a9352ab493097a2262ad0ec3ffe369a39b6ec9f49048b22bd0b95a0c9e7
title: Row-Versioned Calculation Matrices (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_row_versioned_calculation_matrices.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_row_versioned_calculation_matrices.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9f11d06ec93dc3fa66ed5d766b729f18cdb2f5cf5cb484ef39b13fe6c0536ffa
description: For the managed package runtime, if you're wrangling large calculation matrices that can't be sectioned cleanly into groups and subgroups, you can create calculation matrices that are versioned by row.
products:
  - Omnistudio
release: "264"
---
# Row-Versioned Calculation Matrices (Managed Package)

For the managed package runtime, if you're wrangling large calculation matrices that can't be sectioned cleanly into groups and subgroups, you can create calculation matrices that are versioned by row.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

For example, you've got a matrix that creates a rating factor per ZIP (postal) code, which includes all ZIP codes in the United States. You want to be able to update ZIP codes individually or in small groups. This situation calls for a row-versioned calculation matrix.

Each row of this kind of calculation matrix gets assigned a start date when the matrix is created.

At execution time, Standard and Grouped Matrices both pull matrices by version, start date, end date, and priority at the calculation matrix level. In a row-versioned matrix, this all goes out the window.

At execution time, Vlocity checks the Start Date and End Date of each row in the row-versioned calculation matrix. If dates overlap on two versions of a row, the calculation uses the version with the highest Priority specified.

But Vlocity does still use the versions to manage the rows in a row-versioned calculation matrix.

When you update row-versioned calculation matrices, you can include changes to the rows that you need to update only. Vlocity uploads only the changed rows and shares the unchanged rows with both versions of the matrix.

What Vlocity does when you update rows is a little bit complicated. Here's how it works.

## First Version

The first version of a row-versioned calculation matrix looks almost the same as a standard calculation matrix. But some data is stored slightly differently by Vlocity. The Start Date / Time you enter is assigned to each row of the matrix individually.

## Second Version

Your second version of the CSV file can be the whole matrix that includes new and changed rows. Or your CSV can contain only the new and changed rows.

When you upload the second version, you give the new version of the matrix a different Start Date / Time. Vlocity gives all the new and changed rows in this version the new Start Date / Time.

Vlocity does not copy the unchanged rows to the new version of the calculation matrix. Instead, it shares the rows from version 1 of the matrix with version 2. That way, the unchanged rows are stored only once, which saves storage space.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

Vlocity shares rows only when both versions are enabled.

For example, if version 1 of a calculation matrix is not enabled, its row will not be shared with version 2.

You still see all the rows, both the rows shared from version 1 and the new and changed rows of version 2 when you view version 2.

You can also create a second version of the calculation matrix and manually change rows rather than upload them in a CSV. This works best if there are only a couple of changes required.

## Third Version and Beyond

You upload version 3 the same as you did version 2, and give it a different Start Date / Time than version 1 or version 2. Vlocity gives all the new and changed rows this Start Date / Time.

Vlocity does not copy the unchanged rows from previous versions. Instead, it shares rows from all previous version with the new version. So if you've uploaded version 3, you will see unchanged rows stored in version 1, rows changed in version 2 but not version 3 stored in version 2, and new and changed rows stored in version 3 only.

## Deleted Rows

In a scenario where you've got three versions of a row-versioned calculation matrix, here's what happens when you delete different rows from different versions:

- Action: In version 3, delete a row that you updated in version 3 that first existed in version 2.
    
    Result: Vlocity shares the version 2 row in version 3 of the matrix. The version 3 row is deleted.
- Action: In version 3, delete a row that has existed unchanged since version 1.
    
    Result: The row disappears from version 3 of the matrix. The row remains unchanged in version 1 and version 2.