# Custom Event Schemas

## Custom Event Schemas

In this section, you can build your customized Event schemas which can be used later to set [Event-based Campaigns](broken://pages/-MZBsXxvHvzYiKfRhVJv#adding-campaign) - the one which you will pick during creation, in the 'Event name' one of the created custom Event schema, and which are triggered by custom Events - based on custom Event schemas.

To access **Custom Event schemas** go to the **Custom Events** under the **Members** panel. Here you will see all the events presented in the table.&#x20;

***

## Adding custom event schema

{% hint style="success" %}
**To add Event Schema:**

1. Go to **Members** > **Custom Events** > **CUSTOM EVENT SCHEMAS**
2. Click **ADD EVENT SCHEMA**
3. Fill in **Basic settings** and **Attributes (optional)**
4. Set status to **Active**
5. Click **ADD EVENT SCHEMA**
   {% endhint %}

{% hint style="info" %}
*Added custom Event schema will be present during creating **Event based Campaign**, on the 'Event name' list, also added attributes will be present on the 'Conditions type' list.*
{% endhint %}

<figure><img src="/files/IxrmiTUKPZsTxn2L472A" alt=""><figcaption></figcaption></figure>

#### Fields available when creating Custom Event Schema:

* **Event system identifier** - during creating the custom Event you will need to pass the Event system identifier: e.g. if you call your Event system identifier as "bike\_ride" then in the request body you will pass: "type": "bike\_ride"&#x20;
* **Event name** - during creating an Event-based Campaign in the 'Event name'  dropdown list custom Event schemas names will be present.
* **Attribute (optional)** - You can use attributes to create a Campaign with conditions based on those attributes and Reward Members.

The attribute can be used when creating an Event-Based campaign that determines the receipt of Units.

<figure><img src="/files/BacLlICUjfmuLkSjucWT" alt=""><figcaption></figcaption></figure>

Available attribute types:&#x20;

* **Boolean** - true/false
* **Datetime** - e.g. "2024-03-08T02:02:08+01:00"
* **Number**&#x20;
* **Text** - 'string'

#### Filtering Custom event schemas

When there are a lot of records, you can change the number of rows displayed per page by clicking on the arrow icon below the table and picking a handy number from the list. You can also filter the results by clicking on the **ADD FILTER** button and picking a suitable option from the list:

* Active
* Create date
* Event name
* Event system identifier

<img src="/files/fdRC8yONxgZ4UA67TqXn" alt="" width="375">

the In Filter pop-up screen you will choose the *Property* mentioned above along with condition and value, after filling it up click on the 'Add filter', and only records fulfilling such criteria will be displayed.

Besides searching via filters you can use a Search Table available in the upper right corner under the 'Add Event Schema' button. The search field allows you to find the event schema via the name:

<figure><img src="/files/xUtWxEluZ5MpTNIj4kVv" alt=""><figcaption></figcaption></figure>

***

## Editing Custom Event Schema

{% hint style="success" %}
**To edit Custom Event Schema:**

1. Select **Event Schema** from the list
2. Click the context menu
3. Click **Edit**
4. Make changes
5. Click **SAVE**
   {% endhint %}

<figure><img src="/files/ADCxgmLHa7WbbjyWuoBE" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.openloyalty.io/main-features/custom-events/custom-event-schemas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
