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

# Applying context

> Apply contexts in Novu workflows to personalize notification templates, control workflow logic, and customize per-tenant behavior in the Inbox.

Contexts let you personalize how notifications are rendered and delivered by making contextual data available inside template editors, step conditions, and the [`<Inbox />`](/platform/inbox/configuration/inbox-with-context) component.

## How to use context

Once a context is created either through the Novu dashboard or API, its data becomes available for use in your templates editors, step conditions, and for customizing the [`<Inbox />`](/platform/inbox/configuration/inbox-with-context) component.

### Using context data in the template editor

Use the `{{context}}` Handlebars helper to access context data in any template editor. The context key you provide while creating the context (for example, tenant, region) becomes the accessor.

For example, if a context with this data is created:

```json theme={null}
{
  "context": {
    "tenant": {
      "id": "acme-corp",
      "data": {
        "name": "Acme Corporation",
        "plan": "enterprise"
      } 
    }
  }
}
```

You can access the `name` and `plan` in your in-app, email, SMS, or push template like this:

```html theme={null}
<p>Welcome, new user from {{context.tenant.data.name}}!</p>
<p>Your account is on the {{context.tenant.data.plan}} plan.</p>
```

Or

```text theme={null}
Welcome, new user from {{context.tenant.data.name}}!
Your account is on the {{context.tenant.data.plan}} plan.
```

<video autoPlay loop muted playsInline src="https://mintcdn.com/novu-c5de82d9/WW338S7CnB7jmIw3/images/workflows/contexts/context.mp4?fit=max&auto=format&n=WW338S7CnB7jmIw3&q=85&s=033e3501f00ff83c02ed3bfd330baa3e" data-path="images/workflows/contexts/context.mp4" />

<Note>
  Refer to the Inbox documentation, to learn how to use context in the [`<Inbox />`](/platform/inbox/configuration/inbox-with-context) component.
</Note>

### Using context in step conditions

You can use context variables in the **Step conditions** tab of a workflow step to add conditional logic to your notifications. For example, only send a "Feature X is now enabled" email if `context.tenant.data.plan` is `enterprise`.

<img src="https://mintcdn.com/novu-c5de82d9/WW338S7CnB7jmIw3/images/workflows/context-step-conditions.png?fit=max&auto=format&n=WW338S7CnB7jmIw3&q=85&s=5cd7fa84bcb5138fb8582e9534b98b11" alt="Context step conditions" width="2880" height="1624" data-path="images/workflows/context-step-conditions.png" />

To learn how contexts are structured or how to define them, refer to the [Managing Contexts](/platform/workflow/advanced-features/contexts/manage-contexts) documentation.

## Viewing and debugging contexts

Once you start using contexts in your workflows, Novu provides full observability so you can monitor and debug your context usage after a workflow has been triggered.

### Searching for workflow runs

You can filter your workflow runs to find all executions associated with a specific context.

1. Navigate to the **Activity Feed** in your Novu dashboard.
2. Select the **Workflow Runs** tab.
3. In the search bar, click **Context** and enter the context `type` and `id` using the format `type:id`.

<img src="https://mintcdn.com/novu-c5de82d9/WW338S7CnB7jmIw3/images/workflows/search-context-activityfeed.png?fit=max&auto=format&n=WW338S7CnB7jmIw3&q=85&s=5d46fbdf8c5b31dac78903b164d585e5" alt="Searching for workflow runs" width="2880" height="1624" data-path="images/workflows/search-context-activityfeed.png" />

### Verifying the resolved context

To confirm that Novu received and processed your context data correctly, you can inspect the API traces for a specific run.

1. From the **Activity Feed**, select the relevant workflow run from the list in the **Requests** tab.
2. In the workflow run details, go to the **API Traces** tab.

Here, you will see the full context object that was resolved and attached to that specific workflow execution.

<img src="https://mintcdn.com/novu-c5de82d9/WW338S7CnB7jmIw3/images/workflows/resolved-context.png?fit=max&auto=format&n=WW338S7CnB7jmIw3&q=85&s=92ad3725afbf53bc0b11ecb39728fbe5" alt="Verifying the resolved context" width="2880" height="1626" data-path="images/workflows/resolved-context.png" />
