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

# Snowflake Data Sharing

> Share AR data into Stuut, or receive your Stuut data back, using secure Snowflake data sharing — no files or credentials exchanged.

# Snowflake Data Sharing

> Share AR data into Stuut, or receive your Stuut data back, using secure Snowflake data sharing — no files or credentials exchanged.

<Note>
  Snowflake data sharing is set up together with Stuut's team. Contact your CSM or FDE to get started. They'll take you from first share to first sync.
</Note>

<AccordionGroup>
  <Accordion title="What is Snowflake data sharing?">
    If your AR data already lives in Snowflake, you can connect it to Stuut with Snowflake's secure data sharing instead of an ERP connector or scheduled file uploads. It works both ways:

    * **Inbound (your Snowflake → Stuut):** you share views of your AR data, and Stuut reads them directly.
    * **Outbound (Stuut → your Snowflake):** Stuut shares your Stuut data back to your Snowflake account so you can query it alongside your other data.

    No data is exported or copied as files, Stuut never holds your Snowflake credentials, and you can revoke access at any time.
  </Accordion>

  <Accordion title="What do we need to share data into Stuut?">
    * Snowflake **Enterprise edition or higher**
    * One secure view per data type, following Stuut's data contract: **customers, contacts, invoices, invoice lines, payments, and payment allocations**. Stuut provides a SQL template for each view.
    * A stable, never-reused key on each row, and a **timezone-aware** `modified_at` column that updates whenever a row changes

    If your Snowflake account is in the same region as Stuut (AWS us-east-1), sharing is direct. Other regions and clouds use a private listing, which Snowflake replicates for you.
  </Accordion>

  <Accordion title="What should we watch out for when building the views?">
    * **Share full tables, not just open items.** A row that disappears from a view is treated as deleted and the invoice is voided in Stuut. A view filtered to open balances would void invoices as they're paid.
    * **Every money column needs a currency.** Stuut never assumes USD.
    * **Invoice status** must be one of: Open, Paid, Partially Paid, Void, In Dispute.
    * **Extra columns become custom fields** in Stuut. Column comments become the field description. Don't put personal data in custom fields.
    * **One bad row stops that table from loading**, so validate types before sharing.
  </Accordion>

  <Accordion title="How fresh is the data?">
    It depends on how often you update your tables and, for cross-region listings, the listing's refresh interval (typically about 60 minutes).
  </Accordion>

  <Accordion title="How do we receive our Stuut data in Snowflake?">
    Give your Stuut contact your Snowflake account identifier (in Snowsight under **Admin → Accounts**, formatted `ORGNAME-ACCOUNTNAME`), your cloud and region, which fields you want, and a technical contact.

    When the listing is ready:

    <Steps>
      <Step title="Accept the listing">
        In Snowsight, go to **Data Products → Private Sharing**, open the Stuut listing, click **Get Data**, and name the database.
      </Step>

      <Step title="Query it">
        Query it like any other view. There's no load step and no storage cost; queries run on your own warehouse.
      </Step>
    </Steps>

    The shared data reflects Stuut's most recent analytics refresh, not real time. Ask your Stuut contact for the refresh schedule, or to add fields later. Adding fields won't break your existing queries.
  </Accordion>

  <Accordion title="What invoice fields can Stuut share back?">
    Any of: invoice number, status, currency, amount due, amount paid, amount remaining, issued date, due date, paid date, last outreach date, whether there's an active dispute, and whether the invoice's collection is Stuut-attributed.

    Invoices are identified by invoice number only. Customer names and account numbers aren't included. Note that `status` uses the warehouse value, so an open past-due invoice won't read "overdue" the way it does in the app.
  </Accordion>

  <Accordion title="We use Databricks. Can we still do this?">
    Possibly, through Delta Sharing mounted in Snowflake. Ask your FDE.
  </Accordion>
</AccordionGroup>
