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

# Segment attributes

> The kinds of attribute you can build a segment rule from, and what you fill in and which operators you can pick for each one.

An attribute is a fact about a customer that a segment rule checks, such as their age, what they bought, or whether they agreed to emails. What you fill in for a rule depends on the kind of attribute. This page lists each kind, the operators it takes, and where to find the attributes. [Create a segment](/business-documentation/audiences-and-data/create-a-segment) shows how to add them to the builder.

## At a glance

| Kind | What you fill in | Operators | For example |
| - | - | - | - |
| [Number](#number) | A number, two numbers, or several numbers | **Equal**, **Greater than**, **Greater or equal**, **Less than**, **Less or equal**, **Between**, **In** | **Age**, **Amount spent**, **Receipt count** |
| [Yes or no](#yes-or-no) | **Yes** or **No** | None | Your own attributes, such as **Premium Member** |
| [List](#list) | One or more values picked from a list | **Equal**, **Not equal**, **In**, **Not in** | **Gender**, **Store chain name**, **Store id** |
| [Date](#date) | A date, or a range of dates | **Equal**, **Less than**, **Less or equal**, **Greater than**, **Greater or equal**, **Between** | **Date of birth**, **Sign up date**, **Purchase date** |
| [Text](#text) | Text you type, or part of it | **Equal**, **Not equal**, **Contains**, **In**, **Not in** | **Zip code**, **Membership number** |
| [Consent](#consent) | A consent, and which of its versions count | None | **Consent** |
| [Product](#product) | Products picked from your catalogue | None | **Product** |

Each attribute offers only the operators that make sense for it, so the list you see can differ from the one here. [Operators](#operators) explains what each one finds.

![The Segment builder of a segment named Ages 25–40 at Daily Tasty or Fresh, email consent, with three rules joined by AND. Age is set to Between, with From 25 and To 40. Store chain name is set to In, with the chains Daily Tasty and Fresh picked, and the note that the date range is the last 90 days when no purchase date rule is added. Consent has a Name box set to emails and a Version box set to All versions.](https://mintcdn.com/lobyco-4c9fb3ad/rG971_5ZfS49bcjM/images/audiences-10-three-kinds-of-rule.png?fit=max\&auto=format\&n=rG971_5ZfS49bcjM\&q=85\&s=4348c215e36883c9ec5000a626bbfe93)

*Three kinds of rule: a range, a list of chains and a consent*

## Number

A number attribute takes a number, such as an age or an amount spent. You can't type a negative number.

* **Between** shows a **From** box and a **To** box. **To** can't be lower than **From**.
* **In** takes several numbers in one box. Separate them with commas, semicolons or spaces.
* A few number attributes also take **Matches file** and **Not matches file**. [Match against a file](#match-against-a-file) explains how.

For example, **Age** with **Between**, **From** 18 and **To** 30 finds customers aged 18 to 30, including 18 and 30.

## Yes or no

A yes-or-no attribute has no operator. You pick **Yes** or **No**. Your organisation's own attributes are often this kind.

For example, a custom attribute such as **Premium Member** with **Yes** finds your premium members.

## List

A list attribute takes values from a list, such as a gender or a store chain. Type in the box to filter the list.

**Equal** and **Not equal** take one value. **In** and **Not in** take several.

Some list attributes, such as **Store id** and **Coupon selection**, also have a **Manual input** box when you pick **In** or **Not in**. Tick it to type the values instead of picking them. Separate them with commas, semicolons or spaces.

For example, **Store chain name** with **In** and two chains picked finds customers who shopped in either chain in the last 90 days. **Store chain name** is a **Purchase** attribute, so that window applies unless the segment has a **Purchase date** rule.

## Date

A date attribute takes a date, such as a birthday or the day of a purchase. **Less than** means before the date, and **Greater than** means after it.

With **Between**, you choose **Fixed** or **Float**:

* **Fixed** uses the start and end dates you pick.
* **Float** is a rolling window, counted in days before today. It moves forward every time the segment runs. Set it with the slider, or type the number of days ago in **From** and **to**.

For example, **Sign up date** with **Between**, **Float**, **From** 30 and **to** 0 finds customers who signed up in the last 30 days.

## Text

A text attribute takes text you type, such as a zip code or a membership number.

* **Contains** finds customers whose value includes the text you type anywhere in it.
* **In** and **Not in** take several values in one box. Separate them with commas, semicolons or spaces. A space always starts a new value, so for a value with a space in it, use **Equal** or **Contains** instead.

For example, **Zip code** with **In** and three zip codes finds customers who live in any of them.

## Consent

**Consent** has no operator. It has two boxes instead.

1. In **Name**, pick the consent, such as the one for emails.
2. In **Version**, pick the versions that count. Leave it on **All versions** to count every version. The box is greyed out until you pick a name, and stays greyed out for a consent that has no versions.

The rule finds the customers who have that consent, in the versions you picked. Customers who have withdrawn it aren't included.

Two **Consent** rules joined with **AND** in one segment find no customers. [Create a segment](/business-documentation/audiences-and-data/create-a-segment#troubleshooting) shows what to do instead.

## Product

**Product** has no operator. It opens the **Product** picker instead. Search or browse your product catalogue, tick the products or product groups you want, then select **Add criteria**. To change the products later, select the edit icon on the rule.

**Product** is in the **Purchase** category, so it looks at the last 90 days unless the segment has a **Purchase date** rule. [Create a segment](/business-documentation/audiences-and-data/create-a-segment#add-your-rules) covers the picker step by step.

## Operators

| Operator | Finds customers whose value is |
| - | - |
| **Equal** | the one you enter. |
| **Not equal** | anything except the one you enter. |
| **Greater than** | above the one you enter, or after it for a date. |
| **Greater or equal** | the one you enter, or above it. |
| **Less than** | below the one you enter, or before it for a date. |
| **Less or equal** | the one you enter, or below it. |
| **Between** | from the first value to the second, both included. |
| **In** | any of the values you enter. |
| **Not in** | none of the values you enter. |
| **Contains** | text that includes what you enter. |
| **Matches file** | one of the values in the file you upload. |
| **Not matches file** | none of the values in the file you upload. |

**Not equal** and **Not in** leave out customers who have nothing recorded for the attribute. For example, **Zip code** with **Not equal** and one zip code doesn't find customers who have no zip code.

A few attributes let you leave the value empty. The rule then finds the customers who have nothing recorded for that attribute.

### Match against a file

Use **Matches file** or **Not matches file** when your list of values is too long to type, such as thousands of product codes.

1. Pick **Matches file** or **Not matches file**.
2. Drop a `.csv` file on the box, or choose **select file**. The file can be up to 30 MB.
3. Check the line under the file, such as *950 of 1000 records matched*. It says how many of the values in your file were found in your data.

Put one value per row, in the first column. Leave out a header row, because every row is read as a value when the segment runs. Save the file with Windows line endings. A file under 3 MB saved with Mac or Unix line endings never finishes uploading.

For a file of 3 MB or more, the line reads *0 of 0 records matched*, with a red alert icon. The file still uploads. It only means the portal didn't count the values.

## Attribute categories

The **SEGMENT ATTRIBUTES** list groups the attributes into categories. Open a category to see its attributes, or type part of a name in **Search for attributes**.

Lobyco sets up the list for your organisation, starting from the standard categories below. Your list can rename them, leave some out or add others.

| Category | What it holds | For example |
| - | - | - |
| **Membership** | The customer's profile, such as their age, where they live and when they signed up | **Age**, **Gender**, **Date of birth**, **Zip code**, **Self picked store** |
| **Loyalty Card** | The customer's loyalty cards | **Loyalty card state**, **Loyalty card type**, **Loyalty card created date** |
| **Purchase** | What customers bought, where and when | **Amount spent**, **Receipt count**, **Store name**, **Product**, **Purchase date** |
| **Bonus** | The bonus customers have, earned and spent | **Bonus amount**, **Bonus earned in period**, **Bonus type** |
| **Promotions** | The coupons, games and challenges customers took part in | **Count of redeemed coupons**, **Game selection**, **Challenges progress** |
| **App Data** | How customers use your app | **Count of app visits**, **Days since last app visit** |
| **Consent** | What customers have agreed to | **Consent** |
| **Data Science** | Groups Lobyco works out from how customers shop | **Recency Frequency M. Value** |
| **Membership - Custom** | Your organisation's own customer attributes | **Loyalty Tier**, **Premium Member** |

Most **Purchase** attributes look at the last 90 days unless the segment has a **Purchase date** rule. The builder reminds you under the rule.

Counts in **Bonus**, **Promotions** and **App Data** have a date attribute of their own that sets their time window. For example, **Coupon redemption date range** sets the window for **Count of redeemed coupons**, the way **Purchase date** does for purchases.

**Recency Frequency M. Value** puts each customer in a group by how recently, how often and how much they shop. Lobyco works the groups out with a machine-learned model. It's a list attribute, so you pick a group such as *Loyals*, *Lapsing* or *Churned*.

**Membership - Custom** only shows when your organisation has added attributes of its own. They can be text, numbers, dates or yes-or-no, and work like any other attribute. Your developers add them through the [Members API](/api-reference/loyalty-and-membership/members).

## Related

* [Create a segment](/business-documentation/audiences-and-data/create-a-segment) — add attributes to the builder, join the rules and save the segment.
* [Why does my segment show a missing data warning?](/business-documentation/audiences-and-data/why-does-my-segment-show-a-missing-data-warning) — what the warnings under a rule mean.
* [Use your own customer list](/business-documentation/use-cases/use-an-imported-customer-list-instead-of-a-segment) — when you already have the list of customers to reach.
* [Find customers by what they buy](/business-documentation/use-cases/find-customers-by-what-they-buy) — a worked example that combines a spend rule, a chain rule and a date rule.


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