> ## Documentation Index
> Fetch the complete documentation index at: https://docs.queryful.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Store credit transactions

> Each store credit movement: credit added, spent and expired, by customer, order, event and source.

Each store credit movement: credit added, spent and expired, by customer, order, event and source.

## Example

```sql theme={null}
FROM store_credit_transactions
  SHOW credited_store_credit_value, debited_store_credit_value
  GROUP BY store_credit_id
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY credited_store_credit_value DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `credited_store_credit_value` | Currency | Store credit added to customers' balances. |
| `debited_store_credit_value` | Currency | Store credit customers spent, as a negative amount, as Shopify reports it. |
| `expired_store_credit_value` | Currency | Store credit that expired unused, as a negative amount. |

## Dimensions

| Dimension | Description |
| - | - |
| `store_credit_id` | The store credit account's ID. |
| `customer_name` | The customer's name. |
| `customer_email` | The customer's email address. |
| `order_name` | Order name, such as #1001. |
| `store_credit_event` | What moved the credit, such as Adjustment, Order payment or Order refund. |
| `store_credit_source` | Who gave the credit: Shopify, a staff member or an app. |
| `store_credit_currency` | The credit's currency. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `store_credit_id` | Text | The store credit account's ID. |
| `customer_name` | Text | The customer's name. |
| `customer_email` | Text | The customer's email address. |
| `store_credit_event` | Text | What moved the credit, such as Adjustment, Order payment or Order refund. |
| `store_credit_source` | Text | Who gave the credit: Shopify, a staff member or an app. |
| `store_credit_currency` | Text | The credit's currency. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `customer.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Customer |
| `customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Customer › Company |
| `order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Order |
| `order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Order › Customer |
| `order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Customer › Company |
| `order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company |
| `order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Order › Company location |
| `order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company location › Company |
| `order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Order › Location |
| `order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Order › Market |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Payments](https://docs.queryful.app/queryfulql/datasets/payments.md)
* [Payouts](https://docs.queryful.app/queryfulql/datasets/payouts.md)
* [Payout transactions](https://docs.queryful.app/queryfulql/datasets/balance_transactions.md)
* [Disputes](https://docs.queryful.app/queryfulql/datasets/disputes.md)
* [Chargebacks](https://docs.queryful.app/queryfulql/datasets/chargebacks.md)
* [Gift cards](https://docs.queryful.app/queryfulql/datasets/gift_cards.md)
* [Store credit balance](https://docs.queryful.app/queryfulql/datasets/store_credit_summaries.md)
* [Payment attempts](https://docs.queryful.app/queryfulql/datasets/payment_attempts.md)
* [Receivables](https://docs.queryful.app/queryfulql/datasets/receivables.md)
* [Payments balance](https://docs.queryful.app/queryfulql/datasets/payments_balance.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.