# Get started with Events

## What are events?

**Events track user actions and business activity in the Loyalty Engine.** Each event represents a moment in time and can trigger reactors that award points, issue rewards, grant badges, or call webhooks.

It’s up to you to decide which actions to capture, gather the data, and send those events from the business systems in which they originate to the Loyalty Engine via the API.

Every event contains three core elements:

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Event type</strong></td><td>The category or nature of the event, such as an account registration, reward purchase, transaction, survey completion, or new subscription.</td><td><a href="/files/Uj8d2uYUWr7futhSxvBE">/files/Uj8d2uYUWr7futhSxvBE</a></td><td><a href="/pages/afmtlPY5SReqlvs8PqJR">/pages/afmtlPY5SReqlvs8PqJR</a></td></tr><tr><td><strong>Event subject</strong></td><td>The user or entity associated with the event.</td><td><a href="/files/aeHt5XghATSnyFdJjy0l">/files/aeHt5XghATSnyFdJjy0l</a></td><td><a href="/pages/KFbE1uDIkahYUD1oDlLz">/pages/KFbE1uDIkahYUD1oDlLz</a></td></tr><tr><td><strong>Event payload</strong></td><td>The specific data related to the event, such as transaction amounts, survey answers, or subscription details.</td><td><a href="/files/cBl4OBgPoOY5M5Wy437H">/files/cBl4OBgPoOY5M5Wy437H</a></td><td><a href="/pages/QLdIuvtBhijXyuVEMiaQ">/pages/QLdIuvtBhijXyuVEMiaQ</a></td></tr></tbody></table>

{% hint style="info" %}

#### Events are the data that fuel your loyalty program—but they don’t define the logic.

Events record what users do (e.g., make a purchase), while [**reactors**](/product/loyalty-engine/reactors.md) respond to those events to trigger outcomes like awarding points, issuing rewards, or calling a webhook.
{% endhint %}

***

## Setup your event-based loyalty program

{% stepper %}
{% step %}

### Determine the behaviours you want to reward

Start by identifying the user behaviors you want to incentivize, and define what data you’ll need to capture for each one.

Here are a few simplified examples of common behaviours, along with the data you might include with each behaviour.

<table data-column-title-hidden data-view="cards"><thead><tr><th>Event type</th><th>Event Payload</th></tr></thead><tbody><tr><td><strong>POS Transaction</strong></td><td><ul><li>Transaction ID</li><li>Total Spend</li><li>Items Purchased</li><li>Purchase Channel</li></ul></td></tr><tr><td><strong>Survey Completion</strong></td><td><ul><li>Survey ID</li><li>No. of Questions Answered</li><li>Completion Score: 80%</li></ul></td></tr><tr><td><strong>New Subscription</strong></td><td><ul><li>Subscription Plan</li><li>Subscription Start Date</li><li>Auto-renew</li></ul></td></tr><tr><td><strong>Opened App</strong></td><td><ul><li>Device type</li><li>App version</li><li>Location</li></ul></td></tr><tr><td><strong>Product Review</strong></td><td><ul><li>Rating</li><li>Review content</li></ul></td></tr><tr><td><strong>Submitted Promo Code</strong></td><td><ul><li>Code submitted</li></ul></td></tr></tbody></table>
{% endstep %}

{% step %}

### Create custom event types for each rewarded behavior

Use the Loyalty Console to [**create a custom event type**](/product/loyalty-engine/events/event-types/creating-event-types.md) for each user behavior you want to track and reward.

When setting up each event type, consider what data needs to be included in the event payload. This is defined by the [**event type’s schema**](/product/loyalty-engine/events/event-types/event-type-schemas.md) and determines which conditions you’ll be able to use when configuring reactors.

For example, if you’re sending events to represent in-store transactions and want to award points when specific SKUs are purchased, make sure the event includes basket data in the payload.
{% endstep %}

{% step %}

### Report events into the Loyalty Engine

Once your custom event types are defined, your systems must [**report events**](/product/loyalty-engine/events/reporting-events.md) to the Loyalty Engine in real time via the API.

For example, when a customer completes a purchase, your e-commerce system should report an event using the event type you’ve created for transactions. The event payload should include relevant data—such as total spend, purchased products, or payment method—so that reactors can use this information to award points, issue rewards, or trigger other actions.
{% endstep %}
{% endstepper %}


---

# 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://kbase.whitelabel-loyalty.com/product/loyalty-engine/events/get-started-with-events.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.
