# Shopify Bookings

## Liquid Rendering

Rendering information about your Event or Course in liquid is easy!

```markup
{% for product in collection.products %}
  {% assign metafields = product.first_available_variant.metafields.bookings %}
  {% case metafields.bookable_type %}
    {% when 'event' %}
      <p>Start time: {{ metafield.starts_at }}</p>
      <p>End time: {{ metafield.ends_at }}</p>
    {% when 'course' %}
      <p>Course Sessions:</p>
      {% for session in metafields.sessions %}
       <p>Start time: {{ session.starts_at }}</p>
       <p>End time: {{ session.ends_at }}</p>
      {% endfor %}
    {% when 'service' %}
      <p>{{ product.title }}</p>
      <p>Start time: {{ metafield.starts_at }}</p>
      <p>End time: {{ metafield.ends_at }}</p>
    {% else %}
      This product is not bookable
  {% endcase %}
{% endfor %}
```

{% hint style="info" %}
Services don't have specific start and end times. Since their availability is dynamic, they have to be booked using our *Service Booking Widget*.
{% endhint %}


---

# 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.shopifybookings.com/master.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.
