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

# Targets

> Configured endpoints that receive formatted JSON payloads from Omneo reactions.

Targets are configured webhook endpoints that receive formatted JSON payloads when triggered by a Reaction. Unlike standard webhooks (which send the raw Event Context), Targets use Twig templates to shape the payload into any JSON format required by the receiving system.

## How Targets work

1. A Reaction fires on an event
2. The Reaction's `target.send` action is executed
3. The Target retrieves the event context data
4. The Twig template is rendered using the context data
5. The rendered JSON is sent as an HTTP POST to the Target's configured URL

## Target fields

| Field         | Description                                                |
| ------------- | ---------------------------------------------------------- |
| `name`        | Display name for the target                                |
| `handle`      | Machine-readable identifier referenced in reaction actions |
| `url`         | The endpoint that receives the payload                     |
| `template`    | A Twig-templated JSON string                               |
| `description` | Optional description                                       |
| `notes`       | Optional implementation notes                              |

## Twig templates

Target templates use the [Twig templating engine](https://twig.symfony.com/doc/2.x/templates.html). All fields available in the Event Context can be referenced using `{{ variable_name }}` syntax.

**Example template for a reward issuance notification:**

```json theme={null}
{
  "email": "{{ email }}",
  "first_name": "{{ first_name }}",
  "reward_amount": "{{ reward.amount }}",
  "reward_expiry": "{{ reward.expires_at }}",
  "reward_balance": "{{ reward_balance }}"
}
```

The context for this example is `profile.update`, so profile fields are accessed at the root level.

## Context levels

Data in the Event Context is available at different nesting levels:

* **Level 1**: Root profile fields: `{{ first_name }}`, `{{ email }}`, `{{ tier_handle }}`
* **Level 2**: Nested objects: `{{ aggregations.spend_12m }}`, `{{ tier.name }}`
* **Level 3**: Deeply nested: `{{ attributes.comms.email_promo }}`

## Common Target use cases

* Sending a reward issuance email payload to Klaviyo
* Triggering a tier upgrade flow in Salesforce Marketing Cloud
* Posting a new member notification to a Slack channel
* Calling a cloud function to sync data to a data warehouse

## Configuring Targets

Targets are managed in CX Manager under Settings → Targets, or via the Targets API. Each target must be referenced by its `handle` in the `target.send` reaction action argument.

See [Dev Guides: Targets in Reactions](/dev-guides/reactions/targets) for a full walkthrough.
