> ## 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.

# Gift cards

> Gift cards issued, sold, spent and disabled in the period, and what they hold at its end, including balances unused for a year.

Gift cards issued, sold, spent and disabled in the period, and what they hold at its end, including balances unused for a year.

## Example

```sql theme={null}
FROM gift_cards
  SHOW gift_cards_issued, starting_gift_card_balance
  GROUP BY gift_card_event
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY gift_cards_issued DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `gift_cards_issued` | Number | Gift cards created in the period, sold or issued. |
| `starting_gift_card_balance` | Currency | What all gift cards held at the start of the period. |
| `issued_gift_card_balance` | Currency | The value of gift cards you issued (not sold) in the period. |
| `sold_gift_card_balance` | Currency | The value of gift cards sold on orders in the period. |
| `adjusted_gift_card_value` | Currency | Changes made to gift card balances by hand in the period. |
| `disabled_gift_card_value` | Currency | Balances taken off the liability when gift cards were disabled, as a negative amount. |
| `gift_cards_disabled` | Number | Gift cards disabled in the period. |
| `ending_gift_card_balance` | Currency | What all enabled gift cards hold at the end of the period: what you owe customers. |
| `gift_card_balance_net_change` | Currency | How the outstanding balance moved over the period: ending minus starting. |
| `dormant_gift_card_balance` | Currency | Balance on gift cards unused for a year or more at the end of the period: likely never to be spent. |

## Dimensions

| Dimension | Description |
| - | - |
| `gift_card_event` | issued, sold, debit (spent), credit, cash\_out or disabled. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `gift_card_event` | Text | issued, sold, debit (spent), credit, cash\_out or disabled. |

## 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 `shop.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `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)
* [Store credit transactions](https://docs.queryful.app/queryfulql/datasets/store_credit_transactions.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.