# Publish The Matrix

You can publish a Matrix to make it accessible directly within Salesforce. Once published, you can add it to a **Salesforce App page**, **Home page**, or **Record page** using the **Lightning App Builder**.

## Publish a Matrix as an App Page

Once published, you can add the Matrix to a Salesforce App page and access it directly from your app’s navigation bar. When the Matrix runs, you’ll need to **select the data** you want to view.

### Before You Begin

* A Matrix must be created before it appears in the **Lightning App Builder** component list.
* Ensure you have the required Salesforce permissions to view and interact with the Matrix.

### Steps to Publish a Matrix

{% stepper %}
{% step %}
**Open Lightning App Builder**

* In Salesforce, go to **Setup → Lightning App Builder**.
* Click **New** to create a new Lightning page.
* Select **App Page** as the page type, then click **Next**.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FJZvdtZshyM369gOI4545%2FCreate%20Lightning%20App%20for%20Matrix%20p1.gif?alt=media&#x26;token=3d34b5fa-be88-4db8-a492-97a19f56b326" alt=""><figcaption><p>Open Lightning App Builder</p></figcaption></figure>
{% endstep %}

{% step %}
**Set Page Details**

* Enter a **Label** for your page (for example, *Matrix Dashboard*), then click **Next**.
* Choose a **page template** (such as *One Region* or *Two Regions*), then click **Finish**.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FTCHe37Rscvjzpq15Ol56%2FCreate%20Lightning%20App%20for%20Matrix%20p2.gif?alt=media&#x26;token=8222fdb1-5fce-45f6-a2ee-aaa96847cc12" alt=""><figcaption><p>Set Page Details</p></figcaption></figure>
{% endstep %}

{% step %}
**Add the Valorx Matrix Component**

* In the **Components** panel, search for **Valorx Matrix**.
* Drag and drop the **Valorx Matrix** component into the desired region.
* From the **Valorx Matrix** dropdown, select the Matrix you want to display.
* Adjust the **component height** as needed.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2Fra6iV6oM0D5WYENf6Aiv%2FCreate%20Lightning%20App%20for%20Matrix%20p3.gif?alt=media&#x26;token=0b73d43f-ef0f-4488-8bca-b45cab115a31" alt=""><figcaption><p>Add the Valorx Matrix Component</p></figcaption></figure>
{% endstep %}

{% step %}
**Save and Activate**

* Click **Save**, then click **Activate** to assign the page to users or apps.
* Once activated, the Matrix becomes available within Salesforce for users to access and run.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FVHkIDMg8TVZ2go8JAQYO%2FCreate%20Lightning%20App%20for%20Matrix%20p4.gif?alt=media&#x26;token=3484f45b-5e5c-4d6c-ab6d-52bffe7c8a1d" alt=""><figcaption><p>Save and Activate</p></figcaption></figure>
{% endstep %}
{% endstepper %}

### After Publishing

Once the Matrix App Page is activated, you can make it available as a tab in the **Sales app** (or any other Salesforce app).

{% stepper %}
{% step %}
**Personalize the Navigation Bar**

* In Salesforce, click the **pencil icon** in the top-right corner to **Personalize your nav bar**.
* In the **Edit App Navigation Items** window, click **Add More Items**.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2F6KC8IjRc7t7MJO1UExhO%2FAfter%20Publish%20p1.gif?alt=media&#x26;token=4d0b8347-498b-4c01-b1b5-7d86eeec7930" alt=""><figcaption><p>Personalize the Navigation Bar</p></figcaption></figure>
{% endstep %}

{% step %}
**Add the Matrix Page**

* In the left panel, select **All**.
* Search for the **Lightning App Page** you created.
* Click the **+** icon next to your page name, then click **Add 1 Nav Item**.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FHLKclYXkVQcoFUIb3WON%2FAfter%20Publish%20p2.gif?alt=media&#x26;token=9bd54dd5-de6b-4f54-b801-b83388691a54" alt=""><figcaption><p>Add the Matrix Page</p></figcaption></figure>
{% endstep %}

{% step %}
**Save and Access the Matrix Page**

* Click **Save** to apply your changes.
* From the top navigation bar, click the **More** dropdown and select your newly added **Matrix page**.

Your published Matrix now appears as a **tab or page** within the Sales app, ready for users to access and interact with.&#x20;

{% hint style="info" %}
To run the Matrix, you’ll need to **select the data** you want to view.
{% endhint %}

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FI92FqlykOAIBU9tA6QuU%2FAfter%20Publish%20p3.gif?alt=media&#x26;token=1757cd44-f1ba-4f7c-bd68-2547ebc2eec2" alt=""><figcaption><p>Save and Access the Matrix Page</p></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## Publish a Matrix on a Record Page

You can display a Matrix directly on a Salesforce Record Page (for example, Account, Opportunity, or any custom object). The Matrix automatically shows data based on the record.

### **Steps to Add a Matrix to a Record Page**

{% stepper %}
{% step %}
**Open the Record Page**

* Open any record (for example, an Account).
* Click the **⚙️ gear icon** and select **Edit Page**.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FKx2VFDuqfOJUixLCwBA1%2FPublish%20Record%20Page%20p1.gif?alt=media&#x26;token=020be462-a26d-4be3-bf00-770deddc6177" alt=""><figcaption><p>Open the Record Page</p></figcaption></figure>
{% endstep %}

{% step %}
**Add and Configure the Valorx Matrix Component**

* In the **Lightning App Builder**, search for **Valorx Matrix** in the **Components** panel.
* Drag and drop the **Valorx Matrix** component into the desired section (for example, a new tab or region).
* From the **Valorx Matrix** dropdown, select the Matrix you want to display.
* Adjust the **component height** if needed.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2FKH22XbDKsv5q7aKpzlo9%2FPublish%20Record%20Page%20p2.gif?alt=media&#x26;token=8363b6b7-116c-4f1a-a16f-dc2c39c8873e" alt=""><figcaption><p>Add and Configure the Valorx Matrix Component</p></figcaption></figure>
{% endstep %}

{% step %}
**Configure and Save**

* From the **Valorx Matrix** dropdown, select the Matrix to display.
* Adjust the **component height** if needed.
* Click **Save**, then click **Activate**.

Once activated, the Matrix appears on the record page and automatically displays data related to the record.

<figure><img src="https://2237973035-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F65f4C4H8V5e0YV342mwp%2Fuploads%2Fx4Rhf2WfrN7kI5Z7zptp%2FPublish%20Record%20Page%20p3.gif?alt=media&#x26;token=ced92d73-f449-4234-bd50-dcd6b9e52a78" alt=""><figcaption><p>Configure and Save</p></figcaption></figure>
{% endstep %}
{% endstepper %}

#### Notes

* You can create multiple pages, each displaying a different Matrix.
* To update or replace a Matrix later, open the Lightning App Builder and select a different Matrix from the dropdown.
