> For the complete documentation index, see [llms.txt](https://docs-shpf.bsscommerce.com/b2b-wholesale-solution/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-shpf.bsscommerce.com/b2b-wholesale-solution/customer-management/auto-tags/automatically-tag-orders-and-customers.md).

# Automatically Tag Orders & Customers

Create Auto Tags rules that tag customers or orders (or add notes) when a customer registers or an order changes, and apply them to records you already have.

Let tags assign themselves. The **Auto Tags** module labels customers or orders when the conditions you set are met, so you can segment buyers, trigger pricing rules and follow buyer behavior without manual work.

## Before You Start

* Go to **B2B customers › Auto Tags** and make sure the switch next to the **Auto Tags** title is **On**. When it is off, your rules are saved but do not run.
* The module header shows **Apply to existing customers** and **Export** as buttons. **History** is under **More actions**.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-84a304d6afb6446c83f8d937117884b8742c6db8%2Fcms-at-list-01.png?alt=media" alt="Auto Tags rule list"><figcaption><p>Auto Tags rule list</p></figcaption></figure>

## How to Create an Auto Tag Rule

1. Go to **B2B customers › Auto Tags**.
2. Click **Add rule**. If you have no rules yet, click **Add rule** in the empty state instead (next to **Quick create**).

The page **New auto tag rule** is a single page of cards: **Rule**, **When** and **Actions**. A card in the right sidebar checks that the rule is live once it is saved. Click **Save** in the save bar when you are done.

### Rule

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-258258ab6f63db679d673ea09e281acdb31c636f%2Fcms-at-rule-01.png?alt=media" alt="Rule card"><figcaption><p>Rule card</p></figcaption></figure>

| Field      | Options          | What it does                                                                                                                                                 |
| ---------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Name**   | Text             | A clear name to find the rule later. If you leave it empty, the name is written for you from the event and the tag, for example `Order paid: tag Big Order`. |
| **Status** | Enable / Disable | Disabled rules do not run. Keep it on **Enable**.                                                                                                            |

### When

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-4370e3753f229daad153419972482c0f361a3991%2Fcms-at-when-01.png?alt=media" alt="When card"><figcaption><p>When card</p></figcaption></figure>

| Field                               | Options                                                                                              | What it does                                                                                                                                          |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Event**                           | **Customer created** · **Order created** · **Order paid** · **Order fulfilled** · **Order canceled** | The moment the rule runs. **Order canceled** only reacts to orders canceled after you installed the app.                                              |
| **Registration form**               | Your registration forms                                                                              | Which form's registrations the rule reacts to. Only for **Customer created**. The rule runs only for customers who sign up through the form you pick. |
| **Customer information must match** | **all conditions** · **any condition**                                                               | Whether every condition or just one must match.                                                                                                       |
| **Conditions**                      | Field, operator and value per row. Click **Add another condition** for more rows.                    | What must be true for the actions to run. See below.                                                                                                  |

**Conditions for Customer created**

* **Default field**: **Display name**, **Email**, **First name**, **Last name** (with a form that has steps, only **Email**).
* **Custom field**: any field of the registration form you picked.
* Operators: **Contains**, **Does not contain**, **Is equal to**, **Is not equal to**.

**Conditions for order events**

* **Customer account**: **Display name**, **Email**, **Customer tags**, **Order item**, **Total spent**.
* **Customer shipping address** and **Customer billing address**: **City**, **Country**, **Province**, **Postcode**.
* **Product info**: **Product name**, **Sku**.
* **Order info**: **Number of products**, **Order quantity**, **Order amount**, **Order weight**. On **Order created** and **Order paid** you also get **Total amount of paid orders** and **Total number of paid orders**, counted over a period from **within 1 day** up to **within 60 days**.
* Number fields use **Is equal to**, **Greater than** and **Less than**. Text fields use **Contains**, **Does not contain**, **Is equal to** and **Is not equal to**.

{% hint style="info" %}
Text is compared without spaces and ignoring capital letters. **Contains** with an empty value matches every customer.
{% endhint %}

**Order weight**

Pick **Order weight**, choose an operator, enter the value and choose a unit next to it: `g`, `kg`, `lb` or `oz` (default `g`). The app converts your value and the order's total weight to the same unit before comparing, so a rule in `kg` works for a store that records product weights in `lb`. Text operators are not available for it.

Examples:

* Tag customers whose **Email** contains `company.com`.
* Tag orders with **Order amount** greater than 20,000.
* Tag orders with **Order weight** greater than 50 kg, for example "Freight Shipping".

### Actions

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-4957fa11752276eae867efe036207f53b99ab497%2Fcms-at-actions-01.png?alt=media" alt="Actions card"><figcaption><p>Actions card</p></figcaption></figure>

Each action row has an action type and a value. Separate several tags with commas. Click **Add another action** for more rows.

| Event                | Available actions                                                                                                                      |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Customer created** | **Add customer tag** · **Add customer note** · **Mark customer as tax exempt**                                                         |
| Order events         | **Add customer tag** · **Remove customer tag** · **Add customer note** · **Add order note** · **Add order tag** · **Remove order tag** |

{% hint style="info" %}
**Mark customer as tax exempt** is only on **Customer created** rules, once per rule, and it flags the customer as tax exempt in Shopify (no tag involved). **Remove** actions are only on order events, because a brand-new customer has no tags yet.
{% endhint %}

### Make Auto Tags live

After you save, the sidebar card shows whether the rule is ready. Every enabled rule that matches an event runs, not only the first one. Rules only react to events that happen after you save them.

## Quick Create: Customer Tiers

Click **Quick create** on the rule list to build tier rules in one go, for example a Gold tag when total spent goes over a threshold.

1. Under **Tier settings**, choose the **Event** (**Order paid**, **Order created** or **Order fulfilled**) and the **Metric** (**Total spent**, **Number of orders**, and for paid or created orders **Total amount of paid orders** or **Total number of paid orders**, counted within 1 to 60 days).
2. Fill one row per tier: **Threshold** (over), **Tag to add** and an optional **Rule name**. Use **Paste tags** to add many rows (tag, then threshold). Up to 50 rows.
3. Click **Save**.

Each row becomes one active rule. A higher tier also removes the tags of the tiers below it, so a customer keeps one tier tag.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-e0d0149a0f1502d687433113f1bd9c2bd7242f64%2Fcms-at-quick-01.png?alt=media" alt="Quick create customer tiers"><figcaption><p>Quick create customer tiers</p></figcaption></figure>

## 🔄 Apply Tags to Existing Customers & Orders

New rules only react to new events. To tag what you already have:

1. Go to **B2B customers › Auto Tags › Apply to existing customers**.
2. Under **Apply a rule to existing customers or orders**, choose **Existing customers** or **Existing orders**.
3. Select a **Rule** and click **Apply tags**, then confirm.

The job runs in the background with a progress indicator, so you can leave the page.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-49ec883c84ffda8dd464d0c59be16466fccc4790%2Fcms-at-apply-01.png?alt=media" alt="Apply to existing customers &#x26; orders"><figcaption><p>Apply to existing customers &#x26; orders</p></figcaption></figure>

{% hint style="warning" %}
**One bulk update at a time per store.** It runs until it finishes and cannot be stopped. If you edit the rule while it runs, it keeps using the rule as it was when it started.
{% endhint %}

* Only customers who registered through a B2B registration form are tagged.
* Orders are picked by the rule's event: paid, fulfilled, canceled, or all orders for **Order created**.
* Rules with a paid-orders condition apply to new orders only, and tax exempt actions are skipped.

### Remove tags in bulk

Expand **Remove customer/order tags**, choose **Customer tags** or **Order tags**, select the tags, click **Remove tags** and confirm. The tags are removed from every customer or order in your store that has them, whoever added them. This job is not listed in History.

## 🕘 History

1. Go to **B2B customers › Auto Tags › More actions › History**.
2. Switch between **Customers with tag updates** and **Orders with tag updates**.
3. Page through the list or sort it.

Each row shows who or which order changed, the **Rule**, **Added tags** and **Removed tags**, **Updated time** and **Updated by**. Notes, tax exempt changes and tags removed with **Remove customer/order tags** are not listed.

<figure><img src="https://1478990334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGolQYRPH9iUGYatlTXwl%2Fuploads%2Fgit-blob-566afd86b093b137e0b397a1e2ec8a29b7dca552%2Fcms-at-history-01.png?alt=media" alt="Auto tag history"><figcaption><p>Auto tag history</p></figcaption></figure>

## Export Rules

Go to **B2B customers › Auto Tags › Export**, click **Export** and confirm. You get a CSV of all your rules (one row per condition and action) and can find earlier files under the export history. History entries are not exported.

## 📋 Use Cases & Examples

* Tag orders over $20,000 with "Big Order" so you can filter or trigger special workflows.
* Tag customers whose emails contain your business domains to classify "Partner" accounts.
* Tag customers by a registration answer: use **Customer created**, pick the form, add a condition on the field, and use **Add customer tag**. For manual approval forms the tag is added when you approve the application.
* Remove tags when a condition no longer holds: rules do not do this by themselves, so add **Remove customer tag** or **Remove order tag** to an order-event rule, or use bulk removal.

{% hint style="info" %}
A customer update does not start a rule. Rules run on **Customer created** and on the four order events.
{% endhint %}

{% hint style="info" %}
If you need further assistance, please feel free to reach us at [**support@bss-b2b.solutions**](mailto:support@bss-b2b.solutions) or [**Live Chat**](https://go.crisp.chat/chat/embed/?website_id=9f64b5a9-1a02-4190-93b8-8ef56b19f740).
{% endhint %}
