Reserved Events Query for an Altru Calendar
← Back to Blog

How to Create a Reserved Events Query for an Altru Calendar

July 10, 2026

A reserved events query is the Altru sales order query that Calendar Builder uses to show how many tickets are left for each time slot. Your program query supplies each slot’s capacity; this query totals the quantity sold per event, and the calendar subtracts that total from capacity. Build it on Sales order item › Sales order item ticket › Program events, filter it to upcoming events in your program that aren’t refunded, then add its OData link to the calendar and map the fields.

How availability is calculated

The calendar uses two queries (0:41). The program query gives the capacity for each time slot, and the reserved events query gives what has sold. For one slot with a capacity of 100 and orders of 3, 4, 5 and 7 tickets, the calendar adds the sold tickets (19) and subtracts them from capacity, leaving 81 (1:18). It repeats this for every date and time. When the video was recorded, Altru could not query availability directly, so this was the workaround; Rick notes it isn’t 100% accurate all the time, but it gets close (2:14).

Steps

  1. Create a sales order query (2:58) and remove the default lookup ID fields so you start from a blank slate.
  2. Add the output fields (3:23). From Sales order item › Sales order item ticket › Program events add the program Name, Start date, Start time and End time. Then add Quantity and the sales order record ID, which lets the calendar total multiple items in one order.
  3. Make it rolling (4:20). Filter on event Start date is on or after today, so past events drop off.
  4. Filter on your program (4:44). Name equals your program’s name (Museum Admission in the demo).
  5. Exclude refunds (5:09). Sales orders › Refund status equals 0.
  6. Filter on order status (5:29). Sales order status is one of Completed and Confirmed. Add Reserved if you take phone reservations without collecting payment (5:50); otherwise those tickets won’t be counted.
  7. Save and add the OData link (6:26). Click Save and close, copy the query’s OData link, and in your calendar click Add an OData link, paste it and click Next while it validates.
  8. Choose sold-out behavior (7:15). Click the gear to either hide events once capacity is reached, or keep showing them with a label such as Sold out, a sold-out checkbox and an event color in hex.
  9. Map the fields (8:14): title to name, start date, start time, quantity and system record ID. They must match the fields output by your program query exactly. Then click Save.
  10. Show availability (9:21). Add the availability variable to the event name, and the calendar shows what’s left for each date and time.

Common questions

Why does the calendar need a separate reserved events query?

The program query gives each event’s capacity, but not how many tickets have sold. The reserved events query totals the quantity sold per event so the calendar can subtract it.

Should I include Reserved orders?

Only if you take reservations, such as phone bookings where payment is collected at the visit. If you do and leave Reserved out, those tickets aren’t counted and the calendar shows more availability than you really have.

Why include the sales order record ID?

The calendar uses it to total multiple items purchased on the same order correctly.

Why doesn’t availability show on my calendar?

The mapped fields have to match your program query exactly. See how ticket availability is calculated on the Altru calendar and how to show remaining ticket availability.

Video transcript

Hey, this is Rick with Social Good Software. In this short demo I’ll show you how to create a reserved events query. These queries are super helpful for letting the calendar show availability. First I want to take a few seconds to show you how these calendars are updated with availability and how we use capacity. I’ll draw it out for you, and then we’ll actually create the query.

The way it works is we have two queries for our calendar. Query number one gives us the capacity. This is the query you hopefully have set up already. It shows what’s currently available in Altru and gives you the capacity for each time slot. Let’s say, for simplicity, our capacity is 100. Then we need a second query that gives us what we’ve sold. This is our sold query, and we take a sum of all the items sold. Say there was a transaction for three tickets, another for four, another for five and another for seven. We add them up: 7 plus 3 is 10, plus 5 is 15, plus 4 is 19. Our capacity is 100, so 100 minus 19 gives us 81. That’s how we check availability. We repeat this process for every single date, and that’s how we calculate availability.

You might be asking, “Rick, why in the world wouldn’t you just query availability? Why do all this math?” Well, Altru doesn’t give you the ability to query availability, so this is a workaround we found to still show availability on the calendar while working around Altru’s limitations. It’s not a perfect solution, and it’s not 100% accurate all the time, but it gets us pretty close to an actual availability number.

Now that you understand how it works, let’s jump into the query. We add another query, and it’s going to be a sales order query, because, as I mentioned, we’re doing a sum of all the sales orders. We get rid of the lookup IDs, since we don’t need them for this query. We just want a blank slate.

We go down to Sales order item, Sales order item ticket, Program events. Inside Program events we need a few things: the program name, the start date, the start time and the end time. We also need the quantity for all the order items purchased. And we need the sales order record ID. This is how we’re able to sum multiple items being purchased, so it’s very important that you include it.

Now that we have our output fields, the next step is to restrict the query. First, we make it a rolling query so we’re not looking at things in the past: the event start date is on or after today. That keeps your calendar rolling. We also need the name, and we say it equals Museum Admission. This might be different for your organization. Whatever you named your program, that’s the name to use here. In my case this is what it’s called, but make sure you get your program name right so those transactions are included.

Next we make sure this hasn’t been refunded. We go to Sales orders and say refund status is equal to zero, which means we haven’t refunded them. Finally, we look at the status of the transaction. We go to Sales order, and the field we’re looking for is the sales order status. In our case we say it’s one of Completed and Confirmed.

Depending on your organization, you might also need Reserved. The difference between completed and reserved is that when somebody reserves something, payment typically wasn’t collected. If somebody calls in, reserves a date and time, and no payment is collected until they visit in person, that’s what the reserved option means. It won’t necessarily apply to your calendar, but if you’re taking reservations over the phone without collecting payment, make sure to include Reserved, otherwise those won’t be included.

Now we’re ready to save the query. We’ve given it a name, so we click Save and close. Then we get our OData link to add to our calendar, and jump over to the calendar. This is a calendar we’ve been working on with the reserved events. We click Add an OData link, paste in the link, and click Next. It takes a couple of seconds to validate the link. Once it’s validated, we can set up the rest of the configuration. We click Add a link, and that adds it.

Now we need to configure it correctly, so we click the little gear. We have the option to hide events once capacity is reached, so when an event is sold out for that time, it’s no longer shown on the calendar. Or we can show the events and customize what they look like. If you don’t want it to show the title, you can just say “Sold out”, and it marks the event as sold out, with a sold-out checkbox and the event color we’ve entered in hex format. You can rename the checkbox or the event label if you want.

The important part is the mapping section down here. First we map the title, which for us is the name. Then the start date to the start date, the start time to the start time, the quantity to the quantity, and the system record ID to the system record ID. These values need to match exactly the ones you selected for the standard program query. Because we do that sum, the way we calculate it is based on the sales order that was processed and the items processed within it. Hopefully that makes sense. We click Save.

At this point we’ve completed the reserved events query, which lets us see capacity and quantity on the calendar. If we go into the event name, you now have the option to add a variable called availability, and your calendar will show the availability for that event date and time, based on the calculation we’re doing with the reserved events query. It’s pretty straightforward once you wrap your mind around how we’re doing this. Feel free to adjust the query and make any revisions for your organization; this is just an example. If you run into any problems, please reach out to support. We’re always happy to help.

Once again, this is Rick from Social Good Software. Hopefully you found this video helpful. We’re always looking to improve, so if something wasn’t clearly explained, or you still have questions we didn’t cover, don’t worry, we’re here to help. Please use the feedback page on our website to tell us what you think of this training or the software. We’re always happy to help.

Continue reading

How to Edit, Rename or Delete Sales Order Note Types in Altru

Sales order note types in Blackbaud Altru are managed in one place: Administration › Code tables, filtered to Ticketing, under Sales order note type. From that list you can Delete a note type, Edit it to rename it, or Add a new one. Steps Open Code tables (0:12). In Altru go to Administration › Code

MuseumHub vs Social Good Software: Rebuild on HubSpot, or Modernize on Altru?

MuseumHub vs Social Good Software: Rebuild on HubSpot, or Modernize on Altru?

MuseumHub and Social Good Software both bring modern ticketing, membership, and digital cards to museums. They sit on different foundations. MuseumHub rebuilds your operation on HubSpot’s CRM. Social Good Software is native to Blackbaud Altru, extending the system you already run. The re-platform question MuseumHub is museum logic built on top of HubSpot. Adopting it

What Are Checkout Flows for Blackbaud Altru and How Do They Work?

A checkout flow customizes Blackbaud Altru checkout pages for specific items being purchased. An online template usually changes every checkout page across every item, while a checkout flow targets items by title, such as summer camps or general admission, so you can remove or hide items, show a pop-up or give more context only where

Social Good platform

See it in action

Get started with Social Good

Book a demo to see Social Good Software in action for Altru.

Book a Demo
Social Good platform

See Social Good in action

Tell us a bit about your organization and we’ll take you straight to short demo walkthroughs of the software.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.