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

# Shopify order tags and attributes

> Identify orders generated through Firmhouse in your Shopify admin using order tags and attributes to make administration and reporting easier.

How to identify orders generated through Firmhouse in Shopify for easier administration.

## First or Recurring Order

Orders generated in Shopify via Firmhouse can be easily recognized. Firmhouse adds a tag to the order, either:

* `Firmhouse-First-Order` for the initial order on signup, or
* `Firmhouse-Recurring-Order` for all recurring orders

Additionally, we will tag the first **recurring subscription** order with `Firmhouse-First-Recurring-Order`. One-off purchases won't get this tag.

## Additional Details

Every order that is created in Shopify will have additional so-called "custom attributes", containing:

* `firmhouse-order-id`
* `firmhouse-invoice-id`
* `firmhouse-subscription-id`

These IDs correspond to the related Firmhouse Order, Invoice and Subscription. The custom attributes are often visible in the right sidebar when viewing an order.

## Extra Fields as Custom Attribute

It's also possible to mark certain Extra fields to be sent to Shopify as custom attributes. These will be added to all orders as custom attributes for that subscriber.

<img src="https://mintcdn.com/firmhousebv/W1a6IJXpZxtV1Am0/images/shopify-order-tags-extra-fields.png?fit=max&auto=format&n=W1a6IJXpZxtV1Am0&q=85&s=e1ccb7416b0d1443d1ad5836b2c2ef01" alt="Extra Fields Send to Shopify" width="3856" height="2170" data-path="images/shopify-order-tags-extra-fields.png" />

## Custom Tags

In certain situations, you might want to add additional tags or information to the Shopify Orders. Firmhouse has the "Shopify Order tag" option in the Apps > Shopify menu. Here you can add custom and even dynamic tags, using Liquid code.

The order's payment is available as `payment`. Use `payment.most_recent_attempt` when a retry may have used a different provider or payment method than the original payment. The following example adds tags such as `mollie-directdebit` to recurring Mollie orders created through Firmhouse's draft-order flow, but not to Shopify-native orders:

```liquid theme={null}
{%- assign current_payment = payment.most_recent_attempt -%}
{%- if current_payment.payment_provider == "mollie" and current_payment.shopify_native_payment == false -%}
  {%- if payment.payment_type == "monthly" or payment.payment_type == "recurring" -%}
    mollie-{{ current_payment.payment_provider_payment_method | default: "renewal" }}
  {%- endif -%}
{%- endif -%}
```

Available payment values include `payment_type`, `payment_provider`, `payment_provider_payment_method`, and `shopify_native_payment`. If a Liquid rule produces no text, Firmhouse skips the custom tag.

<img src="https://mintcdn.com/firmhousebv/MBIig9RLvJZx3riR/images/docs-configure-shopify-order-tags-settings-dev-aa.png?fit=max&auto=format&n=MBIig9RLvJZx3riR&q=85&s=c6c39e8d2ad71c1326bcac2f2ca6de2c" alt="Shopify Order Tag Settings" width="2880" height="2200" data-path="images/docs-configure-shopify-order-tags-settings-dev-aa.png" />
