# Assigning instructors or guides in group products

> Learn how to set up the assignment of instructors or guides in your group products: automatic assignment, availability control from the Online Shop and automatic capacity expansion through the instructor-to-participant ratio.

## Assigning instructors or guides in group products

## What is this feature for?

This feature covers two different but complementary things for your group products:

- **Capacity by teacher/participant ratio**: instead of setting a maximum number of places per session, you let Lueira calculate it automatically based on how many participants each instructor or guide can look after. Capacity grows or shrinks according to the instructors assigned.
- **Self-assignment of teachers**: Lueira checks whether a free and compatible instructor or guide is available before accepting a booking, and automatically assigns them to the session. This way you avoid accepting bookings that your team cannot handle.

The two options work separately, but when you combine them they reinforce each other: with capacity by ratio and self-assignment turned on, Lueira can **expand a session's capacity on the fly** by adding a new teacher when a booking arrives that exceeds the current capacity.
​

## Capacity type: Fixed or Calculated by ratio

In the group product settings you will find the **Capacity type** field with two options:

- **Fixed (max. participants)**: the capacity of each session is the value you enter in *Maximum number of participants*. This is Lueira's classic behaviour.
- **Calculated (teacher ratio)**: the capacity is calculated automatically from the **teacher/participant ratio** and the number of instructors assigned to the session. For example, with a ratio of 8 and 1 instructor assigned, the session will have 8 places; if a second compatible instructor joins, it will have 16.

When you choose *Calculated*, two additional fields appear:

![](https://media.support.lueira.com/images/635f350f08a9f5d31fa3d4004b4651cb.png)

- **teacher/participant ratio**: how many participants each instructor or guide can look after in the same session. It is the key number: it defines how much the capacity grows for each extra instructor assigned.
- **Maximum participant limit**: optional ceiling on the total capacity of the session. *0 = no limit (capacity = ratio × assigned instructors)*. If you enter a value greater than zero, it will be used as a cap even if the ratio would allow more.

**Example**
​

A product with capacity type *Calculated*, ratio 8 and limit 12. A session with 1 teacher assigned will have 8 places. If a booking comes in that needs a ninth place, the system:

1. Looks for a second free, compatible teacher (activity, schedule and language).
2. If it finds one, it assigns them to the session. The capacity would become 16, but since the limit is 12, it stays at **12 places**.
3. If it does not find a second available teacher, the booking cannot be completed.

This automatic expansion only happens when the **Only if Teachers are available** toggle is also turned on: it is that toggle that makes Lueira look for and assign the extra instructor. If the toggle is turned off, the session's capacity stays at *ratio × instructors already assigned* and does not expand by itself.
​

### Session-level configuration

The same fields (*capacity type*, *ratio* and *maximum limit*) are also available on each session's screen, so you can **override them for a specific session** without affecting the rest. The session's value always takes precedence over the product's.

![](https://media.support.lueira.com/images/888419b7fb41996e62bce915e4aed0ca.png)

## How to turn on self-assignment of teachers

Self-assignment is configured independently on each group product:

### From the product's Configuration tab

1. Open the group product you want to configure.
2. Go to the **Configuration** tab.
3. Turn the **Only if Teachers are available** toggle on or off (or **Only if Guides are available**, depending on the type of school).
4. Save the changes with the **Update product** button.

![](https://media.support.lueira.com/images/8e416c19b582116c24d1cc1709588fa6.png)

## How does the "Only if Teachers are available" toggle work?

**With the toggle turned on**, the system checks whether a compatible, free instructor or guide is available at two different moments:

1. **When showing availability:** only the sessions for which at least one instructor or guide is available appear in the Online Shop. Sessions with nobody available are simply not shown to the customer.
2. **When confirming the booking:** right when the customer completes the purchase, the system checks availability again and automatically assigns an instructor or guide to the session.

If you have also set the capacity type to *[Calculated (instructor ratio)](#h_capacidad)*, the system can **expand the session's capacity on the fly**: when a new booking would exceed the current capacity, it looks for another free instructor or guide, assigns them to the session and adds places according to the ratio. If nobody is left available to cover those extra places, the booking cannot be completed.

**With the toggle turned off**, the booking is always created, regardless of whether there are instructors or guides available. The assignment will have to be done manually from the administration panel once the booking has been created.

### Behaviour in Session Packs

The same logic applies when the group product is part of a **Pack**. If the product has the **Only if Teachers are available** toggle turned on, Lueira filters availability in the Online Shop as follows depending on the type of pack:

- **Fixed Pack**: since the customer books all the pack's sessions at once, if any of them has no instructor or guide available, the entire Fixed Pack is hidden from the shop and cannot be booked. A Fixed Pack is only available when *all* its sessions have an teacher.
- **Consecutive Pack**: sessions that have no teacher available are automatically excluded from the list of eligible sessions. The pack remains visible and the customer can still choose among the remaining available sessions.

Sessions that already have an explicitly assigned teacher are never filtered out, regardless of the type of pack.

### Bookings created from Admin

When you manually create a booking from **Admin** on a session with self-assignment or with *[Calculated (instructor ratio)](#h_capacidad)* capacity, Lueira applies the same logic as in the Online Shop: it looks for a free, compatible instructor or guide and assigns them to the session automatically.

In the order creation form you will see the occupancy counter as *participants/effective capacity*, where the **effective capacity** takes into account both the teachers already assigned and those that could still be added by ratio (with the ceiling of the **Maximum participant limit**, if you have set one). If the new booking would exceed that effective capacity, you will see an **overbooking warning** before confirming.

![](https://media.support.lueira.com/images/35e46fbd58c95fcff57f9ac39ca24802.png)

This same logic applies when creating a **Group Products Pack** order from Admin: the system calculates the effective capacity of each session taking into account the teacher/participant ratio and, if the booking would exceed that limit, shows the overbooking warning (yellow border) before confirming.

**If no instructor or guide is available** for any of the sessions when creating the booking from Admin —because there is nobody compatible and free, or because the one who would fit would not meet the [minimum travel time](lueira-guide:1b05ea02-1935-4ca3-8a06-165f85c8c1fb?locale=en) between meeting points— Lueira no longer blocks the creation with an error. Instead it shows the warning **"No teachers available"** ("There is no teacher available for some of the sessions. You can still create the booking and assign the teacher manually later"). If you confirm with **"Create and assign later"**, the booking is created and you will be able to assign the instructor or guide manually from the session details.

If the last order of a session *without ratio* is deleted, the instructor or guide who had been self-assigned is also released automatically, just as happens with Online Shop cancellations.

## When is an instructor or guide considered available?

For the system to take them into account, they must meet all these requirements at the same time:

- ✅ They have the group product's **activity** assigned.
- ✅ They have **time availability** in that slot.
- ✅ They have the **languages** required by the product configured.
- ✅ They do not have another class or product assigned in that same slot.
- ✅ They **can meet the minimum travel time** between meeting points with respect to their other activities on the same day. If they would not arrive on time from/to the session's meeting point, they are not considered available for self-assignment (see [Travel times between meeting points](lueira-guide:1b05ea02-1935-4ca3-8a06-165f85c8c1fb?locale=en)).

## What happens if a booking is cancelled?

If an order is cancelled from the Online Shop, the instructor or guide who had been assigned is released automatically and becomes available again for other bookings.

This also happens when a customer starts the purchase process but abandons it without completing it: after some time the system automatically releases the booking, giving back the instructor's or guide's availability.

If the session used *[calculated capacity](#h_capacidad)* and, after the cancellation, it no longer needs as many instructors, Lueira automatically reduces the session's capacity and releases the instructors or guides who are no longer needed.

⚠️ **Keep in mind:** the instructor or guide is only released if there are no other active participants in that same session who depend on them. That is, if that session already had more confirmed bookings with that instructor assigned, cancelling a single order will not release them: the system keeps the assignment to protect the other participants.

## Availability on B2B channels and marketplaces (GetYourGuide)

When you publish a group product on **GetYourGuide** or other connected marketplaces, the availability that Lueira sends to the external channel takes into account the same **[potential capacity by ratio](#h_capacidad)** calculation as the Online Shop.

That is, if a session is at its limit with the instructors it already has assigned but there are still free, compatible instructors who could be added by ratio, those extra places are published as available on the B2B channel. When the booking arrives, the system will automatically assign the additional instructor or guide that is needed, just as it does for Online Shop bookings.

## Important things to keep in mind

- The automatic assignment and calculated capacity logic applies to bookings from the **Online Shop**, to those created manually from **Admin** and to those arriving through connected **B2B** channels (for example, GetYourGuide).
  ​
- If you also set up a **teachers ranking for the product**, automatic assignment will follow that priority order instead of the global teachers order. 📘 See [Instructor ranking per product](lueira-guide:51a0816e-be94-4e6a-8385-79dddb353fa9?locale=en).
- For automatic assignment to work properly, make sure each instructor or guide has their **activities, languages and availability schedules** properly set up in their profile.
  ​
- If the group product has the **capacity type set to Calculated (teacher ratio)** and also has **linked material resources**, the material resources **are completely ignored** when calculating the session's availability and capacity. The capacity will be set only by the ratio (and the maximum limit, if you have set one), regardless of how many units of the material resource are available.

Source: https://help.lueira.com/en/articles/asignacion-de-instructores-o-guias-en-productos-grupales
