# Displaying Event Participant Data

In the B2Bsellers Suite, event participant registrations are stored as extensions on the order line items. This allows you to access specific details, such as the participant's name, the event title, and the location, directly within your templates.

## Data Access via Twig

Each line item that represents an event registration contains an `eventParticipant` extension. You can use the following snippet to safely output this data in your storefront or email templates.

### Example

```twig
{# Check if the line item contains participant data #}
{% if nestedItem.extensions.eventParticipant is defined %}
    {% set eventParticipant = nestedItem.extensions.eventParticipant %}

    <div class="event-participant-details">
        <strong>Participant:</strong> {{ eventParticipant.firstName }} {{ eventParticipant.lastName }}<br />
        <strong>Email:</strong> {{ eventParticipant.email }}<br />

        {# Access nested event details if available #}
        {% if eventParticipant.event is defined %}
            <strong>Event:</strong> {{ eventParticipant.event.translated.name }}<br />
            <strong>Date:</strong> 
            {{ eventParticipant.event.startDate|format_date('short', locale='en-GB') }} - 
            {{ eventParticipant.event.endDate|format_date('short', locale='en-GB') }}<br />

            {% if eventParticipant.event.eventLocation is defined %}
                <strong>Location:</strong> {{ eventParticipant.event.eventLocation.translated.name }}
            {% endif %}
        {% endif %}
    </div>
{% endif %}
```

### Key Data Points

* Participant Identity: Access basic contact info via `firstName`, `lastName`, and `email`.
* Event Metadata: Retrieve the translated event name and scheduled dates.
* Location Context: If a location is assigned to the event, it is accessible via the `eventLocation` association.


---

# 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://docs.b2b-sellers.com/b2b-platform/developer-guide/how-to/displaying-event-participant-data.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.
