# Transformation Configuration Setup

## Overview

The Daasity transformation code maps data from the Shopify schema into the Unified Order Schema (UOS) for both online and point-of-sale (POS)

## Feature Dependencies

You must have enabled our [Code Repository](/technical-docs/transform-code/code-repository.md) feature in order to both access the Daasity transformation code as well as modify a Script Manifest File enabling this code to execute

We recommend you review the [Transformation Configuration](/technical-docs/workflows-and-scheduling/script-manifest-yaml-files.md) section of our Help documentation to familiarize yourself with our workflow engine and script manifest files.

## Script Manifest File (YML)

### Upstream Transformation Dependencies

{% hint style="danger" %}
This code is dependent on the following integration being installed:

* Shopify

This code block is dependent on the following upstream code blocks being implemented:

* Initialization
  {% endhint %}

### Transformation Code Requirements

To enable the data transformation from the Shopify schema into UOS, the following code must be run in a workflow:

```
  uos_shopify:
    integrations:
      - shopify
    scripts:
      - "github://platform-sql-shared/scripts/base/0100_initialization/0150_INI_BAS_sales_channel_mapping.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0510_UOS_BAS_SHOPIFY_locations.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0512_UOS_BAS_SHOPIFY_customers.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0513_UOS_BAS_SHOPIFY_products.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0514_UOS_BAS_SHOPIFY_product_variants.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0515_UOS_BAS_SHOPIFY_orders.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0516_UOS_BAS_SHOPIFY_order_line_Items.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0517_UOS_BAS_SHOPIFY_order_discount_codes.sql"
      - "github://platform-sql-shared/scripts/pro/0500_uos/shopify/0518_UOS_BAS_SHOPIFY_order_shipping_service.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0519_UOS_BAS_SHOPIFY_order_payments.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0520_UOS_BAS_SHOPIFY_transactions.sql"
      - "github://platform-sql-shared/scripts/pro/0500_uos/shopify/0521_UOS_BAS_SHOPIFY_refunds.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0522_UOS_BAS_SHOPIFY_refund_line_items.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0523_UOS_BAS_SHOPIFY_fulfillments.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0524_UOS_BAS_SHOPIFY_order_item_fulfillments.sql"
      - "github://platform-sql-shared/scripts/base/0500_uos/shopify/0525_UOS_BAS_SHOPIFY_current_inventory_levels.sql"
      - "github://platform-sql-internal/scripts/base/0500_uos/shopify/0526_UOS_BAS_SHOPIFY_sales_report.sql"
      - "github://platform-sql-internal/scripts/base/2000_shopify_reports/2000_SHP_BAS_shopify_sales_report.sql"
```

### Unified Order Schema

Code to update the App ID from Shopify to the Sales Channel in the Shopify UI

* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0100_initialization/0150_INI_BAS_sales_channel_mapping.sql>

Code to populate the UOS tables and convert the timezone of the order to the timezone as set in the Daasity App

* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0510_UOS_BAS_SHOPIFY_locations.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0512_UOS_BAS_SHOPIFY_customers.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0513_UOS_BAS_SHOPIFY_products.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0514_UOS_BAS_SHOPIFY_product_variants.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0515_UOS_BAS_SHOPIFY_orders.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0516_UOS_BAS_SHOPIFY_order_line_Items.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0517_UOS_BAS_SHOPIFY_order_discount_codes.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/pro/0500_uos/shopify/0518_UOS_BAS_SHOPIFY_order_shipping_service.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0519_UOS_BAS_SHOPIFY_order_payments.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0520_UOS_BAS_SHOPIFY_transactions.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/pro/0500_uos/shopify/0521_UOS_BAS_SHOPIFY_refunds.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0522_UOS_BAS_SHOPIFY_refund_line_items.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0523_UOS_BAS_SHOPIFY_fulfillments.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0524_UOS_BAS_SHOPIFY_order_item_fulfillments.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify/0525_UOS_BAS_SHOPIFY_current_inventory_levels.sql>

{% hint style="success" %}
To populate the \[`uos.sales_report`] tables you must include the two scripts that are from the Daasity internal repository
{% endhint %}

Optional (alternative) code to populate the UOS tables and convert the timezone of the orders to the timezone of the Shopify store.  Replace the above standard Shopify code with the "\_tz" versions listed below:

* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0510_UOS_BAS_SHOPIFY_locations_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0512_UOS_BAS_SHOPIFY_customers_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0513_UOS_BAS_SHOPIFY_products_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0514_UOS_BAS_SHOPIFY_product_variants_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0515_UOS_BAS_SHOPIFY_orders_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0520_UOS_BAS_SHOPIFY_transactions_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0522_UOS_BAS_SHOPIFY_refund_line_items_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0523_UOS_BAS_SHOPIFY_fulfillments_store_tz.sql>
* <https://github.com/Daasity/platform-sql-shared/blob/master/scripts/base/0500_uos/shopify_store_tz/0525_UOS_BAS_SHOPIFY_current_inventory_levels_store_tz.sql>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/shopify/transformation-configuration-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
