> For the complete documentation index, see [llms.txt](https://developer.gravityfield.ai/lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.gravityfield.ai/lang/en/analytics/purchase-data-export.md).

# Purchase data export

Created: 04.05.2023

Updated: 01.06.2023&#x20;

Author: Alexander Sugakov

## **Data Export**

Data is exported upon request for a specific time period into a file. By default, the export is done in CSV format (comma separated). By default, the export is based on UTC+3 time zone.

## **General Description**

The exported file contains a list of purchase events received by the platform during the specified time period. Events are NOT deduplicated (when comparing the quantity and total amount of purchases for the period with data from analytical platforms, we compare the data after deduplication based on the '<mark style="color:red;">`uniqueTransactionId`</mark>' field).

## **Data Structure**

<table><thead><tr><th width="184">Field</th><th width="211">Type</th><th width="165">Value (default)</th><th>Description</th></tr></thead><tbody><tr><td>contextType</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/enum">Enum8</a></td><td><p>0 - HOMEPAGE, </p><p>1 - CATEGORY, </p><p>2 - PRODUCT,</p><p>3 - CART,</p><p>4 - OTHER,</p><p>5 - SEARCH</p></td><td>Type of the page from which the event was sent, in accordance with the Page Context</td></tr><tr><td>contextData</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/array">Array(String)</a></td><td></td><td>The contents of the array with context data</td></tr><tr><td>uid</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/fixedstring">FixedString(32)</a></td><td></td><td>Internal customer identifier (slid)</td></tr><tr><td>moscowTime</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/datetime">DateTime</a></td><td></td><td>Date and time of the event (by default in UTC+3)</td></tr><tr><td>sessionId</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/fixedstring">FixedString(32)</a></td><td>1234567890</td><td>Internal session identifier</td></tr><tr><td>url</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/string">String</a></td><td>"https://www.example.com/?url_params=123"</td><td>URL from which the event was sent</td></tr><tr><td>browser</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/lowcardinality">LowCardinality(String)</a></td><td>"Safari”</td><td>User's browser type</td></tr><tr><td>device</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/lowcardinality">LowCardinality(String)</a></td><td>"Tablet”</td><td>User's device type</td></tr><tr><td>os</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/lowcardinality">LowCardinality(String)</a></td><td>"Mac OS X”</td><td>User's operating system type</td></tr><tr><td>eventName</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/lowcardinality">LowCardinality(String)</a></td><td>"Purchase"</td><td>Event name (human-readable)</td></tr><tr><td>eventValue</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/int-uint">Uint32</a></td><td></td><td>Event value</td></tr><tr><td>eventCurrency</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/lowcardinality">LowCardinality(String)</a></td><td></td><td>Currency</td></tr><tr><td>uniqueTransactionId</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/string">String</a></td><td></td><td>Unique transaction identifier</td></tr><tr><td>eventCart</td><td><a href="https://clickhouse.com/docs/en/sql-reference/data-types/array">Array</a></td><td></td><td>Contents of the cart in the format: "Product SKU, quantity, price per unit"</td></tr></tbody></table>
