> For the complete documentation index, see [llms.txt](https://document.tek-labs.app/post-purchase-userguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://document.tek-labs.app/post-purchase-userguide/user-guides/how-to-set-up-funnel-step-by-step/understand-the-working-logic-of-funnels.md).

# Understand the working logic of funnels

Before setting things up, take a quick look at how the app chooses which funnel to show.

## One funnel, three pages

A funnel can contain content for three pages of the buying journey:

```
Checkout page  →  payment  →  Post-purchase page  →  Thank you page
(Checkout tab)                (Post purchase upsell tab)   (Thank you page tab)
```

All three share the funnel's **Conditions**. Apart from that, they work independently: if the post-purchase offer doesn't show (for example, the order has no shipping address), the Thank you page blocks can still show as normal.

## Which funnel is shown

1. The app looks at your **active** funnels only.
2. It keeps the funnels whose **Conditions** match the order.
3. If more than one matches, it uses the one with the highest priority (priority 1 first). Set the order in [Manage priority](/post-purchase-userguide/getting-started/managing-funnels.md#manage-priority).

This choice is made separately for each page:

| Page               | Funnels considered                                           |
| ------------------ | ------------------------------------------------------------ |
| Post-purchase page | Matching funnels that have at least one post-purchase offer. |
| Thank you page     | Matching funnels. Their Thank You blocks are shown.          |
| Checkout page      | Matching funnels. Their Checkout blocks are shown.           |

So one funnel can supply the post-purchase offer while a different funnel supplies the Thank you page blocks.

{% hint style="info" %}
The **payment method** condition can only be checked once payment is done, so it applies only on the Thank you page. See [Funnel conditions](/post-purchase-userguide/user-guides/how-to-set-up-funnel-step-by-step/funnel-conditions.md).
{% endhint %}

## The post-purchase flow

```
              Upsell #1
          ┌──────┴──────┐
     if accepted    if declined
          │              │
      Upsell #2      Downsell
```

* **Upsell #1** is shown first.
* **Upsell #2** is shown only if the customer accepts Upsell #1.
* **Downsell** is shown only if the customer declines Upsell #1.

Upsell #2 and the Downsell are optional. A funnel doesn't need a post-purchase offer at all.
