2CO Data Share in Snowflake
Overview
2CO Snowflake Data Share enables users to query their data collected in the 2CO platform directly using SQL or retrieve it using other business intelligence (BI) tools, with more user-friendly interfaces, such as Power BI or Looker Studio to create reports efficiently.
The 2CO Snowflake Data Share is available only for organizations with their own Snowflake instance.
Availability
2CO Data Share with Snowflake is available on request starting from January 2025. Get in touch with our Sales teams to request the integration with Snowflake.
Benefits
- 2 CO offers vendors the possibility to generate reports easier and faster via Snowflake Data Share than by using other out-of-the-box reporting tools.
- Reports generated from Snowflake have increased accuracy and can provide vendors with more complex data sets.
- Vendors can use Snowflake data together with other reporting tools in their portfolio to obtain even better and more accurate data about their business.
Requirements
- The target account must be an enterprise snowflake edition.
- The user must have “accountadmin” privileges to access the share.
Workflow
- Login to the Snowflake Account and select the Account Admin Role from bottom left.
- Navigate to the left panel, select Data Products and then choose Private Sharing.
- Navigate to the right panel and select SHARE_[ACCOUNT].
- Select the download icon and Snowflake will then download the shared object under a database.
To query and retrieve 2CO data stored in Snowflake, you can use standard SQL directly in the Snowflake interface or other external BI tools such as Power BI or Looker Studio.
Integrate your favorite BI tool
Snowflake supports integration with many BI platforms. Refer to the Snowflake documentation for details.
Data sets available in Snowflake
Tables
Subscriptions Events Table
- Key Information:
- This table stores events (meaning that there will be more than 1 entry for the same LICENSE_CODE).
- The row containing the most recent event (EVENT_DATE) for a subscription (LICENCE_CODE) reflects its’ last state.
- License code, purchase date, expiration date, order IDs.
- Available fields:
Field Name | Type | Description |
---|---|---|
EVENT_DATE | TIMESTAMP_TZ | A snapshot of the subscription at EVENT_DATE. |
LICENCE_CODE (SUBSCRIPTION_BILLING_CYCLES.LICENCE_CODE) |
VARCHAR | Unique subscription identifier. |
PREVIOUS_EXPIRATION_DATE | TIMESTAMP_TZ | Expiration date before current snapshot renewal. |
EXPIRATION_DATE | TIMESTAMP_TZ | Expiration date of the current snapshot. |
IS_AUTORENEWING | BOOLEAN | Current snapshot at status. |
STATUS | VARCHAR | The status of the subscription. |
AUTORENEWAL_DISABLE_REASONS | VARIANT | Reasons for disabling auto-renewal. |
AUTORENEWAL_DISABLE_DATE | TIMESTAMP_TZ | Date auto-renewal was disabled. |
AUTORENEWAL_DISABLE_SOURCE | VARCHAR | |
DISABLE_REASONS | VARIANT | The reason for which the subscription is disabled. |
DISABLE_DATE | TIMESTAMP_TZ | The date when the subscription is disabled. |
DISABLE_SOURCE | VARCHAR | |
INITIAL_PURCHASE_DATE | TIMESTAMP_TZ | Date of the first purchase for the subscription. |
PRODUCT_CODE | VARCHAR | Catalog product code. |
PAYMENT_METHOD_ON_FILE | VARCHAR | |
IS_TRIAL | BOOLEAN | True for trial subscriptions, false otherwise. |
IS_LIFETIME | BOOLEAN | True if the subscription is evergreen, of false if the subscription has a recurring billing cycle less than or equal to three years. |
PARTNER_ID | NUMBER | Vendor’s partner/reseller ID. |
IS_TEST | BOOLEAN | True for test subscriptions, false otherwise. |
ACCOUNT_ID | NUMBER | Vendor ID |
CURRENT_ORDER_ID (ORDERS_PRODUCTS.ORDER_ID) |
NUMBER | ID of the order which initiated current / most recent billing cycle of the subscription. |
CURRENT_PRODUCT_ID | NUMBER | Product ID of the product pertaining to the current / most recent billing cycle of the subscription. |
PREVIOUS_ORDER_ID (ORDERS_PRODUCTS.ORDER_ID) |
NUMBER | ID of the order before the most recent. Can be null in case of a new acquisition. |
PREVIOUS_PRODUCT_ID | NUMBER | Can be different from current product ID if an upgrade occurred on the subscription. |
SUBSCRIPTION_PRODUCT_ID (SUBSCRIPTION_PRODUCT_EVENTS.SUBSCRIPTION_PRODUCT_ID) |
NUMBER | Unique identifier of the product association between product and the license code. Identifies uniquely the product with its product options and quantity selected for that subscription. |
CUSTOMER_ID | NUMBER | 2CO internal customer identifier. |
NEXT_RENEWAL_PRICE | FLOAT | Renewal price for the next billing cycle. |
NEXT_RENEWAL_PRICE_CURRENCY | VARCHAR | Renewal currency for the next billing cycle. |
RENEWAL_COUNTER | NUMBER | The number of renewals. |
Customer Events Table
- Purpose: analyze customer-specific metrics such as CLV (Customer Lifetime Value).
- Key Information:
- This table stores events (meaning that there will be more than 1 entry for the same customer).
- The row containing the most recent event (EVENT_DATE) for a customer (CUSTOMER_ID) reflects its’ last state.
- Customer demographics (email, name).
- Product and order details.
- Payment methods and promotions.
- Available fields:
Field Name | Type | Description |
---|---|---|
CUSTOMER_ID (ORDERS_PRODUCTS.CUSTOMER_ID) |
NUMBER | 2CO internal customer identifier. |
ACCOUNT_ID | NUMBER | Vendor ID. |
ADDRESS_DELIVERY | VARCHAR | Address for delivery. |
CITY | VARCHAR | City |
COMPANY | VARCHAR | Company name. |
COUNTRY_CODE | VARCHAR | Country code from the billing details. |
CREATION_DATE | TIMESTAMP_TZ | Customer creation date. |
VARCHAR | Customer’s email address. | |
EMAIL_DELIVERY | VARCHAR | Email address for delivery. |
EVENT_DATE | TIMESTAMP_TZ | Date when a change on the entity happened. In this case the customer. |
EXTERNAL_CUSTOMER_ID | VARCHAR | External customer ID. |
FIRST_NAME | VARCHAR | Customer’s first name. |
FIRST_NAME_DELIVERY | VARCHAR | First name for delivery. |
FISCAL_CODE | VARCHAR | Company VAT ID / Tax ID. |
LAST_NAME | VARCHAR | Customer last name. |
LAST_NAME_DELIVERY | VARCHAR | Last name for delivery. |
PHONE | VARCHAR | Customer's phone number. |
STATE | VARCHAR | Customer's state. |
STATUS | VARCHAR | The status of the order. |
TAX_OFFICE | VARCHAR | Tax office code. |
ZIP | VARCHAR | Zip code. |
Orders Products Table
- Purpose: use this table to calculate average order value, refund amounts, chargebacks, or to reach out to customers to ask them to update payment details.
- Key Information:
- This table stores events (meaning that there will be more than 1 entry for the same order).
- If there are more products in one order, then, we will have more rows associated to the same ORDER_ID.
- Order ID, product IDs, customer data, payment type, card expiration date, chargebacks, refunds, discounts.
- Available fields:
Field Name | Type | Description |
---|---|---|
CUSTOMER_ID (CUSTOMER_EVENTS.CUSTOMER_ID) |
NUMBER | 2CO internal customer identifier. |
VARCHAR | Customer email address. | |
FIRST_NAME | VARCHAR | Customer first name. |
LAST_NAME | VARCHAR | Customer last name. |
ORDER_FINISH_DATE | VARCHAR | Date and time when order was completed. |
STATUS | VARCHAR |
The status of the order.
|
CARD_LAST_DIGITS | VARCHAR | The last 4 digits of the shopper credit/debit card. |
CARD_EXPIRATION_DATE | VARCHAR | Card expiration month and year. |
CARD_TYPE | VARCHAR |
Shopper card type.
|
SRC_CODE | VARCHAR | Issued by vendor; examples look like affiliate referral IDs. |
PRODUCT_PCODE | VARCHAR | SUBSCRIPTIONS_BILLING_CYCLES -> PRODUCT_CODE. |
PRODUCT_DISCOUNT | VARCHAR | Discount amount. |
PRODUCT_PROMOTION_CATEGORY | VARCHAR |
One of the product promotion categories.
|
PRODUCT_PROMOTION_NAME | VARCHAR | The name given to the newly added promotion. |
PRODUCT_PROMOTION_CODE | VARCHAR | Promotion code automatically generated by adding a new promotion. |
CHARGEBACK_RESOLUTION | VARCHAR |
Chargeback status information.
|
CHARGEBACK_REASON_CODE | VARCHAR |
Identifier for the chargeback dispute reason from the 2Checkout system.
|
CHARGEBACK_OPEN_DATE | VARCHAR | The date when the chargeback dispute was initiated. |
REFUND_TYPE | VARCHAR |
Describes the type of the refund.
|
REFUND_REASON | VARCHAR |
The reason for the refund.
|
ORDER_TOTAL | VARCHAR | Total amount paid for order. |
SALEDATA_CURRENCY | VARCHAR | Currency for the above amount. |
PRODUCT_QTY | VARCHAR | Number of products per order. |
PRODUCT_PRICE | VARCHAR | Price of the product in order (excluding taxes). |
ORDER_ORIGIN | VARCHAR |
Source of the order from which was placed.
|
ORDER_ID (SUBSCRIPTIONS_EVENTS.CURRENT_ORDER_ID, SUBSCRIPTION_EVENTS.PREVIOUS_ORDER_ID, SUBSCRIPTION_BILLING_CYCLES.ORDER_ID) |
VARCHAR | ID of the order. |
COUNTRY_CODE | VARCHAR | Country code. |
ACCOUNT_ID | NUMBER | Company acc ID. |
PRODUCT_ID | NUMBER | Catalogue product ID. |
EVENT_DATE | TIMESTAMP_TZ | Date of the change triggering an update. |
Exchange Rates Table
- Purpose: allows conversion one currency to another based on historical rates.
- Key Information:
- Each row contains exchange rates from one currency to another for each day stating on 2002/09/05.
- Available fields:
Field Name | Type | Description |
---|---|---|
EXCHANGE_DATE | TIMESTAMP_TZ | The date when the exchange was made. |
FROM_CURRENCY | VARCHAR | The currency from which the exchange was made. |
TO_CURRENCY | VARCHAR | The currency to which the exchange was made. |
EXCHANGE_RATE | FLOAT | The exchange rate used to convert the amount. |