store_ credit_ transactions
The store_credit_transactions schema captures individual store credit movements. Use it to trace why store credit changed and which customer, order, company, source, or event a movement belongs to.
Anchor to Use casesUse cases
- Movement by event: Group
credited_store_credit_value,debited_store_credit_value, andexpired_store_credit_valuebystore_credit_eventto break down how much credit was issued, redeemed, and expired. - Movement source: Filter or group by
store_credit_sourceto show where credit movements originated. - Account link: Use
customer_id,order_id, andcompany_idto connect transactions to the affected account or commerce object. - Currency: Compare transaction values by
store_credit_currencyto separate credit movement across the currencies you operate in.
Anchor to MetricsMetrics
Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.
Metrics you can use when querying .
- Anchor to credited_store_credit_valuecredited_
store_ credit_ valuecredited_ store_ credit_ value MONEYMONEY - Anchor to debited_store_credit_valuedebited_
store_ credit_ valuedebited_ store_ credit_ value MONEYMONEY - Anchor to expired_store_credit_valueexpired_
store_ credit_ valueexpired_ store_ credit_ value MONEYMONEY
MONEY
A monetary amount representing currency values such as prices, revenue, costs, and discounts.
Anchor to DimensionsDimensions
Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.
Dimensions you can use when querying .
- Anchor to company_idcompany_
idcompany_ id IDENTITYIDENTITY - Anchor to company_location_idcompany_
location_ idcompany_ location_ id IDENTITYIDENTITY - Anchor to customer_idcustomer_
idcustomer_ id IDENTITYIDENTITY - Anchor to daydaydayDAY_TIMESTAMPDAY_TIMESTAMP
The day a store credit transaction happened.
- Anchor to day_of_weekday_
of_ weekday_ of_ week DAY_OF_WEEKDAY_OF_WEEK The day of the week a store credit transaction happened, with values Monday through Sunday.
- Anchor to hourhourhourHOUR_TIMESTAMPHOUR_TIMESTAMP
The hour a store credit transaction happened.
- Anchor to hour_of_dayhour_
of_ dayhour_ of_ day HOUR_OF_DAYHOUR_OF_DAY The hour of day a store credit transaction happened, with values 0 through 23.
- Anchor to minuteminuteminuteMINUTE_TIMESTAMPMINUTE_TIMESTAMP
The minute a store credit transaction happened.
- Anchor to monthmonthmonthMONTH_TIMESTAMPMONTH_TIMESTAMP
The month a store credit transaction happened.
- Anchor to month_of_yearmonth_
of_ yearmonth_ of_ year MONTH_OF_YEARMONTH_OF_YEAR The month of year a store credit transaction happened, with values 1 through 12.
- Anchor to order_idorder_
idorder_ id IDENTITYIDENTITY - Anchor to quarterquarterquarterQUARTER_TIMESTAMPQUARTER_TIMESTAMP
The quarter a store credit transaction happened.
- Anchor to secondsecondsecondSECOND_TIMESTAMPSECOND_TIMESTAMP
The second a store credit transaction happened.
- Anchor to shop_idshop_
idshop_ id IDENTITYIDENTITY - Anchor to store_credit_currencystore_
credit_ currencystore_ credit_ currency STRINGSTRING Currency of the store credit transaction
- Anchor to store_credit_eventstore_
credit_ eventstore_ credit_ event STRINGSTRING Values include Adjustment, Order cancellation, Order payment, Order refund, and Payment failure.
- Anchor to store_credit_expires_atstore_
credit_ expires_ atstore_ credit_ expires_ at MINUTE_TIMESTAMPMINUTE_TIMESTAMP The date and time a credited store credit amount is set to expire.
- Anchor to store_credit_idstore_
credit_ idstore_ credit_ id IDENTITYIDENTITY Shopify identifier for the store credit transaction
- Anchor to store_credit_sourcestore_
credit_ sourcestore_ credit_ source STRINGSTRING The origin can appear as Shopify, a staff member's name, or an app name.
- Anchor to weekweekweekWEEK_TIMESTAMPWEEK_TIMESTAMP
The week a store credit transaction happened.
- Anchor to week_of_yearweek_
of_ yearweek_ of_ year WEEK_OF_YEARWEEK_OF_YEAR The week of year a store credit transaction happened, with values 1 through 53.
- Anchor to yearyearyearYEAR_TIMESTAMPYEAR_TIMESTAMP
The year a store credit transaction happened.
- Anchor to company_namecompany_
namecompany_ name STRINGSTRING Name of the company
- Anchor to shop_nameshop_
nameshop_ name STRINGSTRING Name of your store
- Anchor to company_location_namecompany_
location_ namecompany_ location_ name STRINGSTRING Name of the company location
- Anchor to abandoned_checkout_dateabandoned_
checkout_ dateabandoned_ checkout_ date DAY_TIMESTAMPDAY_TIMESTAMP Date the customer most recently abandoned a cart
- Anchor to customer_account_statuscustomer_
account_ statuscustomer_ account_ status STRINGSTRING The customer's account state, with values Declined, Disabled, Enabled, and Invited.
- Anchor to customer_added_datecustomer_
added_ datecustomer_ added_ date DAY_TIMESTAMPDAY_TIMESTAMP The day the customer record was added, reported in your store's time zone.
- Anchor to customer_created_by_app_idcustomer_
created_ by_ app_ idcustomer_ created_ by_ app_ id IDENTITYIDENTITY The Shopify identifier for the app that created the customer.
- Anchor to customer_emailcustomer_
emailcustomer_ email STRINGSTRING Email address of the customer
- Anchor to customer_email_domaincustomer_
email_ domaincustomer_ email_ domain STRINGSTRING The part of the customer's email address after the @ symbol, such as gmail.com or your company's domain.
- Anchor to customer_languagecustomer_
languagecustomer_ language STRINGSTRING Language associated with the customer
- Anchor to customer_namecustomer_
namecustomer_ name STRINGSTRING Full name of the customer
- Anchor to is_b2b_orderis_
b2b_ orderis_ b2b_ order BOOLEANBOOLEAN Whether the order is a B2B order, with values
trueandfalse.- Anchor to is_canceled_orderis_
canceled_ orderis_ canceled_ order BOOLEANBOOLEAN Whether the order is canceled, with values
trueandfalse.- Anchor to order_checkout_currencyorder_
checkout_ currencyorder_ checkout_ currency STRINGSTRING The currency the buyer saw at checkout when placing the order. Values are currency codes such as USD, CAD, EUR, and GBP.
- Anchor to order_fulfillment_statusorder_
fulfillment_ statusorder_ fulfillment_ status STRINGSTRING The order's fulfillment state, with values Fulfilled, Partial, Restocked, and Unfulfilled.
- Anchor to order_includes_dutiesorder_
includes_ dutiesorder_ includes_ duties BOOLEANBOOLEAN Whether the order includes duties, with values
trueandfalse.- Anchor to order_nameorder_
nameorder_ name STRINGSTRING The name or number of the order as the customer sees it.
- Anchor to order_payment_statusorder_
payment_ statusorder_ payment_ status STRINGSTRING The order's payment state, such as Authorized, Paid, Partially refunded, or Pending.
- Anchor to order_sales_channelorder_
sales_ channelorder_ sales_ channel STRINGSTRING The sales channel where the order was placed, shown as a channel name such as Online Store or POS.
- Anchor to order_sales_channel_idorder_
sales_ channel_ idorder_ sales_ channel_ id IDENTITYIDENTITY
IDENTITY
A unique identifier for a Shopify resource such as a customer, product, or order.
DAY_TIMESTAMP
A date value truncated to day precision.
DAY_OF_WEEK
A day within a week, used for weekday-based grouping and filtering.
HOUR_TIMESTAMP
A timestamp truncated to hour precision.
HOUR_OF_DAY
An hour within a day, typically represented as an integer from 0 to 23.
MINUTE_TIMESTAMP
A timestamp truncated to minute precision.
MONTH_TIMESTAMP
A date value representing the start of a month.
MONTH_OF_YEAR
A month number within a year.
QUARTER_TIMESTAMP
A date value representing the start of a fiscal quarter.
SECOND_TIMESTAMP
A timestamp truncated to second precision.
STRING
A sequence of characters representing text data.
WEEK_TIMESTAMP
A date value representing the start of a week.
WEEK_OF_YEAR
A week number within a year.
YEAR_TIMESTAMP
A date value representing the start of a year.
BOOLEAN
A true or false value representing binary states.
Anchor to MATCHES expressionsMATCHES expressions
Use these expressions inside a MATCHES filter to keep rows that have at least one related record matching the parameters. Each parameter filters on a dimension or metric of the related records.
- Anchor to customer.orders_placedcustomer.
orders_ placedcustomer. orders_ placed StoreCreditTransactionsCustomerOrdersPlacedConditionsStoreCreditTransactionsCustomerOrdersPlacedConditions Orders the customer placed, filterable by order date, source app, location, order count, and spend.
- Anchor to customer.products_purchasedcustomer.
products_ purchasedcustomer. products_ purchased StoreCreditTransactionsCustomerProductsPurchasedConditionsStoreCreditTransactionsCustomerProductsPurchasedConditions Products the customer bought, filterable by product ID, purchase date, quantity per order, and total quantity.
- Anchor to customer.shopify_email.bouncedcustomer.
shopify_ email. bouncedcustomer. shopify_ email. bounced StoreCreditTransactionsCustomerShopifyEmailBouncedConditionsStoreCreditTransactionsCustomerShopifyEmailBouncedConditions Emails that bounced for the customer, filterable by marketing activity, bounce date, and bounce count.
- Anchor to customer.shopify_email.clickedcustomer.
shopify_ email. clickedcustomer. shopify_ email. clicked StoreCreditTransactionsCustomerShopifyEmailClickedConditionsStoreCreditTransactionsCustomerShopifyEmailClickedConditions Emails the customer clicked, filterable by marketing activity, click date, and click count.
- Anchor to customer.shopify_email.deliveredcustomer.
shopify_ email. deliveredcustomer. shopify_ email. delivered StoreCreditTransactionsCustomerShopifyEmailDeliveredConditionsStoreCreditTransactionsCustomerShopifyEmailDeliveredConditions Emails delivered to the customer, filterable by marketing activity, delivery date, and delivery count.
- Anchor to customer.shopify_email.marked_as_spamcustomer.
shopify_ email. marked_ as_ spamcustomer. shopify_ email. marked_ as_ spam StoreCreditTransactionsCustomerShopifyEmailMarkedAsSpamConditionsStoreCreditTransactionsCustomerShopifyEmailMarkedAsSpamConditions Emails the customer marked as spam, filterable by marketing activity, spam-report date, and spam-report count.
- Anchor to customer.shopify_email.openedcustomer.
shopify_ email. openedcustomer. shopify_ email. opened StoreCreditTransactionsCustomerShopifyEmailOpenedConditionsStoreCreditTransactionsCustomerShopifyEmailOpenedConditions Emails the customer opened, filterable by marketing activity, open date, and open count.
- Anchor to customer.shopify_email.unsubscribedcustomer.
shopify_ email. unsubscribedcustomer. shopify_ email. unsubscribed StoreCreditTransactionsCustomerShopifyEmailUnsubscribedConditionsStoreCreditTransactionsCustomerShopifyEmailUnsubscribedConditions Email unsubscribe events for the customer, filterable by marketing activity, unsubscribe date, and unsubscribe count.
- Anchor to customer.store_credit_accountscustomer.
store_ credit_ accountscustomer. store_ credit_ accounts StoreCreditTransactionsCustomerStoreCreditAccountsConditionsStoreCreditTransactionsCustomerStoreCreditAccountsConditions Store credit accounts for the customer, filterable by balance, currency, expiry date, and most recent credit date.
- Anchor to customer.storefront_event.collection_viewedcustomer.
storefront_ event. collection_ viewedcustomer. storefront_ event. collection_ viewed StoreCreditTransactionsCustomerStorefrontEventCollectionViewedConditionsStoreCreditTransactionsCustomerStorefrontEventCollectionViewedConditions Collection pages the customer viewed, filterable by collection ID, view date, and view count.
- Anchor to customer.storefront_event.product_viewedcustomer.
storefront_ event. product_ viewedcustomer. storefront_ event. product_ viewed StoreCreditTransactionsCustomerStorefrontEventProductViewedConditionsStoreCreditTransactionsCustomerStorefrontEventProductViewedConditions Product pages the customer viewed, filterable by product ID, view date, and view count.
- Anchor to customer.within_distancecustomer.
within_ distancecustomer. within_ distance StoreCreditTransactionsCustomerWithinDistanceConditionsStoreCreditTransactionsCustomerWithinDistanceConditions Customers with an address within a distance of a location, filterable by coordinates and radius.
StoreCreditTransactionsCustomerOrdersPlacedConditions
Fields you can use inside `customer.orders_placed MATCHES (...)` when querying `FROM store_credit_transactions`.
- amount
Filter. Amount spent per order.
MONEY - app_id
Filter. App ID associated with the order.
IDENTITY - date
Filter. Date the order was placed.
TIMESTAMP - location_id
Filter. Location ID associated with the order.
IDENTITY - count
Metric. Number of orders placed.
INTEGER - sum_amount
Metric. Amount spent in the date range.
MONEY
TIMESTAMP
A full-precision timestamp including date and time.
INTEGER
A whole number without decimal places, used for counts, quantities, and other discrete numeric values.
StoreCreditTransactionsCustomerProductsPurchasedConditions
Fields you can use inside `customer.products_purchased MATCHES (...)` when querying `FROM store_credit_transactions`.
- date
Filter. Date the product(s) were purchased.
TIMESTAMP - id
Filter. Product IDs.
IDENTITY - quantity
Filter. Number purchased per order.
INTEGER - sum_quantity
Metric. Number purchased within the date range.
INTEGER
StoreCreditTransactionsCustomerShopifyEmailBouncedConditions
Fields you can use inside `customer.shopify_email.bounced MATCHES (...)` when querying `FROM store_credit_transactions`.
- activity_id
Filter. Marketing activity ID of the email campaign.
IDENTITY - date
Filter. Date on which the email was bounced.
TIMESTAMP - count
Metric. Exact number of times an email was bounced.
INTEGER
StoreCreditTransactionsCustomerShopifyEmailClickedConditions
Fields you can use inside `customer.shopify_email.clicked MATCHES (...)` when querying `FROM store_credit_transactions`.
- activity_id
Filter. Marketing activity ID of the email campaign.
IDENTITY - date
Filter. Date on which the email was clicked.
TIMESTAMP - count
Metric. Exact number of times an email was clicked.
INTEGER
StoreCreditTransactionsCustomerShopifyEmailDeliveredConditions
Fields you can use inside `customer.shopify_email.delivered MATCHES (...)` when querying `FROM store_credit_transactions`.
- activity_id
Filter. Marketing activity ID of the email campaign.
IDENTITY - date
Filter. Date on which the email was delivered.
TIMESTAMP - count
Metric. Exact number of times an email was delivered.
INTEGER
StoreCreditTransactionsCustomerShopifyEmailMarkedAsSpamConditions
Fields you can use inside `customer.shopify_email.marked_as_spam MATCHES (...)` when querying `FROM store_credit_transactions`.
- activity_id
Filter. Marketing activity ID of the email campaign.
IDENTITY - date
Filter. Date on which the email was marked as spam.
TIMESTAMP - count
Metric. Exact number of times an email was marked as spam.
INTEGER
StoreCreditTransactionsCustomerShopifyEmailOpenedConditions
Fields you can use inside `customer.shopify_email.opened MATCHES (...)` when querying `FROM store_credit_transactions`.
- activity_id
Filter. Marketing activity ID of the email campaign.
IDENTITY - date
Filter. Date on which the email was opened.
TIMESTAMP - count
Metric. Exact number of times an email was opened.
INTEGER
StoreCreditTransactionsCustomerShopifyEmailUnsubscribedConditions
Fields you can use inside `customer.shopify_email.unsubscribed MATCHES (...)` when querying `FROM store_credit_transactions`.
- activity_id
Filter. Marketing activity ID of the email campaign.
IDENTITY - date
Filter. Date on which the email was unsubscribed.
TIMESTAMP - count
Metric. Exact number of times an email was unsubscribed.
INTEGER
StoreCreditTransactionsCustomerStoreCreditAccountsConditions
Fields you can use inside `customer.store_credit_accounts MATCHES (...)` when querying `FROM store_credit_transactions`.
- balance
Filter. Amount available to spend.
FLOAT - currency
Filter. Currency associated with the account.
STRING - last_credit_date
Filter. Date when credits were last added.
TIMESTAMP - next_expiry_date
Filter. Date when credits expire.
TIMESTAMP
FLOAT
A floating-point number used for measurements, rates, and other continuous numeric values.
StoreCreditTransactionsCustomerStorefrontEventCollectionViewedConditions
Fields you can use inside `customer.storefront_event.collection_viewed MATCHES (...)` when querying `FROM store_credit_transactions`.
- date
Filter. Date collection was viewed.
TIMESTAMP - id
Filter. Collection ID.
IDENTITY - count
Metric. Times collection was viewed.
INTEGER
StoreCreditTransactionsCustomerStorefrontEventProductViewedConditions
Fields you can use inside `customer.storefront_event.product_viewed MATCHES (...)` when querying `FROM store_credit_transactions`.
- date
Filter. Date product was viewed.
TIMESTAMP - id
Filter. Product ID.
IDENTITY - count
Metric. Times product was viewed.
INTEGER
StoreCreditTransactionsCustomerWithinDistanceConditions
Fields you can use inside `customer.within_distance MATCHES (...)` when querying `FROM store_credit_transactions`.
- coordinates
Filter. Latitude and longitude of location. Required.
GEO_COORDINATE - distance_km
Filter. Maximum distance from location, in kilometers. Required: provide one of the `distance_km/mi` group.
FLOAT - distance_mi
Filter. Maximum distance from location, in miles. Required: provide one of the `distance_km/mi` group.
FLOAT
GEO_COORDINATE
A geographic coordinate value.
store_credit_summaries: Daily balance snapshots aggregated from these transactions.payments: Transaction data when you want to see how store credit fits into the full payment mix.customers: Customer-level data to enrich the top-spender list with lifetime value.