Integration of Shopify with BigQuery

Learn how to create a Shopify custom app and connect Shopify to Google BigQuery using WitCloud to collect orders, products, refunds, returns, store navigation, inventory levels and marketing consents.

Updated

Introduction

This module connects WitCloud to your Shopify store and stores its data in Google Cloud BigQuery: orders, products, refunds, returns, store navigation menus, inventory levels per location and customers' marketing consents. Use it to analyze your ecommerce results next to your advertising data.

WitCloud connects to Shopify with the Client ID and Client secret of a custom app that you create in your own Shopify account. The first part of this page shows how to create it. The second part shows how to set up the integration in WitCloud.

Before you start: custom app setup

The steps in this section are done in Shopify's own interface (the Shopify Dev Dashboard and your store's admin), not in WitCloud. Shopify may change its screens over time; the images show how they looked when this page was written. They do not contain any real store data.

Step 1: Open the Dev Dashboard

Go to the Shopify Dev Dashboard and open the Apps section. Click Create app in the top right corner. If you don't have a Shopify Partners account yet, you can create one at partners.shopify.com.

Shopify Dev Dashboard Apps section with the Create app button (Shopify interface)

Step 2: Create the app

On the Create an app screen choose Start from Dev Dashboard (the card on the right). Enter an App name, for example "WitCloud Connector", and click Create.

Create an app screen with Start from Dev Dashboard and the App name field (Shopify interface)

Step 3: Create a version

In your app open the Versions section and click Create a version.

Versions section with the Create a version button (Shopify interface)

Step 4: Add the scopes and release the version

In the Access section, paste the permissions (scopes) that WitCloud needs into the Scopes field.

ScopeRequiredUsed for
read_ordersYesOrders, refunds and returns
read_all_ordersYesOrders older than 60 days
read_productsYesProducts
read_discountsYesDiscount codes used in orders
read_returnsYesReturns
read_inventoryYesStock levels
read_locationsYesInventory levels per location
read_customersYesCustomer details in orders and marketing consents
read_online_store_navigationNoStore navigation menus

WitCloud checks that all required scopes are granted when you save the credentials. Without read_online_store_navigation the integration works, but the store_navigation table stays empty or reports an error.

Paste all scopes at once, separated by commas: read_all_orders,read_customers,read_discounts,read_inventory,read_locations,read_orders,read_products,read_returns,read_online_store_navigation

The orders and marketing consents tables contain customers' names, email addresses and phone numbers. Shopify gives an app access to them only after you request access to protected customer data in the app's settings (the name, email and phone fields). Without it, these fields stay empty.

Then click Release at the top of the page.

Step 5: Confirm the release

In the Release this new version? dialog you can optionally enter a version name and message. Click Release to confirm.

Release dialog with the optional version name and message (Shopify interface)

Already connected Shopify before and adding new scopes now? Add them to your app, release a new version and accept the new permissions in your store. The integration keeps working in the meantime; only the tables that need the new scopes report an error until then.

Step 6: Install the app on your store

Open the Home section of the app and click Install app. Shopify asks you to choose the store (if you have several) and shows the permissions the app requests. Click Install to confirm.

App Home section with the Install app button (Shopify interface)

After the installation Shopify may open an Example Domain page. This is expected: the app uses a placeholder app URL. Close that tab and go back to the Dev Dashboard.

Step 7: Copy the Client ID and the secret

In the app open the Settings section. In Credentials copy the Client ID, then click the eye icon next to Secret to reveal it and copy it too. You will paste both values into WitCloud. Treat the secret like a password and do not share it.

Done! You have the Client ID and Client secret you need to authorize Shopify in WitCloud.

Configuration guide

Follow the steps below to connect Shopify with BigQuery. Once the setup is complete, your Shopify data is transferred to your BigQuery project.

Module setup

Go to Integrations in the menu and click Add integration.

Integrations list with the Add integration button

Select Shopify from the list of available integrations.

Integration catalog filtered to Shopify

Enter the Collect name, e.g. "Shopify PL". A good name helps you identify the data source later.

Collect name field filled in with the example name Shopify PL

Enter the Shop URI: the address of your store in the myshopify.com domain, including https://, e.g. https://your-store.myshopify.com (not your custom domain). The Authorize button stays inactive until you enter a valid address.

Shop URI field filled in with the example address https://demo-shop.myshopify.com

Authorization

If you have already authorized Shopify in WitCloud, you can pick the existing token from the Shopify authorization drop-down and skip the next two steps.

Click Authorize.

Authorize button next to the Shopify authorization field, active once the shop address is filled in

In the Authorize pop-up enter the Client ID and the Client secret you copied from Shopify and click Create. If Shopify does not accept the credentials, or the app lacks a required permission, the reason is shown under the form.

Authorize pop-up with the Client ID and Client secret fields filled with example values

The saved token is selected automatically. You can also choose a token from the Shopify authorization drop-down.

Shopify authorization drop-down open with one example token

Advanced settings

Click Show advanced settings to see two more fields.

In Data freshness (products, stocks) enter how often, in hours, tables that hold the whole catalogue (products, inventory levels and store navigation) are refreshed. The value must be between 4 and 12 hours; the default is 4.

Advanced settings open with the Data freshness field set to 4 hours

In Tables to collect you can remove the tables you do not need: products, orders, returns, refunds, store_navigation, inventory_levels and marketing_consents. All of them are selected by default and at least one must stay selected. Collecting fewer tables makes the data retrieval faster.

Tables to collect field with the Shopify tables selected

In an integration created earlier, new tables are not added to Tables to collect automatically. Edit the integration and select them to start collecting them.

Click Next.

Collect settings filled in with the Next button

Historical data and scheduling

In Historical Data enter the number of days to fetch on the first run, up to 365.

Historical Data field filled in with 365 days

A data synchronization schedule is created automatically. More information on this topic can be found here.

Click Create to complete the configuration.

Data collection settings with the Create button

Done! Your Shopify data will now be synchronized with BigQuery, providing you with detailed insights into the performance of your store.

Data schema

Expand the tables below to view the full data schema collected from Shopify.

  • Orders, returns and refunds are collected day by day, by the date they were created. A day is a calendar day in the timezone of the integration's schedule.
  • Marketing consents are collected day by day too, by the date the customer was last updated. A day holds the customers created that day and those whose email or SMS consent changed that day, so the newest row of each customer is their current consent. The is_new, email_consent_changed and sms_consent_changed columns tell why a customer is in a given day.
  • Products, inventory levels and store navigation are collected as a full copy of the current state and are refreshed according to Data freshness.

To get each customer's current consent, take their newest row:

SELECT *
FROM `your_project.your_dataset.shopify_marketing_consents_<collect_id>`
WHERE TRUE
QUALIFY ROW_NUMBER() OVER (PARTITION BY admin_graphql_api_id ORDER BY updated_at DESC) = 1

Join it to orders on customer.admin_graphql_api_id. Marketing consent states are SUBSCRIBED, NOT_SUBSCRIBED, UNSUBSCRIBED, PENDING, REDACTED and INVALID; only SUBSCRIBED customers have agreed to marketing.

Data schema for shopify_orders
Field NameModeType
idNULLABLESTRING
admin_graphql_api_idNULLABLESTRING
nameNULLABLESTRING
order_numberNULLABLEINTEGER
numberNULLABLEINTEGER
created_atNULLABLETIMESTAMP
updated_atNULLABLETIMESTAMP
processed_atNULLABLETIMESTAMP
cancelled_atNULLABLETIMESTAMP
currencyNULLABLESTRING
tagsREPEATEDSTRING
noteNULLABLESTRING
financial_statusNULLABLESTRING
fulfillment_statusNULLABLESTRING
discount_codesREPEATEDSTRING
payment_gateway_namesREPEATEDSTRING
taxes_includedNULLABLEBOOLEAN
subtotal_price_setNULLABLERECORD
subtotal_price_set.shop_moneyNULLABLERECORD
subtotal_price_set.shop_money.amountNULLABLEFLOAT
subtotal_price_set.shop_money.currency_codeNULLABLESTRING
subtotal_price_set.presentment_moneyNULLABLERECORD
subtotal_price_set.presentment_money.amountNULLABLEFLOAT
subtotal_price_set.presentment_money.currency_codeNULLABLESTRING
total_tax_setNULLABLERECORD
total_tax_set.shop_moneyNULLABLERECORD
total_tax_set.shop_money.amountNULLABLEFLOAT
total_tax_set.shop_money.currency_codeNULLABLESTRING
total_tax_set.presentment_moneyNULLABLERECORD
total_tax_set.presentment_money.amountNULLABLEFLOAT
total_tax_set.presentment_money.currency_codeNULLABLESTRING
total_price_setNULLABLERECORD
total_price_set.shop_moneyNULLABLERECORD
total_price_set.shop_money.amountNULLABLEFLOAT
total_price_set.shop_money.currency_codeNULLABLESTRING
total_price_set.presentment_moneyNULLABLERECORD
total_price_set.presentment_money.amountNULLABLEFLOAT
total_price_set.presentment_money.currency_codeNULLABLESTRING
tax_linesREPEATEDRECORD
tax_lines.titleNULLABLESTRING
tax_lines.price_setNULLABLERECORD
tax_lines.price_set.shop_moneyNULLABLERECORD
tax_lines.price_set.shop_money.amountNULLABLEFLOAT
tax_lines.price_set.shop_money.currency_codeNULLABLESTRING
tax_lines.price_set.presentment_moneyNULLABLERECORD
tax_lines.price_set.presentment_money.amountNULLABLEFLOAT
tax_lines.price_set.presentment_money.currency_codeNULLABLESTRING
tax_lines.rateNULLABLEFLOAT
tax_lines.rate_percentageNULLABLEFLOAT
tax_lines.channel_liableNULLABLEBOOLEAN
customerNULLABLERECORD
customer.admin_graphql_api_idNULLABLESTRING
customer.first_nameNULLABLESTRING
customer.last_nameNULLABLESTRING
customer.emailNULLABLESTRING
billing_addressNULLABLERECORD
billing_address.nameNULLABLESTRING
billing_address.address1NULLABLESTRING
billing_address.address2NULLABLESTRING
billing_address.cityNULLABLESTRING
billing_address.provinceNULLABLESTRING
billing_address.province_codeNULLABLESTRING
billing_address.countryNULLABLESTRING
billing_address.zipNULLABLESTRING
billing_address.phoneNULLABLESTRING
shipping_addressNULLABLERECORD
shipping_address.nameNULLABLESTRING
shipping_address.address1NULLABLESTRING
shipping_address.address2NULLABLESTRING
shipping_address.cityNULLABLESTRING
shipping_address.provinceNULLABLESTRING
shipping_address.province_codeNULLABLESTRING
shipping_address.countryNULLABLESTRING
shipping_address.zipNULLABLESTRING
shipping_address.phoneNULLABLESTRING
shipping_linesREPEATEDRECORD
shipping_lines.titleNULLABLESTRING
shipping_lines.original_price_setNULLABLERECORD
shipping_lines.original_price_set.shop_moneyNULLABLERECORD
shipping_lines.original_price_set.shop_money.amountNULLABLEFLOAT
shipping_lines.original_price_set.shop_money.currency_codeNULLABLESTRING
shipping_lines.discounted_price_setNULLABLERECORD
shipping_lines.discounted_price_set.shop_moneyNULLABLERECORD
shipping_lines.discounted_price_set.shop_money.amountNULLABLEFLOAT
shipping_lines.discounted_price_set.shop_money.currency_codeNULLABLESTRING
shipping_lines.tax_linesREPEATEDRECORD
shipping_lines.tax_lines.titleNULLABLESTRING
shipping_lines.tax_lines.price_setNULLABLERECORD
shipping_lines.tax_lines.price_set.shop_moneyNULLABLERECORD
shipping_lines.tax_lines.price_set.shop_money.amountNULLABLEFLOAT
shipping_lines.tax_lines.price_set.shop_money.currency_codeNULLABLESTRING
shipping_lines.tax_lines.price_set.presentment_moneyNULLABLERECORD
shipping_lines.tax_lines.price_set.presentment_money.amountNULLABLEFLOAT
shipping_lines.tax_lines.price_set.presentment_money.currency_codeNULLABLESTRING
shipping_lines.tax_lines.rateNULLABLEFLOAT
shipping_lines.tax_lines.rate_percentageNULLABLEFLOAT
shipping_lines.tax_lines.channel_liableNULLABLEBOOLEAN
fulfillmentsREPEATEDRECORD
fulfillments.admin_graphql_api_idNULLABLESTRING
fulfillments.created_atNULLABLETIMESTAMP
fulfillments.statusNULLABLESTRING
fulfillments.tracking_infoREPEATEDRECORD
fulfillments.tracking_info.companyNULLABLESTRING
fulfillments.tracking_info.numberNULLABLESTRING
fulfillments.tracking_info.urlNULLABLESTRING
line_itemsREPEATEDRECORD
line_items.admin_graphql_api_idNULLABLESTRING
line_items.titleNULLABLESTRING
line_items.quantityNULLABLEINTEGER
line_items.taxableNULLABLEBOOLEAN
line_items.tax_linesREPEATEDRECORD
line_items.tax_lines.titleNULLABLESTRING
line_items.tax_lines.price_setNULLABLERECORD
line_items.tax_lines.price_set.shop_moneyNULLABLERECORD
line_items.tax_lines.price_set.shop_money.amountNULLABLEFLOAT
line_items.tax_lines.price_set.shop_money.currency_codeNULLABLESTRING
line_items.tax_lines.price_set.presentment_moneyNULLABLERECORD
line_items.tax_lines.price_set.presentment_money.amountNULLABLEFLOAT
line_items.tax_lines.price_set.presentment_money.currency_codeNULLABLESTRING
line_items.tax_lines.rateNULLABLEFLOAT
line_items.tax_lines.rate_percentageNULLABLEFLOAT
line_items.tax_lines.channel_liableNULLABLEBOOLEAN
line_items.discounted_total_setNULLABLERECORD
line_items.discounted_total_set.shop_moneyNULLABLERECORD
line_items.discounted_total_set.shop_money.amountNULLABLEFLOAT
line_items.discounted_total_set.shop_money.currency_codeNULLABLESTRING
line_items.discounted_total_set.presentment_moneyNULLABLERECORD
line_items.discounted_total_set.presentment_money.amountNULLABLEFLOAT
line_items.discounted_total_set.presentment_money.currency_codeNULLABLESTRING
line_items.original_total_setNULLABLERECORD
line_items.original_total_set.shop_moneyNULLABLERECORD
line_items.original_total_set.shop_money.amountNULLABLEFLOAT
line_items.original_total_set.shop_money.currency_codeNULLABLESTRING
line_items.original_total_set.presentment_moneyNULLABLERECORD
line_items.original_total_set.presentment_money.amountNULLABLEFLOAT
line_items.original_total_set.presentment_money.currency_codeNULLABLESTRING
line_items.discount_allocationsREPEATEDRECORD
line_items.discount_allocations.allocated_amount_setNULLABLERECORD
line_items.discount_allocations.allocated_amount_set.shop_moneyNULLABLERECORD
line_items.discount_allocations.allocated_amount_set.shop_money.amountNULLABLEFLOAT
line_items.discount_allocations.allocated_amount_set.shop_money.currency_codeNULLABLESTRING
line_items.discount_allocations.allocated_amount_set.presentment_moneyNULLABLERECORD
line_items.discount_allocations.allocated_amount_set.presentment_money.amountNULLABLEFLOAT
line_items.discount_allocations.allocated_amount_set.presentment_money.currency_codeNULLABLESTRING
line_items.discounted_unit_price_after_all_discounts_setNULLABLERECORD
line_items.discounted_unit_price_after_all_discounts_set.shop_moneyNULLABLERECORD
line_items.discounted_unit_price_after_all_discounts_set.shop_money.amountNULLABLEFLOAT
line_items.discounted_unit_price_after_all_discounts_set.shop_money.currency_codeNULLABLESTRING
line_items.discounted_unit_price_after_all_discounts_set.presentment_moneyNULLABLERECORD
line_items.discounted_unit_price_after_all_discounts_set.presentment_money.amountNULLABLEFLOAT
line_items.discounted_unit_price_after_all_discounts_set.presentment_money.currency_codeNULLABLESTRING
line_items.discounted_unit_price_setNULLABLERECORD
line_items.discounted_unit_price_set.shop_moneyNULLABLERECORD
line_items.discounted_unit_price_set.shop_money.amountNULLABLEFLOAT
line_items.discounted_unit_price_set.shop_money.currency_codeNULLABLESTRING
line_items.discounted_unit_price_set.presentment_moneyNULLABLERECORD
line_items.discounted_unit_price_set.presentment_money.amountNULLABLEFLOAT
line_items.discounted_unit_price_set.presentment_money.currency_codeNULLABLESTRING
line_items.variantNULLABLERECORD
line_items.variant.admin_graphql_api_idNULLABLESTRING
line_items.variant.titleNULLABLESTRING
line_items.variant.skuNULLABLESTRING
line_items.variant.priceNULLABLEFLOAT
line_items.variant.productNULLABLERECORD
line_items.variant.product.admin_graphql_api_idNULLABLESTRING
line_items.variant.product.titleNULLABLESTRING
line_items.variant.product.handleNULLABLESTRING
line_items.variant.inventory_itemNULLABLERECORD
line_items.variant.inventory_item.admin_graphql_api_idNULLABLESTRING
line_items.variant.inventory_item.measurementNULLABLERECORD
line_items.variant.inventory_item.measurement.weightNULLABLERECORD
line_items.variant.inventory_item.measurement.weight.valueNULLABLEFLOAT
line_items.variant.inventory_item.measurement.weight.unitNULLABLESTRING
Data schema for shopify_products
Field NameModeType
idNULLABLESTRING
admin_graphql_api_idNULLABLESTRING
titleNULLABLESTRING
handleNULLABLESTRING
statusNULLABLESTRING
tagsREPEATEDSTRING
vendorNULLABLESTRING
product_typeNULLABLESTRING
created_atNULLABLETIMESTAMP
updated_atNULLABLETIMESTAMP
published_atNULLABLETIMESTAMP
body_htmlNULLABLESTRING
category_nameNULLABLESTRING
is_bundleNULLABLEBOOLEAN
bundle_componentsREPEATEDRECORD
bundle_components.product_idNULLABLESTRING
bundle_components.admin_graphql_api_idNULLABLESTRING
bundle_components.product_titleNULLABLESTRING
bundle_components.quantityNULLABLEINTEGER
collectionsREPEATEDRECORD
collections.admin_graphql_api_idNULLABLESTRING
collections.titleNULLABLESTRING
collections.handleNULLABLESTRING
imageNULLABLERECORD
image.admin_graphql_api_idNULLABLESTRING
image.altNULLABLESTRING
image.srcNULLABLESTRING
imagesREPEATEDRECORD
images.admin_graphql_api_idNULLABLESTRING
images.altNULLABLESTRING
images.srcNULLABLESTRING
optionsREPEATEDRECORD
options.admin_graphql_api_idNULLABLESTRING
options.nameNULLABLESTRING
options.valuesREPEATEDSTRING
variantsREPEATEDRECORD
variants.admin_graphql_api_idNULLABLESTRING
variants.titleNULLABLESTRING
variants.skuNULLABLESTRING
variants.priceNULLABLEFLOAT
variants.compare_at_priceNULLABLEFLOAT
variants.barcodeNULLABLESTRING
variants.created_atNULLABLETIMESTAMP
variants.updated_atNULLABLETIMESTAMP
variants.positionNULLABLEINTEGER
variants.inventory_quantityNULLABLEINTEGER
variants.selected_optionsREPEATEDRECORD
variants.selected_options.nameNULLABLESTRING
variants.selected_options.valueNULLABLESTRING
variants.inventory_itemNULLABLERECORD
variants.inventory_item.admin_graphql_api_idNULLABLESTRING
variants.inventory_item.measurementNULLABLERECORD
variants.inventory_item.measurement.weightNULLABLERECORD
variants.inventory_item.measurement.weight.valueNULLABLEFLOAT
variants.inventory_item.measurement.weight.unitNULLABLESTRING
Data schema for shopify_refunds
Field NameModeType
idNULLABLESTRING
admin_graphql_api_idNULLABLESTRING
created_atNULLABLETIMESTAMP
updated_atNULLABLETIMESTAMP
noteNULLABLESTRING
orderNULLABLERECORD
order.admin_graphql_api_idNULLABLESTRING
order.nameNULLABLESTRING
order.order_numberNULLABLEINTEGER
total_refunded_setNULLABLERECORD
total_refunded_set.shop_moneyNULLABLERECORD
total_refunded_set.shop_money.amountNULLABLEFLOAT
total_refunded_set.shop_money.currency_codeNULLABLESTRING
total_refunded_set.presentment_moneyNULLABLERECORD
total_refunded_set.presentment_money.amountNULLABLEFLOAT
total_refunded_set.presentment_money.currency_codeNULLABLESTRING
refund_line_itemsREPEATEDRECORD
refund_line_items.admin_graphql_api_idNULLABLESTRING
refund_line_items.quantityNULLABLEINTEGER
refund_line_items.subtotal_setNULLABLERECORD
refund_line_items.subtotal_set.shop_moneyNULLABLERECORD
refund_line_items.subtotal_set.shop_money.amountNULLABLEFLOAT
refund_line_items.subtotal_set.shop_money.currency_codeNULLABLESTRING
refund_line_items.total_tax_setNULLABLERECORD
refund_line_items.total_tax_set.shop_moneyNULLABLERECORD
refund_line_items.total_tax_set.shop_money.amountNULLABLEFLOAT
refund_line_items.total_tax_set.shop_money.currency_codeNULLABLESTRING
refund_line_items.line_itemNULLABLERECORD
refund_line_items.line_item.admin_graphql_api_idNULLABLESTRING
refund_line_items.line_item.titleNULLABLESTRING
refund_line_items.line_item.skuNULLABLESTRING
transactionsREPEATEDRECORD
transactions.admin_graphql_api_idNULLABLESTRING
transactions.gatewayNULLABLESTRING
transactions.kindNULLABLESTRING
transactions.statusNULLABLESTRING
transactions.amount_setNULLABLERECORD
transactions.amount_set.shop_moneyNULLABLERECORD
transactions.amount_set.shop_money.amountNULLABLEFLOAT
transactions.amount_set.shop_money.currency_codeNULLABLESTRING
Data schema for shopify_returns
Field NameModeType
idNULLABLESTRING
admin_graphql_api_idNULLABLESTRING
nameNULLABLESTRING
statusNULLABLESTRING
decline_reasonNULLABLESTRING
orderNULLABLERECORD
order.admin_graphql_api_idNULLABLESTRING
order.nameNULLABLESTRING
order.order_numberNULLABLEINTEGER
return_line_itemsREPEATEDRECORD
return_line_items.admin_graphql_api_idNULLABLESTRING
return_line_items.quantityNULLABLEINTEGER
return_line_items.return_reasonNULLABLESTRING
return_line_items.return_reason_noteNULLABLESTRING
return_line_items.customer_noteNULLABLESTRING
reverse_fulfillment_ordersREPEATEDRECORD
reverse_fulfillment_orders.admin_graphql_api_idNULLABLESTRING
reverse_fulfillment_orders.statusNULLABLESTRING
Data schema for shopify_store_navigation
Field NameModeType
menu_handleNULLABLESTRING
menu_titleNULLABLESTRING
collection_handleNULLABLESTRING
collection_titleNULLABLESTRING
breadcrumbNULLABLESTRING
level1_titleNULLABLESTRING
level1_handleNULLABLESTRING
level2_titleNULLABLESTRING
level2_handleNULLABLESTRING
level3_titleNULLABLESTRING
level3_handleNULLABLESTRING
Data schema for shopify_inventory_levels
Field NameModeType
idNULLABLESTRING
admin_graphql_api_idNULLABLESTRING
skuNULLABLESTRING
variant_admin_graphql_api_idNULLABLESTRING
variant_titleNULLABLESTRING
product_admin_graphql_api_idNULLABLESTRING
product_titleNULLABLESTRING
locationNULLABLERECORD
location.idNULLABLESTRING
location.admin_graphql_api_idNULLABLESTRING
location.nameNULLABLESTRING
availableNULLABLEINTEGER
on_handNULLABLEINTEGER
committedNULLABLEINTEGER
incomingNULLABLEINTEGER
updated_atNULLABLETIMESTAMP
Data schema for shopify_marketing_consents
Field NameModeType
idNULLABLESTRING
admin_graphql_api_idNULLABLESTRING
emailNULLABLESTRING
phoneNULLABLESTRING
email_marketing_stateNULLABLESTRING
email_marketing_opt_in_levelNULLABLESTRING
email_marketing_updated_atNULLABLETIMESTAMP
sms_marketing_stateNULLABLESTRING
sms_marketing_opt_in_levelNULLABLESTRING
sms_marketing_updated_atNULLABLETIMESTAMP
data_sale_opt_outNULLABLEBOOLEAN
is_newNULLABLEBOOLEAN
email_consent_changedNULLABLEBOOLEAN
sms_consent_changedNULLABLEBOOLEAN
created_atNULLABLETIMESTAMP
updated_atNULLABLETIMESTAMP