Data schema

Available schemas and tables

šŸ“˜

At the moment, all tables are in the exports database

ProcessingOrders

Contains information about orders, balance changes, promoactions

TableDescriptionKey
BonusPointChangesBalance changes eventsid
BonusPointsMechanicsBonus promoactionsid
NegativeCustomerBalanceChangeDetailsDataset of the links between write-offs and accruals of pointsid
BalancesBalances dictionaryid
OrdersOrders dataset: contains the total amount, date, and touchpoints of an orderid
PurchasesOrder items datasetorderId + lineNumber / lineId
PurchaseStatusesOrder items statuses datasetinternalId
PointsOfContactDataset of contact points: contains a list of touchpoints in which interactions with clients occurid

Mailings

Contains information about mailings, actions with the mailings

TableDescriptionKey
MailingsMailing campaign dictionaryid
SubscriptionTopicsSubscription topics dictionaryinternalId
CustomerMessagesStatusesCustomer message statuses e.g. clicks, openings etc.messageStatusId

CDP

Contains general information about customer merges and campaigns folders

TableDescriptionKey
MergedCustomersCustomer merge eventsunmergedCustomerId + mergedCustomerId
FoldersFolders dictionaryinternalId
SegmentationsSegmentations dictionaryid
SegmentsSegments dictionaryid
CustomerSegmentHistoryHistory of customer segmentsid

AbTests

Contains information about AB-tests and its participants

TableDescriptionKey
AbTestsAB-test dictionaryinternalId
AbTestVariantsAB-tests variants dictionaryabTestId
ScenariosAbTestParticipantsCustomer participation in AB testsunmergedCustomerId + abTestId / variantId

Why do you need a key?

To get the latest state of an entity or the state of an entity at a certain point in time, you will need a key - it will be used to group rows in the table and select suitable values.

Let's look at an example: you have already downloaded data for order id198123, but today information about an order update arrived. How can you get only one current record? For this, you can use, for example, this script:

SELECT * 
FROM 
Orders --orders dataset
ORDER BY 
Orders._rowversion_ts DESC --sorting the table by date of change
LIMIT 1 BY Orders.id --we take one row for each unique id

Table schema