> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mtrix as a data source

> Bring data from Mtrix to Nekt.

Mtrix is a business intelligence platform that provides data and analytics solutions, primarily focused on sales, distribution, and market trends. It helps companies monitor their performance, understand market dynamics, and make data-driven decisions.

<img height="30" src="https://mintcdn.com/nekt/v9kwBmofh8Iyyp07/assets/logo/logo-mtrix.png?fit=max&auto=format&n=v9kwBmofh8Iyyp07&q=85&s=2bfbb77da6d2746fbbb66ecc5f04d065" data-path="assets/logo/logo-mtrix.png" />

## Configuring Mtrix as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Mtrix option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

You'll need your Mtrix `Access Key` and `Secret Key` for this connection.

The following configurations are available:

* **Access Key**: The access key to authenticate against the Mtrix API service.
* **Secret Key**: The secret key to authenticate against the Mtrix API service.
* **Start Date**: The earliest date from which you want to start syncing records for historical load.
* **Lookback Window**: The number of months to look back for incremental sync.

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync - you can select all streams or pick specific ones that matter most to you.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select a name for each table (which will contain the fetched data) and the type of sync.

* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** and make this process faster!

* **Sync Type**: you can choose between INCREMENTAL and FULL\_TABLE.
  * Incremental: every time the extraction happens, we'll get only the new data - which is good if, for example, you want to keep every record ever fetched.
  * Full table: every time the extraction happens, we'll get the current state of the data - which is good if, for example, you don't want to have deleted data in your catalog.

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can determine when to execute a [full sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync). This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

# Streams and Fields

Below you'll find all available data streams from Mtrix and their corresponding fields:

<AccordionGroup>
  <Accordion title="Facts Sellout (facts_sellout)">
    Stream for managing sellout facts.

    **Primary Keys:** `INVOICE_ID`
    **Replication Key:** `SELLOUT_DATE`
    **Fields:**

    * `ROW_NUMBER` - Row number.
    * `DISTRIBUTOR_CODE` - Distributor code.
    * `SELLOUT_DATE` - Sellout date.
    * `CUSTOMER_ID` - Customer ID.
    * `SELLOUT_TYPE` - Sellout type.
    * `INVOICE_ID` - Invoice ID.
    * `PRODUCT_CODE` - Product code.
    * `SALESREP_ID` - Sales representative ID.
    * `QTY_UNIT` - Quantity in units.
    * `QTY_CONV1` - Converted quantity 1.
    * `QTY_CONV2` - Converted quantity 2.
    * `QTY_CONV3` - Converted quantity 3.
    * `QTY_CONV4` - Converted quantity 4.
    * `QTY_CONV5` - Converted quantity 5.
    * `QTY_CONV6` - Converted quantity 6.
    * `QTY_CONV7` - Converted quantity 7.
    * `QTY_CUSTOM1` - Custom quantity 1.
    * `QTY_CUSTOM2` - Custom quantity 2.
    * `SELLOUT_VALUE_LC` - Sellout value in local currency.
    * `SELLOUT_CONV1` - Converted sellout value 1.
  </Accordion>
</AccordionGroup>

## Data Model

The data model for Mtrix is straightforward as it consists of a single primary stream, `facts_sellout`. This stream contains detailed records of sellout transactions and can be used for various sales and performance analyses.

## Additional Notes

* Ensure that the user credentials have the necessary permissions to access the desired endpoints in Mtrix.
* The amount of data can be large. Use the `start_date` parameter to limit the initial sync period.
* The `lookback_window` parameter is useful for incremental syncs to ensure data consistency.

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

<Card title="Download Mtrix skills file" icon="wand-magic-sparkles" href="/sources/mtrix.md">
  Mtrix connector documentation as plain markdown, for use in AI agent contexts.
</Card>
