Duncan Anderson

Work sample: Mindbody enrollment check

Course purchase handled without duplicate class bookings.

This example shows the core rule for the first build: before adding a student to course sessions in Mindbody, check their current class visits and add only the sessions that are missing.

In this sample purchase, two sessions are already booked and two are missing. The existing bookings are left alone; only the missing sessions move forward.

Sample input

Executive Function Foundations - Fall Cohort

2 already booked, 2 to add

SessionMindbody classCurrent checkDecision
Intake and goals
Dana Reed - McLean Room A
MB-CLASS-7101Already enrolledDo nothing
Planning systems
Dana Reed - McLean Room A
MB-CLASS-7102MissingAdd this session
Study routines
Dana Reed - McLean Room A
MB-CLASS-7103Already enrolledDo nothing
Completion review
Dana Reed - McLean Room A
MB-CLASS-7104MissingAdd this session

Automation behavior

  • Receive the course purchase.
  • Search current Mindbody class visits for the student.
  • Compare current visits to required course sessions.
  • Add only sessions that are missing.
  • Write the result to HubSpot, the log sheet, and the template payload.

Fields protected

  • Appiant-owned contact identity fields in HubSpot.
  • Existing Mindbody bookings that already match the course.
  • Post-enrollment template payload until the booking result is known.

Output record

Mindbody: two add-class actions prepared.

HubSpot: course status and list membership ready to update.

Google Sheet: purchase result ready to append.

Staff review: two missing sessions flagged with the exact add-class result.

Run sample purchase

Ready

Request

Event
course_purchase
Mindbody client
MB-839104
Course
exec_function_foundations_fall

Click the button to run the sample request and see which sessions are skipped or added.