Find clients likely to book a class
find_likely_attendeesFinds the clients most likely to book a class, to fill open spots or target a promotion. Give an upcoming classId (from find_classes) or a className such as "yoga". Reads who booked the same class type in past classes (most recent first), scores each client 0-100 on how often and how recently they came and how many bookings they kept, and, for a classId, whether they come on the same weekday and time and with the same instructor. Returns the top clients with contact details and active memberships; clients already booked into the class are left out. Mindbody calls: 1 for the class (or 1-3 to look up class type names), 1 per 200 past classes, 1 per past class with bookings (up to maxClasses), then 1 per 20 clients returned plus 1 for memberships (at most 112). Rosters need a staff token that may view class rosters; when Mindbody returns none, the result says so instead of ranking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Clients to return, 1-50 (default 20). | |
| match | No | Which past classes count: classType (default) = the same class type; sessionType = the same session type; program = any class in the same program (broadest). | |
| siteId | No | Site to call (SiteId header). Default -99. | |
| classId | No | The class to fill (the "id" from find_classes). Its type, weekday, time and instructor shape the ranking. | |
| className | No | Instead of classId: a class type name or part of one, e.g. "yoga" (every class type whose name contains it). | |
| maxClasses | No | Most recent past classes with bookings whose rosters are read, 1-100 (default 40; 1 Mindbody call each). | |
| locationIds | No | Only count past classes at these locations. | |
| lookbackDays | No | Days of history to read, 14-180 (default 90). |