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

# Ionic Capacitor SDK: Ticket attributes

> Set and clear ticket attribute values with the Gleap Ionic Capacitor SDK. Follow the integration code examples.

<img src="https://mintcdn.com/gleap-1d346ffa/b8_EVsZHbtxdB2pN/images/ticketattributes.png?fit=max&auto=format&n=b8_EVsZHbtxdB2pN&q=85&s=20a9a0ef5287d21db035e4bf169eebc6" alt="Ticket custom data" width="2294" height="646" data-path="images/ticketattributes.png" />

## Set ticket attributes

Ticket attributes can be set with the method below. If the user also provides data for an attribute (for example `description`), the user input will be prioritized.

```javascript theme={null}
Gleap.setTicketAttribute({
  key: "notes",
  value: "This is a test value.",
});
```

**key**: attribute key<br />**value**: the value as a string

Ticket attribute data will not be [pre-filled](/documentation/ioniccapacitor/prefill-form-data) in forms.

## Finding the ticket attribute keys

You can find or create all available ticket attributes for each ticket type in **Settings** > **Data attributes**.

<img src="https://mintcdn.com/gleap-1d346ffa/b8_EVsZHbtxdB2pN/images/attributefinder.png?fit=max&auto=format&n=b8_EVsZHbtxdB2pN&q=85&s=7267ddfd823e5c80ec596b2e74e0d5a2" alt="Ticket attribute" width="3418" height="968" data-path="images/attributefinder.png" />

## Unset ticket attributes

Ticket attributes can be unset with the method below.

```javascript theme={null}
Gleap.unsetTicketAttribute({
  key: "notes",
});
```

## Clear all ticket attributes

All ticket attributes can be cleared with the method below.

```javascript theme={null}
Gleap.clearTicketAttributes();
```
