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

# Dashboard template

> Reference for Liquid tags supported in the Customer Portal dashboard template (dashboard.liquid), grouped by default and optional usage.

`dashboard.liquid` tags are grouped by default vs optional usage.

* Default components are already present in the shipped `dashboard.liquid` template.
* Optional components can be added or used to replace parts of the default layout.

Shared page components are documented on [Shared page components](https://docs.firmhouse.com/customer-portal-v2/components/common.md): `{% legacy_navbar %}`.

## Hide subscription actions for one-time purchases

In custom templates, check `subscription.status == "one_time_purchase"` to identify a one-time-purchase account. This checks the account status, independently of its retained plan or products. A one-time product on an active subscription does not make that account a one-time purchase.

Wrap your existing subscription controls in this condition, keeping their existing eligibility checks inside it:

```liquid theme={null}
{% unless subscription.status == "one_time_purchase" %}
  {% simple_next_billing_date_with_confirm %}
  {% simple_plan_switch_with_confirm %}
  {% manage_products %}
  {% add_product %}
{% endunless %}
```

Use the same condition around custom links, forms, navigation, and subscription wording, including links using `subscription.add_product_url` or `subscription.switch_plan_url`. A URL being present does not mean the account may perform the action. Review controls in shared templates and custom JavaScript as well as `dashboard.liquid`.

To keep product details visible with explicitly read-only controls:

```liquid theme={null}
{% if subscription.status == "one_time_purchase" %}
  <p>One-time purchase</p>
  {% product_listing show_delete_button: false, show_quantity_selector: false, show_swap_button: false, show_replacement_button: false %}
{% else %}
  {% product_listing %}
{% endif %}
```

Keep your existing product-list options in the non-OTP branch. For `product_listing_filtered`, preserve your filters and also set `show_add_button: false` and `show_manage_button: false` in the OTP branch. Its `shipment_schedule: "one_time_purchase"` option filters product schedules; it does not check the account status.

Firmhouse's standard components already suppress OTP product-management controls, and the server rejects OTP product, plan-switch, and shipment-date changes. Custom template conditions make your own controls and wording agree with that restriction. They do not cancel existing scheduled items, change saved prices, or prevent original delayed OTP fulfillment. Keep order history and account information accessible, and ask support to review unexpected future shipments separately.

Your team or the developer maintaining your custom portal can make this change under **Customer Portal → Templates**, with template-editing permission. Firmhouse support can help if you need assistance; a backend change is not required for this condition. Save a draft and use [template package preview](https://docs.firmhouse.com/customer-portal-v2/quickstart.md#preview-the-latest-template-package) to check an OTP with retained products, an OTP without active products, and a normal active subscription. Confirm that custom OTP controls are hidden and subscribers retain their permitted actions before publishing.

## Delivery offset for custom timelines

`project.delivery_days_after_shipment_date` exposes the project's configured delivery offset as an integer number of days. It defaults to `0` when no offset is configured, so custom timelines can use the same setting as the delivery-date picker instead of hardcoding it.

```liquid theme={null}
{% assign delivery_offset_seconds = project.delivery_days_after_shipment_date | times: 86400 %}
```

This is an offset, not a calculated next delivery date. Apply it to the shipment date appropriate for your subscription setup; prepaid shipments and anchored schedules do not necessarily follow the next billing date.

## `{% referrals_banner %}`

Displays the native Firmhouse referral invitation banner and links to the referrals page.

Used in: dashboard.liquid

```liquid theme={null}
{% referrals_banner description: "Invite your friends", button_text: "View referrals", visible: true %}
```

The banner appears when native referral discounts are enabled, both referral promotions are active, and the customer has a referrer code. It ignores legacy banner visibility and copy settings. ReferralCandy is a separate integration.

| Parameter | Type | Default | Description |
| - | - | - | - |
| `description` | String | Default reward explanation | Sanitized rich text for the invitation. |
| `button_text` | String | Localized default label | Plain-text link label. |
| `visible` | Boolean | `true` | Hide the banner without changing referral eligibility. |

The default dashboard renders this banner only after `referrals.liquid` is published, or in an isolated preview that resolves a Referrals version. Publishing Dashboard alone does not adopt Referrals. Resetting Referrals hides the default banner again. Explicitly placing this tag in a custom dashboard remains an independent template choice.

The default dashboard passes the `referrals.banner_description` and `referrals.banner_button_text` template translations. Edit those translations or pass explicit arguments.

The destination can be customized using [the referrals template](https://docs.firmhouse.com/customer-portal-v2/components/referrals-template.md).

## Default components

## `{% promotional_offer %}`

Shows an offer when the current subscription is eligible for one. If more than one offer applies, Firmhouse shows the
pending offer with the lowest priority number. The card includes the offer title, description, benefit, commitment when
present, and a link where the authenticated customer can review and accept or decline the offer.

The default `dashboard.liquid` template includes this tag. It renders only when Workflow Builder is enabled in
**New Features** and the subscription has an eligible offer that has not been accepted or declined.

```liquid theme={null}
{% promotional_offer %}
```

For a custom offer experience, loop over `subscription.eligible_promotional_offers` instead. The collection is sorted
by priority and exposes every pending eligible offer:

```liquid theme={null}
{% for offer in subscription.eligible_promotional_offers %}
  <h2>{{ offer.title }}</h2>
  <p>{{ offer.description }}</p>
  <a href="{{ offer.accept_url }}">View offer</a>
{% endfor %}
```

Each offer also exposes `offer.reactivates_subscription`, a boolean that is `true` when accepting the offer reactivates
a cancelled subscription or resumes a paused one. Use it to hide a template's standard reactivation or resume prompt
when the displayed offer already performs that action, so campaigns do not show both at once:

```liquid theme={null}
{% assign displayed_offer = subscription.eligible_promotional_offers.first %}
{% unless displayed_offer.reactivates_subscription %}
  {% subscription_reactivation_banner %}
{% endunless %}
```

## Pause and resume actions

The default `dashboard.liquid` template includes pause or resume action links when subscription pausing is enabled for the project and the current subscription state allows the action.

Use the same conditions in custom templates:

```liquid theme={null}
{% if project.self_service_center_subscription_pausing_enabled and subscription.allowed_to_pause? %}
  <a href="{{ subscription.pause_subscription_url }}">
    {{ "dashboard.pause_subscription" | t: default: "Pause subscription" }}
  </a>
{% endif %}

{% if project.self_service_center_subscription_pausing_enabled and subscription.allowed_to_resume? %}
  <a href="{{ subscription.resume_subscription_url }}">
    {{ "dashboard.resume_subscription" | t: default: "Resume subscription" }}
  </a>
{% endif %}
```

The action pages use the existing Customer Portal pause and resume confirmation flows.

## `{% subscription_pause_resume_banner %}`

Block-style pause or resume callout.

The default `dashboard.liquid` template includes this tag near the top of the dashboard for paused subscriptions, and below the shipment/frequency controls for active subscriptions. It renders when subscription pausing is enabled for the project and the current subscription can be paused or resumed. Active subscriptions show pause copy and a pause button. Paused subscriptions show paused-state copy and a resume button.

| Parameter | Type | Default |
| - | - | - |
| `pause_title` | String | `"Pause your subscription"` |
| `pause_message` | String | Dashboard pause hint translation |
| `pause_button_text` | String | `"Pause subscription"` |
| `resume_title` | String | `"Paused"` |
| `resume_message` | String | Dashboard resume hint translation |
| `resume_button_text` | String | `"Resume subscription"` |
| `show_title` | Boolean | `true` |

```liquid theme={null}
{% subscription_pause_resume_banner %}
```

```liquid theme={null}
{% subscription_pause_resume_banner pause_title: "Need a break?" pause_message: "Pause deliveries until you are ready again." %}
```

## `{% subscription_reactivation_banner %}`

Lets customers restart a cancelled subscription from Customer Portal v2. It appears only for cancelled subscriptions when **Customer Portal Subscription Reactivation** is enabled in **New Features**.

The current default `dashboard.liquid` template already includes this component. If your project uses a customized dashboard template, add the tag where customers should see the reactivation form:

```liquid theme={null}
{% if subscription.status == "cancelled" %}
  {% subscription_reactivation_banner %}
{% endif %}
```

The component supports optional customer-facing text:

| Parameter | Type | Default |
| - | - | - |
| `title` | String | `"Restart your subscription"` |
| `message` | String | `"Continue receiving orders by reactivating this subscription."` |
| `button_text` | String | `"Reactivate subscription"` |
| `button_classes` | String | Default Customer Portal primary button classes |

```liquid theme={null}
{% subscription_reactivation_banner title: "Welcome back" button_text: "Restart deliveries" button_classes: "rounded-lg bg-green-700 px-5 py-3 text-white" %}
```

For subscriptions with a flexible billing cycle or one shipment frequency for all products, customers must select the next billing date before reactivating. Plan-based subscriptions can use today, except Shopify subscriptions. Order-based and Shopify subscriptions can use tomorrow at the earliest. Plan-based projects also explain that the charge is created during the night following the selected date.

After a successful reactivation, Firmhouse restores the subscription and clears its cancellation date. If the subscription cannot be reactivated, the customer stays on the dashboard and sees the reason.

For the complete reactivation workflow in the Firmhouse Portal, Customer Portal v2, and GraphQL API, see [Reactivate a subscription](https://docs.firmhouse.com/manage/subscriptions/reactivating-a-subscription.md).

## ReferralCandy banner

The default `dashboard.liquid` template includes a ReferralCandy banner when `subscription.referral_candy.url` is available for the current subscription.

The default banner:

* Links **More info** to the customer's ReferralCandy invite page (`subscription.referral_candy.url`)
* Copies the customer's ReferralCandy invite link from `subscription.referral_candy.url`
* Shows the configured advocate reward discount from `subscription.referral_candy.advocate_reward_discount` when Firmhouse can resolve a valid reward for the subscription
* Falls back to a generic translated message when the reward discount is unavailable

If you replace the default dashboard layout, add your own ReferralCandy block if you still want customers to see their personal referral link.

`subscription.referral_candy.url` is only available when Firmhouse can fetch an invite link from ReferralCandy for the subscription. If the ReferralCandy campaign is stopped, paused, or configured in a way that prevents invite links from being created, the value is blank and the default banner stays hidden.

```liquid theme={null}
{% assign referral_candy_url = subscription.referral_candy.url %}
{% if referral_candy_url %}
  {% assign reward_discount = subscription.referral_candy.advocate_reward_discount %}

  {% if reward_discount %}
    {{ "dashboard.referral_candy_banner.message_with_discount" | t: discount: reward_discount }}
  {% else %}
    {{ "dashboard.referral_candy_banner.message" | t }}
  {% endif %}
{% endif %}
```

## `{% prepaid_renewal %}`

Prepaid renewal notice and call to action.

The default `dashboard.liquid` template includes this tag. It renders a renewal block for prepaid subscriptions when the renewal date is coming up and the prepaid subscription was created from a regular subscription through a prepaid upgrade.

Customers can open the renewal options page from this block. On that page, they can keep renewing prepaid, switch back to the original regular billing subscription, or update the renewal payment date without changing their renewal option.

```liquid theme={null}
{% prepaid_renewal %}
```

```html theme={null}
<div id="sscv2_prepaid_renewal">
  <h3>Prepaid renewal coming up</h3>
  <p>Your prepaid subscription will renew on March 12, 2026</p>
  <a href="/self-service/subscription/prepaid_renewal/new">Choose renewal option</a>
</div>
```

## `{% ship_now %}`

Adds a link that opens a confirmation window showing the products to order and the next billing date. Confirming starts order creation and recalculates the billing date from today using the subscription's billing frequency. For Shopify-billed subscriptions, customers wait while Shopify processes payment and the order is imported. Customers see a success message after the order is created, or an error if it cannot be created. Payment and fulfillment continue through your normal order process. If you use a pre-confirmation workflow, the billing date changes when the order is confirmed; skipping the order leaves the existing date unchanged.

```liquid theme={null}
{% ship_now %}
{% ship_now label: 'Send my next order now', classes: 'underline font-medium' %}
```

| Parameter | Type | Default |
| - | - | - |
| `label` | String | Translated “Ship now” |
| `classes` | String | None |

The link has no button styling, so you can style it through `classes` or your theme's link styles. Add the tag to your dashboard template where you want it to appear.

Available for active standard subscriptions with a shared shipment frequency and products to ship, including Shopify-billed subscriptions. Prepaid plans, fixed-calendar plans, and one-time purchases are not supported. For Firmhouse-billed subscriptions, the order includes products on the shared schedule, other active products already due today, and pending one-off add-ons. Opt-in subscriptions still require the customer's usual order confirmation.

For Shopify-billed subscriptions, Ship now charges the existing subscription contract and includes its active products, just like the admin action. Customers see a processing page until Shopify confirms the order or reports a payment failure. An unresolved payment or scheduled payment retry prevents another Ship now request. Firmhouse-billed subscriptions, including SEPA, continue through their normal payment process.

## `{% simple_next_billing_date_with_confirm %}`

Inline editable next billing date control.

| Parameter | Type | Default |
| - | - | - |
| `show_label` | Boolean | `false` |
| `display_delivery_date` | Boolean | `false` |
| `minimum_days_from_now` | Positive integer | `1` |
| `maximum_days_from_now` | Non-negative integer | None |

```liquid theme={null}
{% simple_next_billing_date_with_confirm show_label: true %}
```

### Limit the selectable date window

Use `minimum_days_from_now` and `maximum_days_from_now` to set the earliest and
latest selectable dates as whole numbers of days from today:

```liquid theme={null}
{% simple_next_billing_date_with_confirm minimum_days_from_now: 14 maximum_days_from_now: 60 %}
```

This example allows dates from 14 through 60 days ahead, subject to the
subscription's restrictions below. The window moves forward with today's date.
Firmhouse calculates the actual calendar dates automatically; you do not need
date strings, Liquid date filters, or intermediate assignments.

The minimum offset has no fixed upper limit. Values below `1` use `1`.

`min_date` and `max_date` are not supported Liquid arguments for this component.
Use the day-offset arguments shown above.

Omit `maximum_days_from_now` to leave the upper bound to the subscription's
commitment limits. Invalid, negative, or fractional maximum values raise a
template error. A maximum of zero leaves no future billing dates selectable.

Both bounds are inclusive and refer to the dates customers see. For non-anchored
plans, `display_delivery_date: true` applies them to delivery dates; the control
still submits the corresponding billing date. Weekday and month-day anchor plans
instead offer their scheduled shipment dates within the window, including when
loading more dates.

The minimum cannot allow a billing date today or in the past. The maximum cannot
extend beyond the stricter applicable minimum- or maximum-commitment deadline.
These deadlines apply even when no custom maximum is supplied, including in the
anchor picker. If the resulting window is empty, no dates are selectable.

These options customize this date selector. They do not add a subscription rule
or restrict changes made through other portal controls, the admin portal, or API.

```html theme={null}
<span id="subscription_123_simple_next_billing_date_with_confirm">
  <span class="text-sm">Next order date</span>
  <span class="font-semibold">March 12, 2026</span>
</span>
```

## `{% simple_plan_switch_with_confirm %}`

Inline plan switch select with confirmation modal.

| Parameter | Type | Default |
| - | - | - |
| `label_format` | String (`"frequency"`, `"plan_name"`, `"both"`) | `"frequency"` |

```liquid theme={null}
{% simple_plan_switch_with_confirm label_format: "plan_name" %}
```

```html theme={null}
<div id="subscription_123_simple_plan_switch_with_confirm">
  <select name="plan_switch[plan_id]">
    <option value="12" selected>Basic Plan</option>
    <option value="13">Premium Plan</option>
  </select>
</div>
```

Using `label_format: "both"` combines plan name and frequency:

```html theme={null}
<option value="12" selected>Basic Plan - Every 2 weeks</option>
```

## `{% manage_products %}`

Primary CTA to manage existing products.

| Parameter | Type | Default |
| - | - | - |
| `size` | String (`"small"`/`"large"`) | `"small"` |
| `button_text` | String | `"Manage products"` |

```liquid theme={null}
{% manage_products size: "small" %}
```

```html theme={null}
<div data-role="manage_products">
  <a id="sscv2_manage_products" href="/self-service/additions/edit" class="button">
    Manage products
  </a>
</div>
```

## `{% product_quantity_progress %}`

Progress and status widget for plan-based product quantity rules.

This component only renders when the active plan has a minimum and/or maximum product quantity configured.\
The default `dashboard.liquid` already includes this tag, and you can move or add it elsewhere in the template.

| Parameter | Type | Default |
| - | - | - |
| `rail_background_color` | String (CSS color) | `#E5E7EB` |
| `rail_fill_color` | String (CSS color) | `nil` (auto based on state) |
| `ready_fill_color` | String (CSS color) | `#16A34A` |
| `pending_fill_color` | String (CSS color) | `#F59E0B` |
| `over_limit_fill_color` | String (CSS color) | `#EF4444` |

Sample scenarios:

```liquid theme={null}
{% product_quantity_progress %}
```

```liquid theme={null}
{% product_quantity_progress rail_background_color: "#F3F4F6", ready_fill_color: "#16A34A", pending_fill_color: "#F59E0B", over_limit_fill_color: "#EF4444" %}
```

```liquid theme={null}
{% product_quantity_progress rail_background_color: "#E2E8F0", rail_fill_color: "#0EA5E9" %}
```

```html theme={null}
<div id="sscv2_product_quantity_progress" class="bg-white border rounded-xl p-6">
  <h2>Add 2 more items to receive your upcoming order</h2>
  <p>3 / 5+</p>
  <div class="h-4 rounded-full" style="background-color: #E5E7EB;">
    <div style="width: 60%; background-color: #F59E0B;"></div>
  </div>
</div>
```

## `{% product_listing %}`

Main list of active ordered products.

Pass `show_product_commitment: true` to display a lock and localized commitment-end date beneath each product that cannot yet be cancelled. This applies to dynamic subscriptions with a shared product frequency. The option is also supported by `product_listing_filtered` and defaults to `false`, so saved custom templates keep their existing appearance. The Firmhouse default dashboard explicitly enables it. Cancellation rules and the separate protection against removing the last recurring product are unchanged.

```liquid theme={null}
{% product_listing show_product_commitment: true %}
```

Pass `show_recurring_product_frequency: true` to show a translated delivery frequency beneath recurring product names, including add-ons that follow the subscription plan. Products that follow the plan use the customer's subscribed cadence (the delivery cadence for prepaid plans); independently scheduled products use their own cadence. One-time items retain their once-only label, and this display option does not enable individual shipment-date editing. The default is `false`, preserving existing templates.

The option also works on `product_listing_filtered`, so you can enable it only for your add-ons:

```liquid theme={null}
{% product_listing_filtered filter_by: "group", filter_value: "Add-ons", show_recurring_product_frequency: true %}
```

When your project [treats out-of-stock Shopify products as unavailable for new orders](https://docs.firmhouse.com/configure/subscription-options/skip-orders-with-unavailable-products.md#use-shopify-stock-levels), a product on the list that has since gone out of stock automatically shows an **Out of stock** badge next to its title. Custom templates that render ordered products directly instead of through this tag can use the `ordered_product.out_of_stock` Liquid attribute to render an equivalent badge.

| Parameter | Type | Default |
| - | - | - |
| `show_delete_button` | Boolean | `true` |
| `refresh_on_remove` | Boolean | `false` |
| `show_recurring_product_frequency` | Boolean | `false` |
| `show_product_commitment` | Boolean | `false` |
| `show_quantity_selector` | Boolean | `true` |
| `show_swap_button` | Boolean | `true` |

By default, removing a product updates its row and order totals inline. If your dashboard also shows recommendations or other sections that depend on the subscription's products, pass `refresh_on_remove: true` to reload the dashboard after a successful removal. This keeps those sections synchronized and shows a removal confirmation.

```liquid theme={null}
{% product_listing refresh_on_remove: true %}
```

This option applies to `product_listing`. Other templates keep their existing inline removal behavior.

To replace crossed-out prices with a savings line, pass `price_display: "savings"`. The default “You save %{amount}” message is translated automatically into the portal's language, with translations for all ten supported languages:

```liquid theme={null}
{% product_listing price_display: "savings" %}
```

The savings compare the full product price with the final displayed line price, including plan discounts, custom subscription pricing, and applicable promotions reflected in that price, for the current quantity. Country pricing, currency, tax treatment, and configured plan rounding are respected.

The message appears only for positive savings and updates after quantity changes. For one €20 product with a 15% plan discount, the English message displays “You save €3.00”. With an additional promotion reducing that line to €15.00, the message shows “You save €5.00”. With no positive savings, the existing price display is retained. Style the line with `[data-role="product-savings"]` in your template. Omitting `price_display` keeps the existing price display.

Optionally override the message with `savings_text`. Use `%{amount}` for the formatted savings amount:

```liquid theme={null}
{% product_listing price_display: "savings", savings_text: "You save %{amount} per delivery" %}
```

Custom text is not automatically translated; supply localized wording from your template when overriding the default. Omitted or blank text uses the built-in translation. Custom text is converted to a string, escaped, and preserved after updates.

The same options work with `product_listing_filtered`, including `shipment_schedule: "recurring"` when the wording should apply only to recurring products.

```liquid theme={null}
{% product_listing show_quantity_selector: false %}
```

```html theme={null}
<div id="sscv2_product_listing" class="divide-y">
  <div id="ordered_product_501_sscv2" class="py-6">
    <h3 class="font-medium">Protein Bar Box</h3>
    <p class="text-sm">Quantity: 2</p>
    <button type="button">Delete</button>
  </div>
</div>
```

## `{% product_listing_filtered %}`

Filtered list of active ordered products. Shows the same **Out of stock** badge as `product_listing` above when applicable.

Use this tag when you want to split the dashboard product list into separate groups. If you do not pass a filter parameter, it renders the same active ordered products as the regular listing.

| Parameter | Type | Default |
| - | - | - |
| `shipment_schedule` | String (`"recurring"`/`"one_time_purchase"`) | `nil` |
| `filter_by` | String | `nil` |
| `filter_value` | String | `nil` |
| `title` | String | `nil` |
| `show_add_button` | Boolean | `false` |
| `show_delete_button` | Boolean | `true` |
| `show_quantity_selector` | Boolean | `true` |
| `show_swap_button` | Boolean | `true` |
| `show_replacement_button` | Boolean | `false` |
| `hide_replacement_price` | Boolean | `false` |
| `show_recurring_product_frequency` | Boolean | `false` |
| `show_product_commitment` | Boolean | `false` |
| `show_empty_state` | Boolean | `false` |

`shipment_schedule` groups products by shipment schedule:

* `"recurring"` shows products that ship more than once.
* `"one_time_purchase"` shows products where the effective interval is `only_once`.

The filter is optional and only applies when `shipment_schedule` is passed.

```liquid theme={null}
{% product_listing_filtered shipment_schedule: "recurring", title: "Subscription products" %}
{% product_listing_filtered shipment_schedule: "one_time_purchase", title: "One-time products" %}
```

You can combine `shipment_schedule` with a metadata filter:

```liquid theme={null}
{% product_listing_filtered shipment_schedule: "recurring", filter_by: "group", filter_value: "Meals", title: "Recurring meals" %}
```

Set `show_replacement_button: true` when customers should be able to replace products from that list. Replacement flows only swap the selected product and keep the existing ordered product quantity. Use `hide_replacement_price: true` when the replacement catalog and confirmation page should not show replacement prices.

Both flows can also be opened directly from an email with a hotlink, using the ordered product Liquid attributes in transactional email templates:

* `{{product.replace_url | ssc_hotlink}}` opens the same replacement catalog as the replacement button, where the customer picks any available product as a replacement.
* `{{product.swap_variant_url | ssc_hotlink}}` opens the same options screen as the swap button, where the customer switches between variants of the product (scoped to the same product group when **Product swapping** is configured that way).

The `ssc_hotlink` filter logs the customer in automatically, so one click in the email lands them in the flow. See [Product availability & stock rules](https://docs.firmhouse.com/configure/subscription-options/skip-orders-with-unavailable-products.md) for a worked example that links out-of-stock products to these flows from the upcoming order notice.

```liquid theme={null}
{% product_listing_filtered shipment_schedule: "recurring", title: "Subscription products", show_replacement_button: true, hide_replacement_price: true %}
```

```html theme={null}
<section class="bg-white border rounded-xl p-4">
  <header class="flex justify-between items-center mb-4">
    <h2 class="text-lg font-semibold text-gray-900">Subscription products</h2>
  </header>
  <div class="divide-y">
    <div class="py-4">1x Tomato Soup</div>
    <div class="py-4">2x Wholegrain Bread</div>
  </div>
</section>
```

## `{% product_alternatives %}`

Offer eligible alternatives when a customer already has a product in a configured group. The tag assigns an array of available switches; it renders no markup. Groups with no current subscription product, or an unavailable alternative, are skipped.

Configure groups using Firmhouse product IDs in your dashboard template:

```liquid theme={null}
{% assign groups = "123:456:789,101:102" | split: "," %}
{% product_alternatives groups: groups %}
{% for swap in product_alternatives %}
  <a href="{{ swap.confirmation_url | escape }}" data-turbo-frame="_top">
    Switch {{ swap.ordered_product.localized_title | escape }}
    to {{ swap.replacement_product.localized_title | escape }}
  </a>
{% endfor %}
```

Replace the example IDs with your own. Groups contain two or more products. For each current subscription line, the tag returns every eligible alternative from its group, excluding the current product and removing duplicate IDs. Alternatives follow the configured order. Keep each product in one group; if repeated across groups, the first matching group is used. You can also pass nested arrays (`[[123, 456, 789], [101, 102]]`) or a hash for two-product groups (`{"123": 456}`), for example from `project.metadata.product_groups`. Set `assign_to: "switches"` to use another result variable.

Each result contains `ordered_product` (the existing ordered-product Liquid object), `replacement_product` (the existing product Liquid object), `confirmation_url`, and `replacement_url`. The confirmation link opens the existing replacement confirmation page with the alternative selected.

To switch immediately from the dashboard, submit a POST form to `replacement_url` instead:

```liquid theme={null}
{% product_alternatives groups: groups %}
{% for swap in product_alternatives %}
  <form action="{{ swap.replacement_url | escape }}" method="post" data-turbo="true" data-turbo-frame="_top">
    <input type="hidden" name="replacement_product[product_id]" value="{{ swap.replacement_product.id | escape }}">
    <button type="submit">Switch to {{ swap.replacement_product.localized_title | escape }}</button>
  </form>
{% endfor %}
```

This form uses the portal’s Turbo integration, which sends the CSRF token from the page’s meta tag. Keep Turbo enabled for this example. Clicking the button submits the change without a separate confirmation page and returns to the dashboard on success. Use a POST form, not a link, for `replacement_url`.

Both options preserve the current quantity and use the existing replacement behavior. This tag only offers switches between products configured with `interval_unit_of_measure: on_billing_cycle`. Current products and alternatives with one-time or independent day/week/month schedules are excluded, as are explicit one-off add-on lines and subscriptions on prepaid plans. It does not convert one-off purchases to recurring products. Labels, loading indicators, and suggestions after switching remain template customizations.

This uses **product replacement**, rather than the variant-swap picker. It requires Customer Portal v2, a dynamic-subscription project, product changes enabled, and **New Add Products Flow in Self Service Center** enabled in **New Features**. See [New Add Products Flow](https://docs.firmhouse.com/configure/my-account-portal/new-add-products-flow.md). Only active, customer-manageable lines are included. Alternatives must satisfy the existing project, country, plan-group, interval, collection-availability and stock rules. The confirmation and submission endpoints recheck eligibility. Group configuration controls the links shown; it does not grant access to otherwise unavailable products or restrict other replacement entry points.

## `{% recommended_products %}`

Assigns eligible products from a Firmhouse collection without rendering markup.
Use `collection_id` to select a collection belonging to the subscription's project,
`limit` to show up to 8 cards (default 4), and optionally `assign_to` to change
the result variable from `recommended_products`.

Products follow collection position order and retain the portal's availability,
stock, country and plan eligibility rules. Recommendations are empty when product
changes are disabled, the project is not dynamic, or the subscription is stopped,
prepaid, or a one-time purchase.

Each entry contains a standard `product` Liquid object, `in_subscription`,
`options` and `add_url`. Each option exposes `product_id`, `one_time`
and a formatted, tax-aware `price`, calculated by the existing addition flow.
Recurring products can offer both purchase modes using the same product ID.
One-time products offer only a one-time option. Separate catalog products are not
automatically paired. Products already active on the subscription have no add options.

`prices` contains the same one-unit purchase-mode prices even when the product is
already in the subscription. Use it for price presentation and keep `options`
for add buttons. `ordered_product` identifies the active line, and `remove_url`
is present when that line is customer-manageable. Submit a POST form to that URL
with `_method=delete` to remove it. Merchant-specific
required-product rules must also be applied to these removal controls.

`plan_discount_percentage` is populated only for an eligible recurring product
with a percentage plan discount, unless Shopify recurring pricing takes precedence.
Copy belongs in the template, for example
`in Repeat (−{{ recommendation.plan_discount_percentage }}%)`, or a translated
label using the percentage as an interpolation value. This describes the plan
discount, not the difference between purchase modes; actual one-time and recurring
prices can be equal under the subscription's pricing rules.

```liquid theme={null}
{% recommended_products collection_id: 123, limit: 4 %}
{% for recommendation in recommended_products %}
  <h3>{{ recommendation.product.localized_title | escape }}</h3>
  {% if recommendation.in_subscription %}
    <p>Already in your subscription</p>
  {% else %}
    {% for option in recommendation.options %}
      <form action="{{ recommendation.add_url | escape }}" method="post" data-turbo-frame="_top">
        <input type="hidden" name="ordered_products[][product_id]" value="{{ option.product_id }}">
        <input type="hidden" name="ordered_products[][quantity]" value="1">
        {% if option.one_time %}
          <input type="hidden" name="one_off_add_on" value="true">
        {% endif %}
        <button type="submit">
          {% if option.one_time %}Add once{% else %}Subscribe{% endif %} — {{ option.price | escape }}
        </button>
      </form>
    {% endfor %}
  {% endif %}
{% endfor %}
```

These forms add immediately through the existing portal endpoint. Keep Turbo enabled:
it sends the CSRF token from the page's meta tag, so no hidden token field is needed.
Keep purchase-mode parameters intact when customizing the markup. Choose collection
IDs conditionally in Liquid to personalize recommendations; a missing or foreign
collection returns no products.

### Separate one-time and recurring products

When the same item has two catalog records, pass explicit `pairs` to combine them
into one card. Each pair is `one_time_product_id:recurring_product_id`; an array of
two IDs is also supported. The recurring product supplies the card's `product`
and plan-discount metadata. Each purchase option uses its own product's price and
`product_id`, so use `option.product_id` in the form as shown above.

```liquid theme={null}
{% assign recommendation_pairs = "101:102,201:202" | split: "," %}
{% recommended_products collection_id: 123, pairs: recommendation_pairs, limit: 4 %}
```

Both products must be eligible and in the selected collection. The first must be
a one-time product and the second recurring. Invalid or unavailable pairs keep
the existing separate-product behavior. Do not reuse a product in multiple pairs.
Cards follow the earlier of the two products' collection positions, and `limit` applies after pairing.

If either product is active on the subscription, the card has no add options.
For paired cards, iterate `active_products` to expose removal for every active
line, including when both records are present. Each entry has `ordered_product`
and an optional `remove_url`; retain your required-product rules when rendering it.
The singular `ordered_product` and `remove_url` remain available for existing templates.

```liquid theme={null}
{% for active in recommendation.active_products %}
  {% if active.remove_url %}
    <form action="{{ active.remove_url | escape }}" method="post" data-turbo-frame="_top">
      <input type="hidden" name="_method" value="delete">
      <button type="submit">Remove {{ active.ordered_product.product.localized_title | escape }}</button>
    </form>
  {% endif %}
{% endfor %}
```

## `{% next_order_price_overview %}`

Core upcoming-order summary card.

| Parameter | Type | Default |
| - | - | - |
| `items` | String or Array | `recurring_subtotal,one_time_subtotal,discount,shipping,total` |
| `show_discount_code_entry` | Boolean | `true` |
| `auto_refresh` | Boolean | `false` |
| `auto_refresh_delay` | Number (seconds) | `3` |

When `show_discount_code_entry` is enabled, the component shows a discount code field below the order summary. Customers can enter an active Firmhouse discount code and apply it to their subscription. After a valid code is applied, the upcoming order totals refresh automatically.

### Automatic refresh

Set `auto_refresh: true` when order prices can still change a few seconds after the order summary renders, for example while shipping costs are recalculated in the background. The component then reloads itself once after `auto_refresh_delay` seconds. The refresh keeps the `items` and `show_discount_code_entry` settings of the original tag.

The delayed reload runs after the dashboard loads and again after each change to the upcoming order — a product quantity change, a removed product, or an applied discount code. A loading spinner covers the card from each trigger until the refreshed totals arrive. Each change schedules a single reload; quick consecutive changes are grouped into one.

```liquid theme={null}
{% next_order_price_overview auto_refresh: true, auto_refresh_delay: 5 %}
```

### Machine-readable amounts

When an upcoming order is available, the component exposes its price breakdown as integer cents on the component's root element. All amounts include tax. Use these attributes for custom template behavior instead of parsing localized currency text.

| Attribute | Amount |
| - | - |
| `data-order-price-overview-subtotal-amount-cents` | Product subtotal before discounts and shipping |
| `data-order-price-overview-discount-amount-cents` | Discount amount as a positive value |
| `data-order-price-overview-subtotal-after-discount-amount-cents` | Product subtotal after discounts and before shipping |
| `data-order-price-overview-shipping-amount-cents` | Shipping amount; omitted while shipping is not yet available, and `0` when shipping is free |
| `data-order-price-overview-final-amount-cents` | Final amount after discounts and shipping |

The attributes are available regardless of which rows you select with `items`, except for the shipping attribute while shipping is unavailable. The rendered total row also keeps `data-order-price-overview-total-amount-cents` with the final amount for backwards compatibility.

```html theme={null}
<div
  id="subscription_123_next_order_price_overview"
  data-order-price-overview-subtotal-amount-cents="2900"
  data-order-price-overview-discount-amount-cents="300"
  data-order-price-overview-subtotal-after-discount-amount-cents="2600"
  data-order-price-overview-shipping-amount-cents="499"
  data-order-price-overview-final-amount-cents="3099"
>
  <!-- Order summary -->
</div>
```

### Enable discount code entry

Turn on **Discount Codes in Customer Portal v2** in **New Features** for the project.

The default Customer Portal v2 dashboard currently renders this component with `show_discount_code_entry: false`. Remove that parameter or set it to `true` in your custom `dashboard.liquid` template if customers should be able to apply discount codes from the portal.

Firmhouse only shows the discount code field when the subscription does not already have an active promotion that blocks manual discount codes.

Accepted discount codes must meet these conditions:

* The discount code is active and has not reached its usage limit.
* The linked promotion is active and available for the customer's country.
* The subscription has no active manual discount, including a promotion that was applied by another discount code.
* Any active automatic discount on the subscription allows combining with manual discounts. In the discount settings, enable **Allow this automatic discount to be combined with manual discounts**.
* The code is not a referral discount code. Referral codes are intended for new customer signup and first-order discounts, not recurring orders for existing customers.
* For Shopify subscription contracts, the promotion should have simple rules to be synced to Shopify as a subscription contract discount. Codes for more complex Firmhouse-only advanced promotion rules are not supported yet.

If a subscription has an active manual discount, or an active automatic discount that does not allow combining with manual discounts, the discount code field stays hidden. Submitted discount codes are rejected with the existing active-discount message in the same situations.

When one promotion with a public description is active on the subscription, the discount row shows that public description. When multiple promotions are active, or the active promotion has no public description, the row keeps the generic discount label.

To control the customer-facing discount text, go to **Discounts**, open the order or billing cycle discount, and fill in **Public description**. Use wording that makes sense to customers, such as "10% off your next 2 orders".

```liquid theme={null}
{% next_order_price_overview items: "recurring_subtotal,shipping,total" show_discount_code_entry: false %}
```

```html theme={null}
<div id="subscription_123_next_order_price_overview" class="border rounded-xl p-6">
  <h3>Order summary</h3>
  <div class="flex justify-between"><span>Recurring subtotal</span><span>EUR 29.00</span></div>
  <div class="flex justify-between"><span>Shipping</span><span>Free</span></div>
  <div class="flex justify-between font-semibold"><span>Total</span><span>EUR 29.00</span></div>
</div>
```

To show the discount code entry:

```liquid theme={null}
{% next_order_price_overview show_discount_code_entry: true %}
```

## `{% empty_subscription_warning %}`

Shows a warning when an active or paused subscription has no active products. Products supplied by a plan count as active products too. The default dashboard includes this component with an **Add products** button. Cancelled, stopped, unsubscribed, and one-time purchase subscriptions do not show it.

| Parameter | Type | Default |
| - | - | - |
| `show_warning` | Boolean | `true` |
| `title` | String | Translated “Your subscription has no active products” |
| `description` | String | Translated “Nothing will be shipped until you add products to your subscription.” |
| `show_add_button` | Boolean | `true` |
| `add_button_text` | String | Translated “Add products” |
| `show_manage_button` | Boolean | `false` |
| `manage_button_text` | String | Translated “Manage products” |
| `collection_id` | Integer | None |

The default dashboard places this warning inside Products Overview, in place of the product list when empty. The component remains independent: custom templates can place it anywhere.

When both buttons are enabled, **Manage products** takes precedence. Set both to `false` for a message without a button, or set `show_warning: false` to hide the component.

```liquid theme={null}
{% empty_subscription_warning %}
{% empty_subscription_warning show_add_button: false, show_manage_button: true %}
{% empty_subscription_warning collection_id: 123 %}
```

Set `collection_id` to open the selected collection in either product action. Omit it to use the full available catalog.

The native product actions retain their availability and permission checks. Manage products also requires the product quantity management feature. If an action is unavailable, the warning still appears without a button.

Default copy follows the current portal language and can be edited through the template's translations. Custom copy can also use translation keys:

```liquid theme={null}
{% capture empty_title %}{{ "dashboard.empty_box_title" | t: default: "Build your next box" }}{% endcapture %}
{% empty_subscription_warning title: empty_title %}
```

The warning checks all active subscription products, rather than just products due in the next shipment. In custom templates, use `{% product_listing refresh_on_remove: true %}` to refresh the dashboard after removing a product, so the warning appears immediately when the last product is removed. The default dashboard already uses this setting.

## `{% minimum_order_amount_warning %}`

Warning shown when the next order preview does not meet the project's minimum order amount.

The default `dashboard.liquid` template includes this tag before the product list. It renders a warning only when all of these conditions are true:

* The project is a dynamic subscription project.
* The subscription is active.
* Firmhouse can calculate the next order preview.
* The next order subtotal before shipping and discounts is below the configured minimum order amount for the subscription country.

When customers add, remove, or update products from Customer Portal v2, the warning refreshes automatically together with the order summary.

```liquid theme={null}
{% minimum_order_amount_warning %}
```

```html theme={null}
<div id="minimum_order_amount_warning_subscription_123">
  <div class="rounded-xl border border-amber-300 bg-amber-50 p-4">
    <p>The minimum order amount is EUR 35.00</p>
    <p>Your next expected order's subtotal before shipping and discounts is EUR 29.00 and is lower than the required minimum order amount.</p>
  </div>
</div>
```

The component uses the minimum order amount configured in **Settings > Subscription**. If you use country-specific minimum order amounts, Firmhouse uses the amount for the subscription's country.

## `{% add_product %}`

Secondary CTA to browse catalog and add products.

| Parameter | Type | Default |
| - | - | - |
| `size` | String (`"small"`/`"large"`) | `"large"` |
| `button_text` | String | `"Add product"` (`size: "large"`), `"Add products"` (`size: "small"`) |

```liquid theme={null}
{% add_product size: "small" button_text: "Add meal" %}
```

```html theme={null}
<div data-role="add_product">
  <a id="sscv2_add_product" href="/self-service/additions/new" class="button">
    Add meal
  </a>
</div>
```

## Optional components

## `{% asset_purchase_offers %}`

Shows every asset on the subscription that the customer is currently eligible to purchase. The component renders nothing when no purchase offers are available.

This component has no parameters.

```liquid theme={null}
{% asset_purchase_offers %}
```

```html theme={null}
<div id="sscv2_asset_purchase_offers_subscription_123" class="space-y-3">
  <form action="/self-service/asset-ownerships/456/offers" method="post">
    <button id="sscv2_asset_purchase_offer_asset_ownership_456" type="submit">
      <span>Buy your Coffee Machine</span>
      <span>Buy now</span>
    </button>
  </form>
</div>
```

## `{% asset_purchase_offer %}`

Renders one asset purchase offer from an asset ownership Liquid object. Prefer `asset_purchase_offers` when Firmhouse should find and render every eligible offer automatically.

| Parameter | Type | Default |
| - | - | - |
| `asset_ownership` | Asset ownership Liquid object | `nil` |
| `blocked_by_outstanding_invoices` | Boolean | `false` |

```liquid theme={null}
{% for asset_ownership in subscription.asset_ownerships %}
  {% asset_purchase_offer asset_ownership: asset_ownership, blocked_by_outstanding_invoices: false %}
{% endfor %}
```

```html theme={null}
<form action="/self-service/asset-ownerships/456/offers" method="post">
  <button id="sscv2_asset_purchase_offer_asset_ownership_456" type="submit">
    <span>Buy your Coffee Machine</span>
    <span>Buy now</span>
  </button>
</form>
```

## `{% non_paying_banner %}`

Displays an account warning when the subscription is marked as non-paying. It renders nothing for subscriptions in good payment standing.

| Parameter | Type | Default |
| - | - | - |
| `title` | String | Translated default title |
| `message` | String | Translated default message |
| `paused_orders_message` | String | Translated paused-orders message |
| `view_invoices_label` | String | Translated invoices link label |
| `render_icon` | Boolean | `true` |

```liquid theme={null}
{% non_paying_banner title: "Payment needed" render_icon: true %}
```

```html theme={null}
<div id="sscv2_non_paying_banner" class="rounded-xl border border-red-200 bg-red-50 px-5 py-4">
  <p class="text-sm font-semibold text-red-900">Payment needed</p>
  <p class="mt-1 text-sm text-red-800">Please resolve the outstanding payment.</p>
  <a href="/self-service/invoices">View invoices</a>
</div>
```

## `{% latest_orders %}`

Recent orders list.

| Parameter | Type | Default |
| - | - | - |
| `limit` | Number | `3` |

```liquid theme={null}
{% latest_orders limit: 2 %}
```

```html theme={null}
<div id="sscv2_latest_orders">
  <article class="border rounded-xl p-4">
    <p class="text-xs">Jan 12, 2026 | Order #9876</p>
    <p class="text-sm font-semibold">2x Matcha Pods</p>
    <span class="pill pill--green">confirmed</span>
  </article>
</div>
```

## `{% next_order_preview %}`

Upcoming order preview card.

```liquid theme={null}
{% next_order_preview %}
```

```html theme={null}
<div class="bg-white border rounded-xl p-4">
  <p class="text-sm font-semibold">Upcoming order</p>
  <p class="text-sm">Scheduled for March 12, 2026</p>
  <div class="flex justify-between mt-2">
    <span>2x Oat Drink</span>
    <span>EUR 14.00</span>
  </div>
</div>
```

## Advanced `product_listing_filtered` patterns

Filtered product list card (for segmented subscriptions).

| Parameter | Type | Default |
| - | - | - |
| `filter_by` | String | `nil` |
| `filter_value` | String | `nil` |
| `title` | String | `nil` |
| `show_add_button` | Boolean | `false` |
| `add_button_text` | String | `nil` |
| `show_manage_button` | Boolean | `false` |
| `manage_button_text` | String | `nil` |
| `title_class` | String | `"text-gray-900"` |
| `show_delete_button` | Boolean | `true` |
| `show_quantity_selector` | Boolean | `true` |
| `show_swap_button` | Boolean | `true` |
| `show_replacement_button` | Boolean | `false` |
| `hide_replacement_price` | Boolean | `false` |
| `show_empty_state` | Boolean | `false` |

```liquid theme={null}
{% product_listing_filtered filter_by: "person" filter_value: "mom" title: "Menu for mom" show_manage_button: true %}
{% product_listing_filtered filter_by: "person" filter_value: "mom" title: "Menu for mom" title_class: "text-green-800" %}
```

When `show_replacement_button` is enabled, customers can replace products in that filtered list. Replacement keeps the current ordered product quantity. Set `hide_replacement_price: true` if replacement prices should stay hidden in the catalog and confirmation step.

```html theme={null}
<section class="bg-white border rounded-xl p-4">
  <header class="flex justify-between items-center mb-4">
    <h2 class="text-lg font-semibold text-gray-900">Menu for mom</h2>
    <a id="sscv2_manage_products" href="/self-service/additions/edit">Manage products</a>
  </header>
  <div class="divide-y">
    <div class="py-4">1x Tomato Soup</div>
    <div class="py-4">2x Wholegrain Bread</div>
  </div>
</section>
```

### Dynamic groups based on ordered product metadata

If your `filter_value` should adapt to subscriber-specific metadata (for example names like `"Veronika"` or `"Michiel"`), you can build the group list from `subscription.ordered_products` and then render `product_listing_filtered` in a loop.

#### How are dynamic values fetched?

You can do this directly in `dashboard.liquid`; no custom backend endpoint is required.

* `subscription.ordered_products` is available in SSCv2 Liquid context.
* Each `ordered_product` includes `metadata`.
* Reading `ordered_product.metadata.group` gives the current subscription's group value for that ordered product (or use `ordered_product.metadata.person` if your project still uses the legacy key).
* Pass `filter_by` with the same metadata key (`group` or `person`) that produced the value.
* Looping over ordered products lets you discover all group values present on the active subscription at render time.

So the template itself can fetch values for the **current subscription** and render sections dynamically.

If you need a list of possible groups that are **not yet present** on the subscription (for example, a global project-wide list), that is not available from this template context alone and should be handled outside the template (for example by pre-populating metadata values via your own flows).

In this pattern:

* hardcoded sections stay explicit (`Add-ons`, `Gifts`, `One-time extras`)
* dynamic sections include only metadata values currently present on the subscription
* hardcoded values are excluded from the dynamic loop
* exclusions and de-duplication are done case-insensitively (`downcase`)

```liquid theme={null}
{% assign excluded_groups_normalized = "add-ons|gifts|one-time extras" | split: "|" %}
{% assign seen_groups_normalized = "" %}

{% for ordered_product in subscription.ordered_products %}
  {% assign group_name = ordered_product.metadata.group | strip %}
  {% assign group_filter_key = "group" %}
  {% if group_name == blank %}
    {% assign group_name = ordered_product.metadata.person | strip %}
    {% assign group_filter_key = "person" %}
  {% endif %}
  {% assign normalized_group_name = group_name | strip | downcase %}

  {% if group_name != blank %}
    {% unless excluded_groups_normalized contains normalized_group_name %}
      {% capture marker %}|{{ normalized_group_name }}|{% endcapture %}

      {% unless seen_groups_normalized contains marker %}
        {% capture seen_groups_normalized %}{{ seen_groups_normalized }}{{ marker }}{% endcapture %}
        {% assign group_title = group_name | capitalize %}

        {% product_listing_filtered
        filter_by: group_filter_key,
        filter_value: group_name,
        title: group_title,
        show_add_button: true,
        show_manage_button: false,
        show_delete_button: false,
        show_quantity_selector: false,
        show_swap_button: false
      %}
      {% endunless %}
    {% endunless %}
  {% endif %}
{% endfor %}

{% product_listing_filtered filter_by: "group", filter_value: "Add-ons", title: "Add-ons", show_add_button: true, show_manage_button: false, show_delete_button: false, show_quantity_selector: false, show_swap_button: false %}
{% product_listing_filtered filter_by: "group", filter_value: "Gifts", title: "Gifts", show_add_button: true, show_manage_button: false, show_delete_button: false, show_quantity_selector: false, show_swap_button: false %}
{% product_listing_filtered filter_by: "group", filter_value: "One-time extras", title: "One-time extras", show_add_button: false, show_manage_button: false, show_delete_button: false, show_quantity_selector: false, show_swap_button: false %}
```

If your project stores group values under a different metadata key, replace `ordered_product.metadata.group` (and optional `ordered_product.metadata.person` fallback) with your key and pass that same key to `filter_by`.

### Shopify instalment progress from ordered products

If your Shopify subscription setup uses instalment billing, you can render progress directly from the ordered products in `dashboard.liquid`.

* `ordered_product.instalment_current_number` returns the current instalment number for that subscription line.
* `ordered_product.instalment_total_count` returns the total instalment count from the subscription's active plan.
* `subscription.active_plan.instalments` is also available when you want to render plan-level instalment details outside the ordered product loop.

Example:

```liquid theme={null}
{% if subscription.active_plan.instalments %}
  <div class="space-y-3">
    {% for ordered_product in subscription.ordered_products %}
      {% assign instalment_number = ordered_product.instalment_current_number | plus: 0 %}
      {% if instalment_number > 0 %}
        <div class="rounded-xl border border-gray-200 p-4">
          <p class="text-sm font-medium">{{ ordered_product.localized_title }}</p>
          <p class="text-sm text-gray-600">
            Instalment {{ instalment_number }} of {{ ordered_product.instalment_total_count }}
          </p>
        </div>
      {% endif %}
    {% endfor %}
  </div>
{% endif %}
```

## `{% next_shipment_date %}`

Localized next shipment date text.

```liquid theme={null}
{% next_shipment_date %}
```

```html theme={null}
Next shipment on March 12, 2026
```

## Cancellation status

The Firmhouse default dashboard includes both cancellation tags below. For a customized `dashboard.liquid`, add them where customers should see their subscription status:

```liquid theme={null}
{% cancellation_in_progress %}
{% pending_cancellation_timeline %}
```

Save a new template version, preview a subscription in the relevant cancellation state on mobile and desktop, then publish that version when ready. Existing customized dashboards are not updated automatically.

## `{% pending_cancellation_timeline %}`

Shows a cancellation timeline for a dynamic subscription pending cancellation, including the remaining order count, next and final shipment dates, and subscription end date. When the next shipment is the final shipment, it appears only once. When no shipments remain, the timeline shows that the subscription is ending. Customers can also undo cancellation from the timeline.

The default appearance combines the portal's neutral cards with green markers for the next shipment, blue for the final shipment, and muted red for the subscription end. Optional colors override all decorative timeline markers while keeping text and links readable in the default theme:

```liquid theme={null}
{% pending_cancellation_timeline primary_color: "#065f46" secondary_color: "#ecfdf5" %}
```

| Parameter | Applies to | Default |
| - | - | - |
| `primary_color` | Timeline icons | Green, blue, or red for each milestone |
| `secondary_color` | Timeline icon backgrounds | A pale tint of each milestone color |

Use three- or six-digit hexadecimal colors, including the `#`. Invalid values fall back to the defaults. Choose a contrasting icon and background pair so the markers remain visible.

The timeline requires a planned cancellation date, next billing date, and valid billing interval. It renders nothing for active or fully cancelled subscriptions. This rollout covers dynamic projects with one shipment frequency for all products; independent product schedules are outside its scope.

## `{% cancellation_in_progress %}`

Shows the existing cancellation-in-progress message and instructions for subscriptions in a two-step cancellation flow. It renders nothing in other subscription states and accepts no parameters.

## `{% minimum_contract_duration %}`

Commitment/contract duration block.

| Parameter | Type | Default |
| - | - | - |
| `variant` | String (`"full"`, `"label"`, `"date"`) | `"full"` |

```liquid theme={null}
{% minimum_contract_duration variant: "label" %}
```

```html theme={null}
<span id="subscription_123_minimum_contract_duration_label">
  Committed until April 1, 2026
</span>
```

## `{% billing_and_shipping_breakdown %}`

Billing interval breakdown text.

```liquid theme={null}
{% billing_and_shipping_breakdown %}
```

```html theme={null}
<span id="subscription_123_billing_and_shipping_breakdown">
  Monthly billing, weekly delivery
</span>
```


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