> For the complete documentation index, see [llms.txt](https://docs.b2b-sellers.com/b2b-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2b-sellers.com/b2b-platform/developer-guide/how-to/displaying-event-participant-data.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.b2b-sellers.com/b2b-platform/developer-guide/how-to/displaying-event-participant-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
