> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/campaigns/campaigns/custom-attributes-in-campaigns.md).

# Custom Attributes in Campaigns

Learn how you can use custom attributes in campaigns

### **Overview**

Campaign attributes, organized in a *key:value* format, serve as versatile data containers. These attributes offer multifaceted functionalities:

1. **Filtering in Admin Panel/API:** Enables filtering campaigns based on specific criteria, aiding efficient campaign management and targeted audience segmentation.
2. **External Application Integration:** Allows utilization of attribute data in external applications, enhancing management and filtering capabilities across various platforms.

For instance, an attribute like `"new_member_campaign": "true"` could be utilized to specifically display campaigns to new members. This attribute facilitates targeted campaign display solely to new members, ensuring personalized and relevant engagement strategies tailored to specific user segments.

### **How to use them**

* Access the **Basic Settings** section of your campaign.
* Click **Add Custom Attribute** and enter pairs like `season:summer` or `channel:email`.
* You can include multiple attributes per campaign.

### **Best practices**

* Stick to standard naming conventions (e.g., `lower_snake_case`).
* Use tags to categorize by theme, launch period, or audience.
* Query and filter campaigns with these attributes via API or admin tools.

### **Attributes on campaign-generated unit transfers**

When a campaign awards units, the resulting unit transfer carries the campaign's custom attributes. They are applied as the transfer is created, so points earned through a campaign can be reported on and reconciled using the same keys you filter campaigns by.

This matches the custom attributes available on manually created unit transfers.

Available from version 5.171.0.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/campaigns/campaigns/custom-attributes-in-campaigns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
