---
title: "Use Custom Attributes in Rules"
slug: "use-custom-attributes-in-rules"
description: "Use Custom Attributes as Conditions in a Rule to create Action. Learn more in Gladly Help Docs."
updated: 2025-02-06T16:11:24Z
published: 2025-02-06T16:11:24Z
---

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

# Use Custom Attributes in Rules

[Custom attributes](/product-docs/docs/use-custom-attributes-in-rules#what-are-custom-attributes) provide custom data that better informs you of who the Customer is and allows you to use Rules to route Customers based on custom attributes.

> [!WARNING]
> Retrieve custom attributes before routing a Customer
> 
> The [Lookup before Rules](/docs/deactivate-custom-attribute-lookup-before-rules) routing behavior is activated by default, allowing the Lookup Adaptor to retrieve custom attributes (e.g., lifetime value spend) from an external system before Rules run. This allows you to utilize custom attributes in Rules to route Customers to certain Inboxes or Agents. You can deactivate Lookup before Routing. Rules are executed in parallel with custom attribute lookup through the Lookup Adaptor. However, due to lookup latencies outside Gladly's control, there is no guarantee that the Rule will have the latest custom attribute value from an external system to use as a Rule Condition before the Customer is routed.

## What are custom attributes

These are specific data you store about a Customer. For example, you could have an attribute called*loyaltyTier,*which shows a Customer's membership level. Maybe you're an airline with *timeUntilDeparture* that counts down time before an upcoming flight.

### Use custom attributes with Rules

Use custom attributes as *Conditions* in a [Rule](https://help.gladly.com/docs/create-a-rule) to create *Action.*

> *For example, let's say you have an attribute called loyaltyTier (Condition), you might use a Rule to assign (Action) Customers with Gold and Platinum loyalty tier to a "Preferred" Inbox. You may even utilize*[*number comparison operators*](https://help.gladly.com/docs/what-are-rules-and-its-components#number-comparison-operators)*to create attributes using currency and/or numbers.*

Furthermore, you can use [People Match](https://help.gladly.com/docs/what-is-people-match) to boost and prioritize Customers for the next most available Agent.

For more ideas on how to utilize Rules, see the [Sample Rules Library](/docs/rules-library-for-sms).
