---
title: shop_post_purchase_offers
description: >-
  Reference for the ShopifyQL `shop_post_purchase_offers` schema. Every metric
  and dimension, paired with worked example queries.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/shop_post_purchase_offers
  md: >-
    https://shopify.dev/docs/api/shopifyql/latest/schemas/sessions_and_behavior/shop_post_purchase_offers.md
api_name: shopifyql
---

# shop\_​post\_​purchase\_​offers

The `shop_post_purchase_offers` [schema](https://shopify.dev/docs/api/shopifyql/latest/schemas) captures the post-purchase offers shown in Shop, on their own rather than linked to the orders they led to. Use it to report how often each offer was shown to customers.

### Use cases

* **Offer by code**: Group [`shop_post_purchase_offers`](#shoppostpurchaseoffersmetric-propertydetail-shoppostpurchaseoffers) by [`shop_post_purchase_discount_code`](#shoppostpurchaseoffersdimension-propertydetail-shoppostpurchasediscountcode) to rank offer codes by how often they're shown.
* **Offer trend**: Trend [`shop_post_purchase_offers`](#shoppostpurchaseoffersmetric-propertydetail-shoppostpurchaseoffers) by day to see how offer volume moves over time.

Examples

### Examples

* ####

  ##### Description

  Show the 25 discount codes shown on the most \`shop\_post\_purchase\_offers\` this quarter. This example uses \[\`WITH TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#total-columns) to add the quarter's total offer volume to every row.

  ##### ShopifyQL

  ```shopifyql
  FROM shop_post_purchase_offers
    SHOW shop_post_purchase_offers
    GROUP BY shop_post_purchase_discount_code WITH TOTALS
    DURING this_quarter
    ORDER BY shop_post_purchase_offers DESC
    LIMIT 25
  VISUALIZE shop_post_purchase_offers TYPE horizontal_bar
  ```

* ####

  ##### Description

  Show \[\`shop\_post\_purchase\_offers\`]\(#shoppostpurchaseoffersmetric-propertydetail-shoppostpurchaseoffers) by discount code and day of week this year. This example uses \`TYPE heatmap\` to render the two-dimension grouping as a color-coded grid, so the strongest code-and-day combinations stand out.

  ##### ShopifyQL

  ```shopifyql
  FROM shop_post_purchase_offers
    SHOW shop_post_purchase_offers
    GROUP BY shop_post_purchase_discount_code, day_of_week
    DURING this_year
    ORDER BY shop_post_purchase_offers DESC
    LIMIT 100
  VISUALIZE shop_post_purchase_offers TYPE heatmap
  ```

* ####

  ##### Description

  Track weekly \`shop\_post\_purchase\_offers\` across this quarter. This example uses \[\`WITH TOTALS\`]\(/docs/api/shopifyql/latest/syntax/with#total-columns) to add a quarter-to-date total beside the weekly rows.

  ##### ShopifyQL

  ```shopifyql
  FROM shop_post_purchase_offers
    SHOW shop_post_purchase_offers
    TIMESERIES week WITH TOTALS
    DURING this_quarter
    ORDER BY week ASC
  VISUALIZE shop_post_purchase_offers TYPE line
  ```

* ####

  ##### Description

  Compare \`shop\_post\_purchase\_offers\` last month against the month before. This example uses \[\`COMPARE TO previous\_period\`]\(/docs/api/shopifyql/latest/syntax/compare-to) to benchmark your date range against the equal-length period right before it.

  ##### ShopifyQL

  ```shopifyql
  FROM shop_post_purchase_offers
    SHOW shop_post_purchase_offers
    WITH PERCENT_CHANGE
    DURING last_month
    COMPARE TO previous_period
  ```

***

## Metrics

Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.

Metrics you can use when querying `FROM shop_post_purchase_offers`.

* **shop\_​post\_​purchase\_​offers**

  **INTEGER**

  Counts unique customers who receive Shop post-purchase offers. Each customer counts one time in each result, even if the customer receives more than one Shop post-purchase offer in that result.

### INTEGER

Whole number without decimal places, used for counts and quantities

```ts
```

***

## Dimensions

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 `FROM shop_post_purchase_offers`.

* **day**

  **DAY\_TIMESTAMP**

  Day (timestamp) the data was recorded

* **day\_​of\_​week**

  **DAY\_OF\_WEEK**

  Day of week the data was recorded

* **hour**

  **HOUR\_TIMESTAMP**

  Hour (timestamp) the data was recorded

* **hour\_​of\_​day**

  **HOUR\_OF\_DAY**

  Hour of day the data was recorded

* **minute**

  **MINUTE\_TIMESTAMP**

  Minute (timestamp) the data was recorded

* **month**

  **MONTH\_TIMESTAMP**

  Month (timestamp) the data was recorded

* **month\_​of\_​year**

  **MONTH\_OF\_YEAR**

  Month of year the data was recorded

* **quarter**

  **QUARTER\_TIMESTAMP**

  Quarter (timestamp) the data was recorded

* **second**

  **SECOND\_TIMESTAMP**

  Second (timestamp) the data was recorded

* **shop\_​id**

  **IDENTITY**

  The unique Shopify identifier for your store. Use [`shop_id`](#shoppostpurchaseoffersdimension-propertydetail-shopid) with [`shop_name`](#shoppostpurchaseoffersdimension-propertydetail-shopname) to show readable store labels.

* **shop\_​post\_​purchase\_​discount\_​code**

  **STRING**

  Discount code created through the Shop post-purchase offer

* **week**

  **WEEK\_TIMESTAMP**

  Week (timestamp) the data was recorded

* **week\_​of\_​year**

  **WEEK\_OF\_YEAR**

  Week of year the data was recorded

* **year**

  **YEAR\_TIMESTAMP**

  Year (timestamp) the data was recorded

* **shop\_​name**

  **STRING**

  Name of your store

### DAY\_TIMESTAMP

Date with the time of day removed

```ts
```

### DAY\_OF\_WEEK

Day of the week, used to group or filter data by weekday

```ts
```

### HOUR\_TIMESTAMP

Date and time with minutes and seconds removed

```ts
```

### HOUR\_OF\_DAY

Hour of the day, shown as a whole number from 0 to 23

```ts
```

### MINUTE\_TIMESTAMP

Date and time with seconds removed

```ts
```

### MONTH\_TIMESTAMP

Date for the start of a month

```ts
```

### MONTH\_OF\_YEAR

Month number within a year

```ts
```

### QUARTER\_TIMESTAMP

Date for the start of a fiscal quarter

```ts
```

### SECOND\_TIMESTAMP

Date and time with fractions of a second removed

```ts
```

### IDENTITY

Unique identifier for a Shopify resource such as a customer or order

```ts
```

### STRING

Text made of letters, numbers, or symbols

```ts
```

### WEEK\_TIMESTAMP

Date for the start of a week

```ts
```

### WEEK\_OF\_YEAR

Week number within a year

```ts
```

### YEAR\_TIMESTAMP

Date for the start of a year

```ts
```

***

## Related schemas

* [`discounts`](https://shopify.dev/docs/api/shopifyql/latest/schemas/sales_revenue/discounts): Switch to this for store-wide discount usage rather than the post-purchase surface.

***
